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]
Message-ID: <20160428081748.GP24771@twins.programming.kicks-ass.net>
Date:	Thu, 28 Apr 2016 10:17:48 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	acme@...nel.org, jolsa@...nel.org, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 01/11] x86, perf: Support sysfs files depending on SMT
 status

On Thu, Apr 28, 2016 at 10:06:09AM +0200, Peter Zijlstra wrote:
> On Wed, Apr 27, 2016 at 01:00:41PM -0700, Andi Kleen wrote:
> > From: Andi Kleen <ak@...ux.intel.com>
> > 
> > Add a way to show different sysfs events attributes depending on
> > HyperThreading is on or off. This is difficult to determine
> > early at boot, so we just do it dynamically when the sysfs
> > attribute is read.
> 
> Thomas would like to have this in the general (x86) topology bits.
> 
> Because having SMT enabled (or not) is not something perf specific (nor
> Intel, because apparently AMD is going to do proper SMT too with their
> Zen micro-arch), and might very well be useful for other thingies to
> know.
> 
> So I suppose it should end up somewhere around:
> 
>   /sys/devices/system/cpu/

FWIW I think we already can tell if SMT is enabled by doing something
like:

for i in /sys/devices/system/cpu/cpu*/topology/thread_siblings_list;
do
	SMT=`cat $i | awk --field-separator "," '{print NF}'`;
	if [ $SMT -gt 1 ] ; then
		echo ENABLED;
		break;
	fi;
done

With pretty much the same races as this interface has, no?

In any case, a single value is certainly easier than the above.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ