Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571999

Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID
Date 2017-02-01 22:50 +0100
Message-ID <t6aWR-3dV-9@gated-at.bofh.it> (permalink)
References <t69o6-26I-21@gated-at.bofh.it> <t6aNc-37z-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 01, 2017 at 09:37:02PM +0000, Ghannam, Yazen wrote:
> This hunk won't work for SMT enabled systems. It'll cause all threads under
> an LLC to be considered SMT siblings. For example, threads 0 &2 will have
> different cpu_core_id, so the first check will fail. But it'll match on the
> second check since cu_id will be initialized to 0.

Good catch.

> To get around this we can set cu_id for all TOPOEXT systems, and update
> cpu_core_id, etc. for SMT enabled systems. This way we can just change
> cpu_core_id to cu_id in match_smt().

Ok, so we want to init ->cu_id to something invalid then. -1, for
example and then do:

	if (c->cu_id != -1 && o->cu_id != -1 && (c->cu_id == o->cu_id))
		...

Alternatively, we can define an X86_FEATURE_COMPUTE_UNITS or so
synthetic bit which we can check.

One thing I don't want to do is reuse ->cu_id on systems which don't
have CUs.

> I tested this patch,  with the above changes, on a Fam17h SMT enabled
> system. I'll test with SMT disabled and also on a fully-loaded Fam15h
> system soon.

Thanks!

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-01 21:10 +0100
  RE: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID "Ghannam, Yazen" <Yazen.Ghannam@amd.com> - 2017-02-01 22:40 +0100
    Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-01 22:50 +0100
      RE: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID "Ghannam, Yazen" <Yazen.Ghannam@amd.com> - 2017-02-01 23:00 +0100
        Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-01 23:30 +0100
          Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-01 23:50 +0100
            Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-02 13:20 +0100
              Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-02 16:50 +0100
                Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Ingo Molnar <mingo@kernel.org> - 2017-02-02 17:20 +0100
                Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-02 18:10 +0100
                Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Borislav Petkov <bp@alien8.de> - 2017-02-02 19:20 +0100
                RE: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID "Ghannam, Yazen" <Yazen.Ghannam@amd.com> - 2017-02-02 21:50 +0100
              RE: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID "Ghannam, Yazen" <Yazen.Ghannam@amd.com> - 2017-02-02 17:20 +0100
                Re: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Ingo Molnar <mingo@kernel.org> - 2017-02-02 17:30 +0100

csiph-web