lkml.org 
[lkml]   [2018]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86,sched: allow topologies where NUMA nodes share an LLC
On Mon, Mar 26, 2018 at 03:19:48PM -0700, Alison Schofield wrote:
> On Thu, Mar 22, 2018 at 04:30:29PM -0700, Luck, Tony wrote:
> > On Thu, Mar 22, 2018 at 01:49:22PM -0700, Alison Schofield wrote:
> > > + if (!topology_same_node(c, o) &&
> > > + (c->x86_vendor == X86_VENDOR_INTEL &&
> > > + c->x86_model == INTEL_FAM6_SKYLAKE_X)) {
> >
> > Maybe make life easier in the future to add more models
> > to the list by using x86_match_cpu() here?
> >
> > -Tony
>
> Tony -
> Am I on the right track below?
>
> Define like this:
> static const __initconst struct x86_cpu_id snc_cpu[] = {
> { X86_VENDOR_INTEL, 6, INTEL_FAM6_SKYLAKE_X },
> {}
> };
>
> Use like this:
> if (!topology_same_node(c, o) && x86_match_cpu(snc_cpu)) {

Alison,

Exactly right. You can decide how much of the comment
that was before the "if (!topology_same_node(c, o) ..."
can be moved to before the definition of snc_cpu[]. I'm
too lazy to go back to the original patch to read it, but
I suspect most/all of it would be better descibing the
data structure than cluttering up the code that uses it.

-Tony

\
 
 \ /
  Last update: 2018-03-27 00:46    [W:0.039 / U:26.260 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site