[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <05b5e603-5263-dfc4-f7d3-14febc4f648a@loongson.cn>
Date: Wed, 30 Apr 2025 09:16:43 +0800
From: Tianyang Zhang <zhangtianyang@...ngson.cn>
To: Huacai Chen <chenhuacai@...nel.org>, Xi Ruoyao <xry111@...111.site>
Cc: kernel@...0n.name, wanghongliang@...ngson.cn, yangtiezhu@...ngson.cn,
loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] LoongArch:support CONFIG_SCHED_MC
Hi, Huacai
在 2025/4/29 下午7:52, Huacai Chen 写道:
> On Tue, Apr 29, 2025 at 7:44 PM Xi Ruoyao <xry111@...111.site> wrote:
>> On Tue, 2025-04-29 at 19:33 +0800, Tianyang Zhang wrote:
>>> From: wanghongliang <wanghongliang@...ngson.cn>
>>>
>>> In order to achieve more reasonable load balancing behavior,
>>> support for SCHED_MC has been added.
>>> The LLC distribution of Loongarch now is consistent with numa-node,
>>> the balancing domain of SCHED_MC can effectively reduce the situation
>>> where processes are awakened to smt_slibing
>>>
>>> Co-developed-by: wanghongliang <wanghongliang@...ngson.cn>
>>> Signed-off-by: wanghongliang <wanghongliang@...ngson.cn>
>>> Signed-off-by: Tianyang Zhang <zhangtianyang@...ngson.cn>
>>> ---
>>> arch/loongarch/Kconfig | 9 ++++++
>>> arch/loongarch/include/asm/smp.h | 1 +
>>> arch/loongarch/include/asm/topology.h | 8 +++++
>>> arch/loongarch/kernel/smp.c | 46 +++++++++++++++++++++++++++
>>> 4 files changed, 64 insertions(+)
>>>
>>> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
>>> index 1a2cf012b..72a142a85 100644
>>> --- a/arch/loongarch/Kconfig
>>> +++ b/arch/loongarch/Kconfig
>>> @@ -493,6 +493,15 @@ config NR_CPUS
>>> This allows you to specify the maximum number of CPUs which this
>>> kernel will support.
>>>
>>> +config SCHED_MC
>>> + def_bool y
>>> + prompt "Multi-core scheduler support"
>>> + depends on SMP
>>> + help
>>> + Multi-core scheduler support improves the CPU scheduler's decision
>>> + making when dealing with multi-core CPU chips at a cost of slightly
>>> + increased overhead in some places. If unsure say N here.
>> To me it's puzzling to say "if unsure say N here" while setting the
>> default to y.
> It seems copied from x86, I suggest to modify to
>
> +config SCHED_MC
> + bool "Multi-core scheduler support"
> + depends on SMP
> + default y
> + help
> + Multi-core scheduler support improves the CPU scheduler's decision
> + making when dealing with multi-core CPU chips at a cost of slightly
> + increased overhead in some places.
>
> And put it after SCHED_SMT.
OK , I got it
Thanks
>
> Huacai
>
>
>> --
>> Xi Ruoyao <xry111@...111.site>
>> School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists