Commit 9e68cc2b authored by Tim Chen's avatar Tim Chen Committed by Jie Liu
Browse files

scheduler: Add boot time enabling/disabling of cluster scheduling

kunpeng inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5W44S
CVE: NA

Reference: https://lore.kernel.org/lkml/cover.1638563225.git.tim.c.chen@linux.intel.com/



----------------------------------------------------------------------

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: default avatarTim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: default avatarJie Liu <liujie375@h-partners.com>
parent 8ce3e706
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4978,6 +4978,10 @@

	sched_debug	[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
+16 −0
Original line number Diff line number Diff line
@@ -1619,6 +1619,22 @@ static int __init sched_cluster_sysctl_init(void)
	return 0;
}
late_initcall(sched_cluster_sysctl_init);

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)