lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 16 Sep 2014 16:49:03 -0700
From:	Dave Hansen <dave@...1.net>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	hpa@...ux.intel.com, ak@...ux.intel.com,
	Alex Chiang <achiang@...com>, Borislav Petkov <bp@...e.de>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Mike Travis <travis@....com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>
Subject: Re: [PATCH] x86: Consider multiple nodes in a single socket to be
 "sane"

On 09/16/2014 10:58 AM, Peter Zijlstra wrote:
> the 'problem' is that we currently have the static order of
> the masks, if we were to flip the MC and NUMA masks we need a condition
> to do that on and make sure everything is aware of that.
> 
> CoD not being detectable sucks arse for sure :/

It's not like we can't detect it.  We just can't detect it *explicitly*.
 I think when we see nodes inside a package now, we have to trust that
they're OK.

One other data point here.  With an unpatched mainline, here's how the
sched domains look with cluster-on-die enabled:

# grep . /proc/sys/kernel/sched_domain/cpu9/domain?/name
/proc/sys/kernel/sched_domain/cpu9/domain0/name:SMT  // 2 threads
/proc/sys/kernel/sched_domain/cpu9/domain1/name:MC   // 18 threads cores
/proc/sys/kernel/sched_domain/cpu9/domain2/name:NUMA // 36 threads
/proc/sys/kernel/sched_domain/cpu9/domain3/name:NUMA // 72 threads

and with cluster-on-die disabled:

# grep . /proc/sys/kernel/sched_domain/cpu9/domain?/name
/proc/sys/kernel/sched_domain/cpu9/domain0/name:SMT
/proc/sys/kernel/sched_domain/cpu9/domain1/name:MC
/proc/sys/kernel/sched_domain/cpu9/domain2/name:NUMA

So, shockingly, the domains seem to be set up at at least conceptually
OK in both cases.

I think the domains in this case should _probably_ be conceptually:

	SMT -> COD_NUMA -> PKG -> SOCKET_NUMA

We could probably rig up sched_init_numa() to mix topology levels
between the ones that come out of sched_domain_topology and the NUMA
levels, although that doesn't sound very appealing.

Another option would be to:
1. Add a new "PKG" level and actually _build_ it with phys_proc_id
2. Make sure to tie the sysfs 'core_siblings' file to PKG
3. Leave the "MC" level as it is now, but define it as being the lowest-
   common-denominator of core grouping.  In other words, the "MC" group
   will stop at a NUMA node or a socket boundary, whichever it sees
   first.
4. Chop the "COD_NUMA" level off in sched_init_numa()

That seems a bit hackish though.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ