[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H7BejoBtsGWP8tn99Pa93M0ij=yXg_E+GJKLETYWhCt3A@mail.gmail.com>
Date: Tue, 29 Apr 2025 19:52:59 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Xi Ruoyao <xry111@...111.site>
Cc: Tianyang Zhang <zhangtianyang@...ngson.cn>, 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
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.
Huacai
>
> --
> Xi Ruoyao <xry111@...111.site>
> School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists