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


Groups > linux.kernel > #1336618

Re: [PATCH v3] powercap/rapl: reduce ipi calls

From Jacob Pan <jacob.jun.pan@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] powercap/rapl: reduce ipi calls
Date 2016-02-17 19:10 +0100
Message-ID <r3eI2-1Fz-5@gated-at.bofh.it> (permalink)
References <qRhV1-1WI-43@gated-at.bofh.it> <r2C9I-dV-3@gated-at.bofh.it> <r3cPU-l3-5@gated-at.bofh.it>
Organization OTC

Show all headers | View raw


On Wed, 17 Feb 2016 17:04:41 +0100 (CET)
Thomas Gleixner <tglx@linutronix.de> wrote:

> > >  
> > >  	for_each_online_cpu(i) {
> > >  		if (topology_physical_package_id(i) ==
> > > package_id)  
> 
> This is still crap. We really want a proper handling for that which
> does not require these silly for_each_cpu() loops.
> 
> That code already has a hotplug notifier, so you can track one online
> cpu in the package like we do in cqm and other facilities.
> 
> The first online cpu of a package sets itself as 'owner'. On unplug
> it looks up:
> 
> 	rpl->cpu = cpumask_any_but(topology_core_cpumask(cpu), cpu);
> 
> So if this is the last cpu then rpl->cpu becomes nr_cpu_ids.
> 
> So that whole nonsense can be avoided completely.
ok, that would work nicely, similar to cqm_pick_event_reader().
thanks for the tip. just fyi, unlike perf cqm, rapl runtime change is
expected to be low frequency.

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


Thread

Re: [PATCH v3] powercap/rapl: reduce ipi calls "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-16 02:00 +0100
  Re: [PATCH v3] powercap/rapl: reduce ipi calls Thomas Gleixner <tglx@linutronix.de> - 2016-02-17 17:10 +0100
    Re: [PATCH v3] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-02-17 19:10 +0100
      Re: [PATCH v3] powercap/rapl: reduce ipi calls Thomas Gleixner <tglx@linutronix.de> - 2016-02-17 19:30 +0100

csiph-web