Thread (16 messages) 16 messages, 4 authors, 5d ago

Re: [PATCH 0/4] powerpc/topology: Introduce llc_override debugfs

flat view

From: Srikar Dronamraju <hidden>
Date: 2026-10-14 03:57:19
Also in: lkml

* Shrikanth Hegde [off-list ref] [2026-10-14 08:46:11]:
On 10/14/26 2:14 AM, Tim Chen wrote:
quoted
On Tue, 2026-10-13 at 15:28 +0530, Shrikanth Hegde wrote:
quoted

- SMT: patch 3 adds SD_SHARE_LLC only to MC/PKG, so for "smt" the
   flags are as before. I think it is possible for P9 to have
   shared_caches between two cores:

   /*
    * P9 has a slightly odd architecture where pairs of cores share an L2 cache.
    * This topology makes it *much* cheaper to migrate tasks between adjacent cores
    * since the migrated task remains cache hot. We want to take advantage of this
    * at the scheduler level so an extra topology level is required.
    */

   the CACHE level also has SD_SHARE_LLC, and highest_flag_domain() picks it, so sd_llc spans
   cpu_l2_cache_map. shared_caches is only set when that map is wider
   than the core's threads, e.g. a P9 core pair sharing an L2:

     CPU:               0 1 2 3 | 4 5 6 7
     cpu_smt_mask():    core A  | core B
     sd_llc (CACHE):    0-7

   The ids follow cpu_smt_mask(), so 0-3 and 4-7 get different ids
   while sd_llc and sd_llc_size cover all eight, and
   cpus_share_cache(0, 4) is false, which is incorrect.
Yes. I doubt anyone wants to try this experiment on Power9.
But yes, functionally updating the flags is needed.

@srikar,
That is also the reason for having the disabled. By default on P9,
llc will be at CACHE domain. But, one may want to experiment with =smt
which i doubt anyone will ever do.
I think P9 is a very valid point, but I don't think we should look at disable
as an option just for this.

I would say, lets keep it simple now, just have an option rather a toggle to
have LLC as MC/PKG for experimentation purpose. Switch the toggle and it
does back to regular LLC mode. Also we don't know how the future Power
Systems LLCs will look like. So keeping it a simple toggle, will reduce pain
and increase our flexibility for the future.

Whether the toggle will switch to MC or PKG could be decided based on the
experiment results.

-- 
Thanks and Regards
Srikar Dronamraju
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help