[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YiuUGi0cFyLHZhAI@fedora>
Date: Fri, 11 Mar 2022 10:25:30 -0800
From: Darren Hart <darren@...amperecomputing.com>
To: Qing Wang <wangqing@...o.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Sudeep Holla <sudeep.holla@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] sched: topology: make cache topology separate from
cpu topology
On Thu, Mar 10, 2022 at 07:25:33PM -0800, Qing Wang wrote:
> From: Wang Qing <wangqing@...o.com>
>
> Some architectures(e.g. ARM64), caches are implemented like below:
> SD(Level 1): ************ DIE ************
> SD(Level 0): **** MC **** **** MC *****
> cluster: **cluster 0** **cluster 1**
> cores: 0 1 2 3 4 5 6 7
> cache(Level 1): C C C C C C C C
> cache(Level 2): **C** **C** **C** **C**
> cache(Level 3): *******shared Level 3********
> sd_llc_id(current): 0 0 0 0 4 4 4 4
> sd_llc_id(should be): 0 0 2 2 4 4 6 6
Should cluster 0 and 1 span the same cpu mask as the MCs? Based on how
you describe the cache above, it seems like what you are looking for
would be:
(SD DIE level removed in favor of the same span MC)
SD(Level 1): ************ MC ************
SD(Level 0): *CLS0* *CLS1* *CLS2* *CLS3* (CONFIG_SCHED_CLUSTER)
cores: 0 1 2 3 4 5 6 7
cache(Level 1): C C C C C C C C
cache(Level 2): **C** **C** **C** **C**
cache(Level 3): *******shared Level 3********
Provided cpu_coregroup_mask and cpu_clustergroup_mask return the
corresponding cpumasks, this should work with the default sched domain
topology.
It looks to me like the lack of nested cluster support in
parse_cluster() in drivers/base/arch_topology.c is what needs to be
updated to accomplish the above. With cpu_topology[cpu].cluster_sibling and
core_sibling updated to reflect the topology you describe, the rest of
the sched domains construction would work with the default sched domain
topology.
I'm not very familiar with DT, especially the cpu-map. Does your DT
reflect the topology you want to build?
--
Darren Hart
Ampere Computing / OS and Kernel
Powered by blists - more mailing lists