public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Oliver O'Halloran <oohall@gmail•com>
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH 4/5] powerpc/smp: add cpu_cache_mask
Date: Tue, 28 Mar 2017 12:05:58 +1100	[thread overview]
Message-ID: <87k27ab47d.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <CAOSf1CF6BHr+T8r+0kV8sk0-NzfzLf=dwxpJkK0gCofMa_TPAg@mail.gmail.com>

Oliver O'Halloran <oohall@gmail•com> writes:

> On Wed, Mar 15, 2017 at 10:26 PM, Michael Ellerman <mpe@ellerman•id.au> wrote:
>> Oliver O'Halloran <oohall@gmail•com> writes:
>>
>>> 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.
>
>> 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.

>> 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

  reply	other threads:[~2017-03-28  1:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02  0:49 [PATCH 1/5] powerpc/smp: use cpu_to_chip_id() to find siblings Oliver O'Halloran
2017-03-02  0:49 ` [PATCH 2/5] powerpc/smp: add set_cpus_related() Oliver O'Halloran
2017-03-15 11:18   ` Michael Ellerman
2017-03-23  1:27     ` Oliver O'Halloran
2017-03-28  1:15       ` Michael Ellerman
2017-03-02  0:49 ` [PATCH 3/5] powerpc/smp: Add update_cpu_masks() Oliver O'Halloran
2017-03-15 11:18   ` Michael Ellerman
2017-03-02  0:49 ` [PATCH 4/5] powerpc/smp: add cpu_cache_mask Oliver O'Halloran
2017-03-15 11:26   ` Michael Ellerman
2017-03-23  3:33     ` Oliver O'Halloran
2017-03-28  1:05       ` Michael Ellerman [this message]
2017-03-02  0:49 ` [PATCH 5/5] powerpc/smp: Add Power9 scheduler topology Oliver O'Halloran
2017-03-02 10:25   ` Balbir Singh
2017-03-15 11:33     ` Michael Ellerman
2017-03-15 11:30   ` Michael Ellerman
2017-03-02  3:44 ` [PATCH 1/5] powerpc/smp: use cpu_to_chip_id() to find siblings Balbir Singh
2017-03-15 11:18 ` Michael Ellerman
2017-03-23  1:09   ` Oliver O'Halloran
2017-03-28  3:03     ` Michael Ellerman
2017-03-28  3:23       ` Oliver O'Halloran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k27ab47d.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=oohall@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox