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]
Date:	Sat, 19 Mar 2016 10:20:21 +1100
From:	Michael Neuling <mikey@...ling.org>
To:	benh@....ibm.com,
	Shilpasri G Bhat <shilpa.bhat@...ux.vnet.ibm.com>,
	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org
Cc:	ego@...ux.vnet.ibm.com, linux-pm@...r.kernel.org,
	shreyas@...ux.vnet.ibm.com, rjw@...ysocki.net, pc@...ibm.com,
	viresh.kumar@...aro.org, anton@...ba.org
Subject: Re: [PATCH v8 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from
 hot-path

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ