Add boot time parameter sched_cluster to enable or disable cluster scheduling. Setting sched_cluster=0 disables cluster scheduling sched_cluster=1 enables cluster scheduling --- Documentation/admin-guide/kernel-parameters.txt | 4 ++++ kernel/sched/topology.c | 13 +++++++++++++ 2 files changed, 17 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index cb89dbdedc46..0578d0a2910c 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4880,6 +4880,10 @@
sched_verbose [KNL] Enables verbose scheduler debug messages.
+ sched_cluster= [x86] Enable or disable cluster scheduling. + 0 -- disable. + 1 -- enable. + schedstats= [KNL,X86] Enable or disable scheduled statistics. Allowed values are enable and disable. This feature incurs a small amount of overhead in the scheduler diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 90a1f71d9de7..a030840d7a35 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -210,6 +210,19 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent) #ifdef CONFIG_SCHED_CLUSTER void set_sched_cluster(void);
+static int __init sched_cluster_option(char *str) +{ + int enable; + + if (get_option(&str, &enable)) { + sysctl_sched_cluster_enabled = enable; + return 0; + } + + return -EINVAL; +} +early_param("sched_cluster", sched_cluster_option); + DEFINE_MUTEX(sched_cluster_mutex); int sched_cluster_handler(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos)