All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Creekmore <jonathan.creekmore@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Jonathan Creekmore <jonathan.creekmore@gmail.com>,
	Dario Faggioli <dario.faggioli@citrix.com>
Subject: [PATCH 1/4] build: Hook the schedulers into Kconfig
Date: Thu, 17 Dec 2015 14:59:31 -0600	[thread overview]
Message-ID: <1450385974-12732-2-git-send-email-jonathan.creekmore@gmail.com> (raw)
In-Reply-To: <1450385974-12732-1-git-send-email-jonathan.creekmore@gmail.com>

Allow the schedulers to be independently enabled or disabled at
compile-time instead of just allowing the scheduler to be selected on
the command line. To match existing behavior, all four schedulers are
compiled in by default, although the RTDS and ARINC653 are marked
EXPERIMENTAL to match their not currently supported status.

CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>
Signed-off-by: Jonathan Creekmore <jonathan.creekmore@gmail.com>
---
 xen/common/Kconfig    | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
 xen/common/Makefile   |  8 +++----
 xen/common/schedule.c | 12 ++++++++--
 3 files changed, 78 insertions(+), 6 deletions(-)

diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 7d0e9a9..378a063 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -44,4 +44,68 @@ config KEXEC
 
 	  If unsure, say Y.
 
+# Enable schedulers
+menu "Schedulers"
+config SCHED_CREDIT
+	bool "Credit scheduler support"
+	default y
+	---help---
+	  The traditional credit scheduler is a general purpose scheduler.
+
+	  If unsure, say Y.
+
+config SCHED_CREDIT2
+	bool "Credit2 scheduler support"
+	default y
+	---help---
+	  The credit2 scheduler is a general purpose scheduler that is
+	  optimized for lower latency and higher VM density.
+
+	  If unsure, say Y.
+
+config SCHED_RTDS
+	bool "RTDS scheduler support (EXPERIMENTAL)"
+	default y
+	---help---
+	  The RTDS scheduler is a soft and firm real-time scheduler for
+	  multicore, targeted for embedded, automotive, graphics and gaming
+	  in the cloud, and general low-latency workloads.
+
+	  If unsure, say N.
+
+config SCHED_ARINC653
+	bool "ARINC653 scheduler support (EXPERIMENTAL)"
+	default y
+	---help---
+	  The ARINC653 scheduler is a hard real-time scheduler for single
+	  cores, targeted for avionics, drones, and medical devices.
+
+	  If unsure, say N.
+
+choice
+	prompt "Default Scheduler?"
+	default SCHED_CREDIT_DEFAULT if SCHED_CREDIT
+	default SCHED_CREDIT2_DEFAULT if SCHED_CREDIT2
+	default SCHED_RTDS_DEFAULT if SCHED_RTDS
+	default SCHED_ARINC653_DEFAULT if SCHED_ARINC653
+
+	config SCHED_CREDIT_DEFAULT
+		bool "Credit Scheduler" if SCHED_CREDIT
+	config SCHED_CREDIT2_DEFAULT
+		bool "Credit2 Scheduler" if SCHED_CREDIT2
+	config SCHED_RTDS_DEFAULT
+		bool "RT Scheduler" if SCHED_RTDS
+	config SCHED_ARINC653_DEFAULT
+		bool "ARINC653 Scheduler" if SCHED_ARINC653
+endchoice
+
+config SCHED_DEFAULT
+	string
+	default "credit" if SCHED_CREDIT_DEFAULT
+	default "credit2" if SCHED_CREDIT2_DEFAULT
+	default "rtds" if SCHED_RTDS_DEFAULT
+	default "arinc653" if SCHED_ARINC653_DEFAULT
+
+endmenu
+
 endmenu
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 8ab15ba..3a2026a 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -30,10 +30,10 @@ obj-y += rangeset.o
 obj-y += radix-tree.o
 obj-y += rbtree.o
 obj-y += rcupdate.o
-obj-y += sched_credit.o
-obj-y += sched_credit2.o
-obj-y += sched_arinc653.o
-obj-y += sched_rt.o
+obj-$(CONFIG_SCHED_CREDIT) += sched_credit.o
+obj-$(CONFIG_SCHED_CREDIT2) += sched_credit2.o
+obj-$(CONFIG_SCHED_ARINC653) += sched_arinc653.o
+obj-$(CONFIG_SCHED_RTDS) += sched_rt.o
 obj-y += schedule.o
 obj-y += shutdown.o
 obj-y += softirq.o
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index d121896..2f98a48 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -38,8 +38,8 @@
 #include <public/sched.h>
 #include <xsm/xsm.h>
 
-/* opt_sched: scheduler - default to credit */
-static char __initdata opt_sched[10] = "credit";
+/* opt_sched: scheduler - default to configured value */
+static char __initdata opt_sched[10] = CONFIG_SCHED_DEFAULT;
 string_param("sched", opt_sched);
 
 /* if sched_smt_power_savings is set,
@@ -65,10 +65,18 @@ DEFINE_PER_CPU(struct schedule_data, schedule_data);
 DEFINE_PER_CPU(struct scheduler *, scheduler);
 
 static const struct scheduler *schedulers[] = {
+#ifdef CONFIG_SCHED_CREDIT
     &sched_credit_def,
+#endif
+#ifdef CONFIG_SCHED_CREDIT2
     &sched_credit2_def,
+#endif
+#ifdef CONFIG_SCHED_ARINC653
     &sched_arinc653_def,
+#endif
+#ifdef CONFIG_SCHED_RTDS
     &sched_rtds_def,
+#endif
 };
 
 static struct scheduler __read_mostly ops;
-- 
2.6.4

  reply	other threads:[~2015-12-17 20:59 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 20:59 [PATCH 0/4] Allow schedulers to be selectable through Kconfig Jonathan Creekmore
2015-12-17 20:59 ` Jonathan Creekmore [this message]
2015-12-18  1:35   ` [PATCH 1/4] build: Hook the schedulers into Kconfig Dario Faggioli
2015-12-18  2:20     ` Jonathan Creekmore
2015-12-18  9:19       ` Dario Faggioli
2015-12-18 10:52     ` George Dunlap
2015-12-18 11:23       ` Dario Faggioli
2015-12-18  8:57   ` Andrew Cooper
2015-12-18 16:43     ` Jonathan Creekmore
2015-12-17 20:59 ` [PATCH 2/4] build: Alloc space for sched list in the link file Jonathan Creekmore
2015-12-18  9:01   ` Andrew Cooper
2015-12-18 16:40     ` Jonathan Creekmore
2015-12-18 16:48       ` Andrew Cooper
2015-12-18 17:07         ` Jan Beulich
2015-12-18 17:10           ` Andrew Cooper
2015-12-18 17:11           ` Jonathan Creekmore
2015-12-18 17:23             ` Andrew Cooper
2015-12-17 20:59 ` [PATCH 3/4] sched: Register the schedulers into the list Jonathan Creekmore
2015-12-18  1:42   ` Dario Faggioli
2015-12-18  9:03   ` Andrew Cooper
2015-12-17 20:59 ` [PATCH 4/4] sched: Use the auto-generated list of schedulers Jonathan Creekmore
2015-12-18  1:47   ` Dario Faggioli
2015-12-18  9:12   ` Andrew Cooper
2015-12-18 16:44     ` Jonathan Creekmore
2015-12-18 10:50   ` Jan Beulich
2015-12-18 16:00     ` Jonathan Creekmore
2015-12-18 16:43       ` Jan Beulich
2015-12-18 17:24         ` Jonathan Creekmore
2015-12-18 17:30           ` Andrew Cooper
2015-12-18 10:39 ` [PATCH 0/4] Allow schedulers to be selectable through Kconfig Jan Beulich
2015-12-18 10:45 ` Ian Campbell
2015-12-18 10:58   ` Jan Beulich
2015-12-18 11:08   ` Juergen Gross
2015-12-18 11:19     ` Ian Campbell
2015-12-18 11:30     ` Jan Beulich
     [not found]     ` <5673FC6202000078000C122B@suse.com>
2015-12-18 11:41       ` Juergen Gross
2015-12-18 17:56   ` Doug Goldstein
2015-12-18 18:25     ` Andrew Cooper
2016-01-06 14:45     ` Ian Campbell
2016-01-07 14:01       ` Jonathan Creekmore
2016-01-07 14:37         ` Jan Beulich
2016-01-07 15:00           ` Ian Campbell
2016-01-07 15:18             ` Doug Goldstein
2016-01-07 15:31               ` Ian Campbell
2016-01-07 15:43               ` Jonathan Creekmore
2016-01-07 15:54                 ` Jan Beulich
2016-01-07 15:47               ` Jan Beulich
2016-01-07 15:30             ` Ian Campbell
2016-01-07 15:51               ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450385974-12732-2-git-send-email-jonathan.creekmore@gmail.com \
    --to=jonathan.creekmore@gmail.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.