Re: [PATCH v2] sched/fair: Prefer waker CPU for reciprocal sync wakeups
From: Shubhang
Date: Fri Jul 24 2026 - 12:34:44 EST
Hi Vineeth,
On Fri, 24 Jul 2026, Madadi Vineeth Reddy wrote:
On 23/07/26 04:20, Shubhang Kaushik (Ampere) wrote:
+ READ_ONCE(p->last_wakee) == current &&
+ prefer_sync_pair_cpu(p, cpu))
+ return cpu;
The difference is SMT. POWER10/11 are SMT8: stacking there puts the pair on one thread while up to
seven siblings on the same core sit idle, sharing the same LLC.
So instead of returning the waker's CPU, I'm looking at letting the waker's *core* count as idle
when the waker's runqueue has a single runnable task, so the wakee lands on a sibling thread.
Thanks for the review, the distinction makes sense.
In the case of non-SMT, the benefit I am seeing comes from stopping SIS from moving the reciprocal WF_SYNC wakee away from the wake-affine target.
For v3, my plan is to keep this scoped to that non-SMT case under the existing SD_WAKE_AFFINE path and fold in Prateek's suggested cleanups. Would still wait for Christian/Prateek's SMT numbers to make sure this does not need additional SMT handling in this series.
Regards,
Shubhang Kaushik