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]
Message-ID: <20190527191320.GH2623@hirez.programming.kicks-ass.net>
Date:   Mon, 27 May 2019 21:13:20 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Rik van Riel <riel@...riel.com>
Cc:     Dietmar Eggemann <dietmar.eggemann@....com>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Quentin Perret <quentin.perret@....com>,
        Valentin Schneider <valentin.schneider@....com>,
        Patrick Bellasi <patrick.bellasi@....com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] sched/fair: Rename weighted_cpuload() to cpu_load()

On Mon, May 27, 2019 at 12:24:07PM -0400, Rik van Riel wrote:
> On Mon, 2019-05-27 at 07:21 +0100, Dietmar Eggemann wrote:
> > This is done to align the per cpu (i.e. per rq) load with the util
> > counterpart (cpu_util(int cpu)). The term 'weighted' is not needed
> > since there is no 'unweighted' load to distinguish it from.
> 
> I can see why you want to make cpu_util() and cpu_load()
> have the same parameter, but ...
> 
> > @@ -7931,7 +7928,7 @@ static inline void update_sg_lb_stats(struct
> > lb_env *env,
> >  		if ((env->flags & LBF_NOHZ_STATS) &&
> > update_nohz_stats(rq, false))
> >  			env->flags |= LBF_NOHZ_AGAIN;
> >  
> > -		sgs->group_load += weighted_cpuload(rq);
> > +		sgs->group_load += cpu_load(i);
> >  		sgs->group_util += cpu_util(i);
> >  		sgs->sum_nr_running += rq->cfs.h_nr_running;
> 
> ... now we end up dereferencing cpu_rq(cpu) 3 times.
> 
> I guess per-cpu variables are so cheap that we should
> never notice, but I thought I'd ask anyway while looking
> over these patches :)

I was going to say CSE should fix that, but then I noticed per_cpu
contains that hideous RELOC_HIDE() thing and I figure that might
confuse GCC enough to break that :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ