]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
build: hook the schedulers into Kconfig
authorJonathan Creekmore <jonathan.creekmore@gmail.com>
Thu, 21 Jan 2016 15:05:35 +0000 (16:05 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 21 Jan 2016 15:05:35 +0000 (16:05 +0100)
Allow the schedulers to be independently enabled or disabled at
compile-time. To match existing behavior, all four schedulers are
compiled in by default, although the Credit2, RTDS, and ARINC653 are
marked EXPERIMENTAL to match their not currently supported status.

Signed-off-by: Jonathan Creekmore <jonathan.creekmore@gmail.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/Kconfig
xen/common/Makefile
xen/common/schedule.c

index eadfc3bbe284b3e01bcd9b2d814ace916af9de16..6f404b452cd5944e54ebdeff7a1863e5bbee2b7f 100644 (file)
@@ -97,4 +97,59 @@ config XSM
 
          If unsure, say N.
 
+# Enable schedulers
+menu "Schedulers"
+       visible if EXPERT = "y"
+
+config SCHED_CREDIT
+       def_bool y
+       ---help---
+         The traditional credit scheduler is a general purpose scheduler.
+
+config SCHED_CREDIT2
+       bool "Credit2 scheduler support (EXPERIMENTAL)"
+       default y
+       ---help---
+         The credit2 scheduler is a general purpose scheduler that is
+         optimized for lower latency and higher VM density.
+
+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.
+
+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.
+
+choice
+       prompt "Default Scheduler?"
+       default SCHED_CREDIT_DEFAULT 
+
+       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
+       default "credit"
+
+endmenu
+
 endmenu
index 9f8b214edf234ba566ef2074516827879d866a74..4df71eeb1b5752c3a43b283648be11fee606b583 100644 (file)
@@ -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_ARINC653) += sched_arinc653.o
+obj-$(CONFIG_SCHED_CREDIT) += sched_credit.o
+obj-$(CONFIG_SCHED_CREDIT2) += sched_credit2.o
+obj-$(CONFIG_SCHED_RTDS) += sched_rt.o
 obj-y += schedule.o
 obj-y += shutdown.o
 obj-y += softirq.o
index d1218966b67f9b1ace7203b61965572439cfc34e..2f98a48e0f48de2a610c9fb1802e46ed86dc2705 100644 (file)
@@ -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;