-----Original Message----- From: Tim Chen [mailto:tim.c.chen@linux.intel.com] Sent: Thursday, June 17, 2021 9:28 AM To: Song Bao Hua (Barry Song) song.bao.hua@hisilicon.com; yangyicong yangyicong@huawei.com; linaro-open-discussions@op-lists.linaro.org Cc: guodong.xu@linaro.org; tangchengchang tangchengchang@huawei.com; Zengtao (B) prime.zeng@hisilicon.com; tiantao (H) tiantao6@hisilicon.com; Jonathan Cameron jonathan.cameron@huawei.com; Linuxarm linuxarm@huawei.com Subject: Re: [PATCH 0/3] cluster-scheduler upstream plan
On 6/16/21 2:36 AM, Barry Song wrote:
Hi Tim, I'd like to introduce my colleague Yicong to you. Yicong is also working on scheduler with me.
Hi Yicong and Tim, I am planning to send the normal patchset not RFC after 5.14-rc1 if this patchset from TianTao can be merged before that:
https://lore.kernel.org/lkml/1622712162-7028-1-git-send-email-tiantao6@his ilicon.com/
But firstly, I will only send the patchset supporting spreading as packing path is quite tricky. If we put them together, hardly maintainers can review it. Since SCHED_CLUSTER's default status is disabled in Kconfig, lacking the consideration of packing path won't hurt those workloads who like packing.
Three patches in this email thread are for the first patchset with spreading path only. Note patch 1/3 will be rebased againest:
https://lore.kernel.org/lkml/1622712162-7028-1-git-send-email-tiantao6@his ilicon.com/
https://lore.kernel.org/lkml/20210611052249.25776-1-song.bao.hua@hisilicon .com/
In the commit log, I put some TODOs which might need some benchmark data from Tim and Yicong.
Hi Tim, we don't have Jacobsville machine, I will appreciate a lot if you can provide some benchmark data for x86. Would you please work on this?
Barry,
I did a quick test, not on SPECrate but on some simple tests. This patchset will work okay for cpu bound tasks. But for tasks with sleep and wake up, we want to find the cpu in the same cluster first. Otherewise the wakeup will not respect the cluster.
Tim, thanks for your testing. I think this is as expected. My plan is upstreaming the whole cluster scheduler in two stages. 1. patchset to support the basic cluster topology and support spreading tasks only. 2. patchset to support wake_up path to support packing related tasks after 1 is done.
So in 1, cluster_sched is default disabled. And in the commit log, we will mention 2 is not supported yet. Since 2 is much more tricky than 1, if 1 and 2 are put together, I am worried it is difficult for maintainers to review it.
So in the 1st patchset, we give some workload examples which like spreading and also say packing workload won't get benefit and it will be supported in a separate patchset afterwards. Does it make sense to you?
In my 2/3, I tested stream, lkp-compress(lkp-pbzip2), kernbench, they were improved.
Thanks Barry
Tim
Thanks Barry
Barry Song (1): scheduler: add scheduler level for clusters
Jonathan Cameron (1): topology: Represent clusters of CPUs within a die
Tim Chen (1): scheduler: Add cluster scheduler level for x86
Documentation/admin-guide/cputopology.rst | 26 +++++++-- arch/arm64/Kconfig | 7 +++ arch/arm64/kernel/topology.c | 2 + arch/x86/Kconfig | 8 +++ arch/x86/include/asm/smp.h | 7 +++ arch/x86/include/asm/topology.h | 3 + arch/x86/kernel/cpu/cacheinfo.c | 1 + arch/x86/kernel/cpu/common.c | 3 + arch/x86/kernel/smpboot.c | 44 ++++++++++++++- drivers/acpi/pptt.c | 67 +++++++++++++++++++++++ drivers/base/arch_topology.c | 15 +++++ drivers/base/topology.c | 10 ++++ include/linux/acpi.h | 5 ++ include/linux/arch_topology.h | 5 ++ include/linux/sched/topology.h | 7 +++ include/linux/topology.h | 13 +++++ kernel/sched/topology.c | 5 ++ 17 files changed, 223 insertions(+), 5 deletions(-)