lkml.org 
[lkml]   [2021]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] scheduler: Add boot time enabling/disabling of cluster scheduling
Date
Add boot time parameter sched_cluster to enable or disable cluster
scheduling. Set boot parameter as follow:

sched_cluster=0 disables cluster scheduling
sched_cluster=1 enables cluster scheduling

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
---
Documentation/admin-guide/kernel-parameters.txt | 4 ++++
kernel/sched/topology.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 9725c546a0d4..40ad997430e1 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5023,6 +5023,10 @@

sched_verbose [KNL] Enables verbose scheduler debug messages.

+ sched_cluster= 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 e362bba29f95..087854d505f7 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1697,6 +1697,22 @@ int sched_cluster_handler(struct ctl_table *table, int write,

return ret;
}
+
+static int __init sched_cluster_option(char *str)
+{
+ int enable;
+
+ if (get_option(&str, &enable)) {
+ if (enable != 0 && enable != 1)
+ return -EINVAL;
+
+ sysctl_sched_cluster = enable;
+ return 0;
+ }
+
+ return -EINVAL;
+}
+early_param("sched_cluster", sched_cluster_option);
#endif

static struct sched_domain_topology_level *next_tl(struct sched_domain_topology_level *tl)
--
2.20.1
\
 
 \ /
  Last update: 2021-12-03 22:32    [W:0.098 / U:15.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site