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] [day] [month] [year] [list]
Date:	Fri, 4 Mar 2016 11:11:28 +0800
From:	Huang Rui <ray.huang@....com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Borislav Petkov <bp@...e.de>,
	Peter Zijlstra <peterz@...radead.org>,
	"Ingo Molnar" <mingo@...nel.org>,
	Andy Lutomirski <luto@...capital.net>,
	"Robert Richter" <rric@...nel.org>,
	Jacob Shin <jacob.w.shin@...il.com>,
	"Arnaldo Carvalho de Melo" <acme@...nel.org>,
	Kan Liang <kan.liang@...el.com>,
	<linux-kernel@...r.kernel.org>, <spg_linux_kernel@....com>,
	<x86@...nel.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@....com>,
	Borislav Petkov <bp@...en8.de>,
	"Fengguang Wu" <fengguang.wu@...el.com>,
	Guenter Roeck <linux@...ck-us.net>
Subject: Re: [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power
 reporting mechanism

On Thu, Mar 03, 2016 at 06:57:53PM +0100, Thomas Gleixner wrote:
> On Fri, 4 Mar 2016, Huang Rui wrote:
> > On Thu, Mar 03, 2016 at 04:26:46PM +0100, Thomas Gleixner wrote:
> > > Why? You do a full for_each_online_cpu(i) loop after that, which does
> > > exactly the same thing, right?
> > >  
> > 
> > But looks like power_cpu_init cannot handle it if we don't take any
> > action here.
> > 
> > e. g. 
> > cpu_mask: 0000 and online mask: 1111 -> power_cpu_init(0) -> cpu_mask is still: 0000
> > 
> > topology_sibling_cpumask(0): 0011
> > target: 1 (i. e. we cannot do cpumask_set_cpu(0, &cpu_mask))
> 
> Fair enough, but then you don't need the power_cpu_init() call at all.
> 
> But your loop does not cover anything beyond the first socket. So you need a
> separate init function which does:
> 
>    for_each_online_cpu(cpu) {
>    	target = cpumask_first(topology_sibling_cpumask(cpu));
> 	if (!cpumask_test_cpu(target, cpumask))
> 	   	cpumask_set_cpu(target, cpumask);
>    }	      
> 	   	

Looks good. Thanks Thomas. Will update it.

Rui

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ