From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Christian Loehle <christian.loehle@arm.com>,
"Shubhang Kaushik (Ampere)" <sh@gentwo.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>
Cc: "Christoph Lameter (Ampere)" <cl@gentwo.org>,
Shubhang Kaushik <shubhang@os.amperecomputing.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] sched/fair: Prefer waker CPU for reciprocal sync wakeups
Date: Thu, 23 Jul 2026 11:59:01 +0530 [thread overview]
Message-ID: <7edc6b10-2f0a-403a-9edb-95b89adfbc09@amd.com> (raw)
In-Reply-To: <8641b701-c9a2-4b8e-a248-5f7ff7ac8f0c@arm.com>
Hello Christian,
On 7/23/2026 11:41 AM, Christian Loehle wrote:
>> +/*
>> + * For reciprocal WF_SYNC handoffs, prefer the waker CPU when it has no
>> + * other runnable fair task.
>> + */
>> +static bool prefer_sync_pair_cpu(struct task_struct *p, int cpu)
>> +{
>> + struct rq *rq = cpu_rq(cpu);
>> +
>> + if ((rq->nr_running - cfs_h_nr_delayed(rq)) != 1)
>> + return false;
>> +
>> + if (!cpumask_test_cpu(cpu, p->cpus_ptr))
>> + return false;
>> +
>> + if (sched_asym_cpucap_active()) {
>> + sync_entity_load_avg(&p->se);
>> + if (!task_fits_cpu(p, cpu))
>> + return false;
>> + }
>> +
>> + return true;
>> +}
>
> Maybe @Prateek:
> What about SMT, would we want to require the sibling to be idle too?
I think we should pass the wake_flags to select_idle_sibling() and do
an early return there within the (sched_smt_active() && !has_idle_core)
block.
> I would appreciate a bench sched pipe on SMT result, if Shubhang doesn't
> have one I can dust one off, too.
Let me give it a spin on my end too.
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-07-23 6:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 22:50 Shubhang Kaushik (Ampere)
2026-07-23 3:48 ` K Prateek Nayak
2026-07-24 0:35 ` Shubhang
2026-07-23 6:11 ` Christian Loehle
2026-07-23 6:29 ` K Prateek Nayak [this message]
2026-07-24 12:50 ` Madadi Vineeth Reddy
2026-07-24 16:08 ` Shubhang
2026-07-29 18:06 ` Shubhang
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=7edc6b10-2f0a-403a-9edb-95b89adfbc09@amd.com \
--to=kprateek.nayak@amd.com \
--cc=bsegall@google.com \
--cc=christian.loehle@arm.com \
--cc=cl@gentwo.org \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sh@gentwo.org \
--cc=shubhang@os.amperecomputing.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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®