From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Shrikanth Hegde <sshegde@linux.ibm.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: "Chen, Yu C" <yu.c.chen@intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Doug Nelson <doug.nelson@intel.com>,
Mohini Narkhede <mohini.narkhede@intel.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched: Skip useless sched_balance_running acquisition if load balance is not due
Date: Thu, 17 Apr 2025 16:40:50 +0530 [thread overview]
Message-ID: <d6cae7a6-8772-4523-a039-b8e2205f89f9@amd.com> (raw)
In-Reply-To: <6fe46df2-2c80-4e2f-89a4-43f79e554f65@linux.ibm.com>
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
next prev parent reply other threads:[~2025-04-17 11:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 3:58 Tim Chen
2025-04-16 5:30 ` Shrikanth Hegde
2025-04-16 6:28 ` Chen, Yu C
2025-04-16 9:16 ` Shrikanth Hegde
2025-04-16 9:29 ` Shrikanth Hegde
2025-04-16 9:47 ` Vincent Guittot
2025-04-16 14:14 ` Shrikanth Hegde
2025-04-17 11:10 ` K Prateek Nayak [this message]
2025-04-18 15:02 ` Vincent Guittot
2025-04-18 17:55 ` Shrikanth Hegde
2025-04-17 11:31 ` K Prateek Nayak
2025-04-17 12:01 ` Peter Zijlstra
2025-04-18 5:26 ` K Prateek Nayak
2025-04-18 9:28 ` Peter Zijlstra
2025-04-18 12:13 ` K Prateek Nayak
2025-04-16 16:19 ` Tim Chen
2025-04-16 17:11 ` Shrikanth Hegde
2025-04-17 9:19 ` Shrikanth Hegde
2025-04-17 17:12 ` Tim Chen
2025-05-29 9:00 ` K Prateek Nayak
2025-06-04 4:26 ` Chen, Yu C
2025-06-06 13:51 ` Vincent Guittot
2025-10-27 18:06 ` Mel Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d6cae7a6-8772-4523-a039-b8e2205f89f9@amd.com \
--to=kprateek.nayak@amd.com \
--cc=doug.nelson@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mohini.narkhede@intel.com \
--cc=peterz@infradead.org \
--cc=sshegde@linux.ibm.com \
--cc=tim.c.chen@linux.intel.com \
--cc=vincent.guittot@linaro.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®