[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a5a5f1f-0bbc-4a63-b2aa-67bc6c724b2d@amd.com>
Date: Thu, 17 Apr 2025 17:01:37 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>, Shrikanth Hegde
<sshegde@...ux.ibm.com>
CC: "Chen, Yu C" <yu.c.chen@...el.com>, Tim Chen <tim.c.chen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>, Doug
Nelson <doug.nelson@...el.com>, Mohini Narkhede <mohini.narkhede@...el.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: Skip useless sched_balance_running acquisition if
load balance is not due
On 4/16/2025 3:17 PM, Vincent Guittot wrote:
>>
>> Sorry, forgot to add.
>>
>> Do we really need newidle running all the way till NUMA? or if it runs till PKG is it enough?
>> the regular (idle) can take care for NUMA by serializing it?
>>
>> - if (sd->flags & SD_BALANCE_NEWIDLE) {
>> + if (sd->flags & SD_BALANCE_NEWIDLE && !(sd->flags & SD_SERIALIZE)) {
>
> Why not just clearing SD_BALANCE_NEWIDLE in your sched domain when you
> set SD_SERIALIZE
I've some questions around "sched_balance_running":
o Since this is a single flag across the entire system, it also implies
CPUs cannon concurrently do load balancing across different NUMA
domains which seems reasonable since a load balance at lower NUMA
domain can potentially change the "nr_numa_running" and
"nr_preferred_running" stats for the higher domain but if this is the
case, a newidle balance at lower NUMA domain can interfere with a
concurrent busy / newidle load balancing at higher NUMA domain.
Is this expected? Should newidle balance be serialized too?
(P.S. I copied over the serialize logic from sched_balance_domains()
into sched_balance_newidle() and did not see any difference in my
testing but perhaps there are benchmarks out there that care for
this)
o If the intention of SD_SERIALIZE was to actually "serializes
load-balancing passes over large domains (above the NODE topology
level)" as the comment above "sched_balance_running" states, and
this question is specific to x86 - when enabling SNC on Intel or
NPS on AMD servers, the first NUMA domain is in fact as big as the
NODE (now PKG domain) if not smaller. Is it okay to clear
SD_SERIALIZE for these domains since they are small enough now?
--
Thanks and Regards,
Prateek
Powered by blists - more mailing lists