Hi Shrikanth,

On 5/27/2026 3:01 PM, Shrikanth Hegde wrote:
Hi Chen, Prateek.

I got back to work today, sorry for delay.
I am trying to go through the mails.
Apologies in case i have missed any bits.


Thanks for taking a look at this!

On 5/26/26 7:38 PM, Chen Yu wrote:
Hi Prateek,

On Tue, 26 May 2026 11:23:59 +0530, K Prateek Nayak <[email protected]> wrote:
Hello Srikar,

On 5/26/2026 10:28 AM, Srikar Dronamraju wrote:
L2 Cache reported here is for SMT8 Core aka CACHE domain.

Apart for the scheduler, nothing in tree currently cares about
cpu_coregroup_mask() except for drivers/base/arch_topology.c but
Power doesn't select GENERIC_ARCH_TOPOLOGY.

Why can't Power have an internal mask for MC domain (tl_mc_mask) and
the scheduler can use cpu_coregroup_mask() for the actual LLc? (The L2
mask in this case.)

This seems wrong. there is no notion that coregroup_mask
(MC domain) has to point at LLC domain.

For example, on Shared LPAR, there is no MC domain and LLC is at SMT core level.
In that case coregroup_mask has point at SMT mask is wrong.


On Shared LPAR, highest_flag_domain(SD_SHARE_LLC) selected the
SMT domain(L2 shared)prior to commit b5ea300a17e3.
Prateek suggested changing cpu_coregroup_mask() to use
cpu_l2_cache_mask(), which makes the LLC mask cover the same range.
sd_llc, size and grouping remain unchanged. Only sd_llc_id becomes
contiguous, which aligns with the intent of this commit.

But yes, the naming is confusing. cpu_coregroup_mask suggests a
"group of cores", but after the change, it only covers threads
within a single SMT core.

If we need a mask to point to the LLC mask which arch has to return, then we would
need a new api say cpu_llc_mask ? that can point accordingly.


Do you mean something like this?
https://lore.kernel.org/lkml/[email protected]/

I don't like mixing MC domain and LLC into one bit.


[ ... ]

  struct cpumask *cpu_coregroup_mask(int cpu)
  {
-    return per_cpu(cpu_coregroup_map, cpu);
+    return cpu_l2_cache_mask(cpu);
+}

This looks wrong to me too. In different hardware topologies
there maybe distinction between coregroup and l2 mask.

Let me go through the code and see if there is better way.


Sure, please go ahead - I'm on board with the direction
you settle on.

thanks,
Chenyu


Reply via email to