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


Groups > linux.kernel > #1349459

Re: [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power reporting mechanism
Date 2016-03-03 19:00 +0100
Message-ID <r8FHB-2d3-17@gated-at.bofh.it> (permalink)
References (1 earlier) <r8xgZ-4sv-9@gated-at.bofh.it> <r8xgZ-4sv-5@gated-at.bofh.it> <r8Dmq-ux-33@gated-at.bofh.it> <r8Dmq-ux-31@gated-at.bofh.it> <r8FHB-2d3-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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);
   }	      
	   	
Thanks,

	tglx

   

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


Thread

Re: [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power  reporting mechanism Thomas Gleixner <tglx@linutronix.de> - 2016-03-03 10:00 +0100
  Re: [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power  reporting mechanism Thomas Gleixner <tglx@linutronix.de> - 2016-03-03 16:30 +0100
    Re: [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power  reporting mechanism Thomas Gleixner <tglx@linutronix.de> - 2016-03-03 19:00 +0100

csiph-web