Re: [PATCH v8 1/2] sched: Add per_cpu cluster domain info and cpus_share_lowest_cache API

From: Yicong Yang
Date: Tue May 30 2023 - 09:25:17 EST


On 2023/5/30 19:38, Peter Zijlstra wrote:
> On Tue, May 30, 2023 at 03:02:52PM +0800, Yicong Yang wrote:
>> From: Barry Song <song.bao.hua@xxxxxxxxxxxxx>
>>
>> Add per-cpu cluster domain info and cpus_share_lowest_cache() API.
>
> Lowest cache is weird; that would be L1, but your implementation is for
> L2/L3.
>

ok there seems a history about this naming.

In the first version we make it cpus_share_cluster(), since on non-cluster
machine it actually behaves as cpus_share_cache() so "cluster" maybe inaccurate.
Then we make it cpus_share_resources() [1]. Tim mentioned cpus_share_lowest_cache()
maybe more informative in [2] so we use it.

Since lowest cache may refer to L1 as mentioned, maybe we should use
cpus_share_resources() again to avoid confusion?

[1] https://lore.kernel.org/lkml/CAKfTPtBKLDyNPXg7uLbQ3jUnEwppfC+E29=oJ1tWzzqHsNpApw@xxxxxxxxxxxxxx/
[2] https://lore.kernel.org/lkml/05472b4ed10c694bce1a2b6dd4a0ef13ea337db3.camel@xxxxxxxxxxxxxxx/

Thanks,
Yicong