On 7/22/21 4:01 AM, Yicong Yang wrote:
On 2021/7/22 3:36, Tim Chen wrote:
Barry & Yicong,
I've added this series to allow for run time control of cluster scheduling via /proc/sys/kernel/sched_cluster_enabled.
I've defaulted the setting to off as this is probably the safest option and will encounter the least resistance.
I've also added a SD_CLUSTER flag in patch 2. It may be handy if we want to do any cluster specific scheduling operation in a cluster sched domain.
This could be a follow on after the main patchset is posted. I've tested it on my x86 machine. Wonder if you can test it on your ARM system to make sure it works properly there.
Will appreciate your feedback and review.
I've tested the series on our Kunpeng 920, the sysctl works as well.
One minor question is that if the user want to boot with cluster scheduler enabled, seems we have to boot with aditional sysctl.kernel.sched_cluster_enabled=1 appended in the cmdline. Then we'll build the domians without cluster scheduler first and rebuild the domains later, is this as expected? Can we provide a way to build the domains once with or without the cluster scheduling at boot time, like kernel parameters? just some trivial thoughts. :)
Good suggestion. I'll add a kernel parameter for that.
Tim Chen (3): sched: Create SDTL_SKIP flag to skip topology level sched: Add SD_CLUSTER topology flag to cluster sched domain sched: Add runtime knob sysctl_sched_cluster_enabled
arch/x86/kernel/smpboot.c | 8 +++++ drivers/base/arch_topology.c | 7 ++++ include/linux/sched/sd_flags.h | 7 ++++ include/linux/sched/sysctl.h | 6 ++++ include/linux/sched/topology.h | 3 +- include/linux/topology.h | 7 ++++ kernel/sched/core.c | 1 + kernel/sched/sched.h | 6 ++++ kernel/sched/topology.c | 58 +++++++++++++++++++++++++++++++++- kernel/sysctl.c | 11 +++++++ 10 files changed, 112 insertions(+), 2 deletions(-)