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


Groups > linux.kernel > #1360998

Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

From Michael Neuling <mikey@neuling.org>
Newsgroups linux.kernel
Subject Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path
Date 2016-03-19 00:30 +0100
Message-ID <rec0a-3uD-3@gated-at.bofh.it> (permalink)
References <qXP7A-7Ux-7@gated-at.bofh.it> <qXP7B-7Ux-15@gated-at.bofh.it> <rdTTz-se-1@gated-at.bofh.it> <rebdM-2ht-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 2016-03-19 at 09:37 +1100, Benjamin Herrenschmidt wrote:
> On Fri, 2016-03-18 at 15:04 +1100, Michael Neuling wrote:
> > 
> >  static int nr_chips;
> > +static DEFINE_PER_CPU(unsigned int, chip_id);
> >  
> >  /*
> >   * Note: The set of pstates consists of contiguous integers, the
> > @@ -317,9 +318,7 @@ static void powernv_cpufreq_throttle_check(void
> > *data)
> >  
> >         pmsr = get_pmspr(SPRN_PMSR);
> >  
> > -       for (i = 0; i < nr_chips; i++)
> > -               if (chips[i].id == cpu_to_chip_id(cpu))
> > -                       break;
> > +       i = this_cpu_read(chip_id);
> 
> Except it's not a chip_id, so your patch confused me for a good 2mn
> ...
> Call it chip_idx maybe ? ie, index.

Yeah, it was a badly named variable but I changed it even more and
Shilpasri rebased it here:

http://patchwork.ozlabs.org/patch/599523/

Mikey

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


Thread

Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from  hot-path Michael Neuling <mikey@neuling.org> - 2016-03-18 05:10 +0100
  Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from  hot-path Michael Neuling <mikey@neuling.org> - 2016-03-18 05:20 +0100
    Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-18 14:20 +0100
    [PATCH] cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> - 2016-03-18 16:00 +0100
      Re: [PATCH] cpufreq: powernv: Define per_cpu chip pointer to  optimize hot-path Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-21 08:30 +0100
        Re: [PATCH] cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-21 15:20 +0100
  Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from  hot-path Benjamin Herrenschmidt <benh@au1.ibm.com> - 2016-03-18 23:40 +0100
    Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from  hot-path Michael Neuling <mikey@neuling.org> - 2016-03-19 00:30 +0100

csiph-web