[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6cae7a6-8772-4523-a039-b8e2205f89f9@amd.com>
Date: Thu, 17 Apr 2025 16:40:50 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>, Vincent Guittot
<vincent.guittot@...aro.org>
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
Hello Shrikanth,
On 4/16/2025 7:44 PM, Shrikanth Hegde wrote:
> Slightly different topic: It(kernel parameter) also resets SHCED_BALANCE_WAKE. But is it being used?
> I couldn't find out how it is used.
So the usage is very convoluted. SHCED_BALANCE_WAKE is same as WF_TTWU.
kernel/sched/sched.h makes sure of it, with some static asserts. In
select_task_rq_fair(), the for_each_domain() loop has:
if (tmp->flags & sd_flag)
sd = tmp;
where sd_flag is (wake_flags & 0xF)
This boils down to (sd->flags & SD_BALANCE_FORK) for fork (WF_FORK) and
(sd->flags & SHCED_BALANCE_WAKE) for wakeup (WF_TTWU). There is more
convoluted interaction with arch specific "node_reclaim_distance" that
can clear SD_BALANCE_FORK, SD_BALANCE_EXEC, and SD_WAKE_AFFINE if a
node is deemed very far to explore balance on wakeup / fork.
Probably some of these flags can be merged now that things have
evolved but it requires a bit of auditing before jumping in.
--
Thanks and Regards,
Prateek
Powered by blists - more mailing lists