Re: [PATCH RFC] sched_ext: Choose prev_cpu if idle and cache affine without WF_SYNC

From: Joel Fernandes
Date: Mon Mar 17 2025 - 18:45:54 EST




On 3/17/2025 11:25 PM, Tejun Heo wrote:
> Hello,
>
> On Mon, Mar 17, 2025 at 11:07:36PM +0100, Joel Fernandes wrote:
> ...
>>> I think it's preferring idle core a
>>> bit too much - it probably doesn't make sense to cross the NUMA boundary if
>>> there is an idle CPU in this node, at least.
>>
>> Yes, that is a bit extreme. I believe that is what my patch is fixing. If
>> previous CPU and current CPU share cache, we prefer busy cores with free
>> previous idle SMT, otherwise go looking for fully idle cores. But it sounds like
>> from Peter's reply that is not necessarily a good thing to do in case 'fast
>> numa'. So I guess there is no good answer (?) or way of doing it.
>
> Yeah, recent AMD CPUs can be configured into NUMA mode where each chiplet is
> reported as a node and they do behave like one as each has its own memory
> connection but the distances among them are significantly closer than
> traditional multi-socket. That said, I think the implementation is still a
> bit too happy to jump the boundary. What Andrea is suggesting seems
> reasonable?
>

Thanks for sharing the AMD configurations. Yeah, agreed on Andrea's suggestion.

- Joel