Thread (20 messages) flat view 20 messages, 3 authors, 2017-03-28

Re: [PATCH 4/5] powerpc/smp: add cpu_cache_mask

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-03-28 01:05:59

Oliver O'Halloran [off-list ref] writes:
On Wed, Mar 15, 2017 at 10:26 PM, Michael Ellerman [off-list ref] wrote:
quoted
Oliver O'Halloran [off-list ref] writes:
quoted
Traditionally we have only ever tracked which CPUs are in the same core
(cpu_sibling_mask) and on the same die (cpu_core_mask). For Power9 we
need to be aware of which CPUs share cache with each other so this patch
adds cpu_cache_mask and the underlying cpu_cache_map variable to track
this.
quoted
Some CPUs on Power8 share L3, or L4.
Eh... it's not really the same. The "L4" is part of the memory buffers
and it's function is conceptually different to the processor caches.
The L3 on P8 is only shared when the core that owns is offline (or
sleeping) so the scheduler doesn't really need to be aware of it.
But that's exactly my point, this mask only tracks whether CPUs share an
L2, so it should be named as such.
quoted
I think just call it cpu_l2cache_map to make it explicit.
I was being deliberately vague. I know it's only a shared currently,
but it's possible we might have a (real) shared L3 in the future. The
latest high-end x86 chips have some of l3 sharing across the entire
chip so you never know.
Sure, but in that case we'd probably want a new mask to track which CPUs
share L3, because we'd probably also have CPUs sharing L2, and those
masks might not be equal.

But if I'm wrong we can just rename it *then*.
I'm not particularly attached to the name though, so i'll rename it
if you really want.
Yes please.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help