mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Rik van Riel <riel@surriel.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Quentin Perret <quentin.perret@arm.com>,
	Valentin Schneider <valentin.schneider@arm.com>,
	Patrick Bellasi <patrick.bellasi@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/7] sched/fair: Rename weighted_cpuload() to cpu_load()
Date: Mon, 27 May 2019 21:13:20 +0200	[thread overview]
Message-ID: <20190527191320.GH2623@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <686351aab73911569a7c22a7e104d1b9f0d579b9.camel@surriel.com>

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 :/

  reply	other threads:[~2019-05-27 19:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  6:21 [PATCH 0/7] sched: Remove per rq load array Dietmar Eggemann
2019-05-27  6:21 ` [PATCH 1/7] sched: Remove rq->cpu_load[] update code Dietmar Eggemann
2019-05-27 16:09   ` Rik van Riel
2019-06-03 13:02   ` [tip:sched/core] sched/fair: Remove the " tip-bot for Dietmar Eggemann
2019-05-27  6:21 ` [PATCH 2/7] sched/fair: Replace source_load() & target_load() w/ weighted_cpuload() Dietmar Eggemann
2019-05-27 16:09   ` Rik van Riel
2019-05-28 10:24   ` Dietmar Eggemann
2019-05-28 10:53     ` Peter Zijlstra
2019-06-03 13:02   ` [tip:sched/core] sched/fair: Replace source_load() & target_load() with weighted_cpuload() tip-bot for Dietmar Eggemann
2019-05-27  6:21 ` [PATCH 3/7] sched/debug: Remove sd->*_idx range on sysctl Dietmar Eggemann
2019-05-27 16:10   ` Rik van Riel
2019-06-03 13:03   ` [tip:sched/core] " tip-bot for Dietmar Eggemann
2019-05-27  6:21 ` [PATCH 4/7] sched: Remove rq->cpu_load[] Dietmar Eggemann
2019-05-27 16:10   ` Rik van Riel
2019-06-03 13:04   ` [tip:sched/core] sched/core: " tip-bot for Dietmar Eggemann
2019-05-27  6:21 ` [PATCH 5/7] sched: Remove sd->*_idx Dietmar Eggemann
2019-05-27 16:12   ` Rik van Riel
2019-06-03 13:04   ` [tip:sched/core] sched/core: " tip-bot for Dietmar Eggemann
2019-05-27  6:21 ` [PATCH 6/7] sched/fair: Remove sgs->sum_weighted_load Dietmar Eggemann
2019-05-27 14:07   ` Vincent Guittot
2019-05-27 16:13   ` Rik van Riel
2019-06-03 13:05   ` [tip:sched/core] " tip-bot for Dietmar Eggemann
2019-05-27  6:21 ` [PATCH 7/7] sched/fair: Rename weighted_cpuload() to cpu_load() Dietmar Eggemann
2019-05-27 13:31   ` Vincent Guittot
2019-05-27 16:24   ` Rik van Riel
2019-05-27 19:13     ` Peter Zijlstra [this message]
2019-06-18 12:23       ` Dietmar Eggemann
2019-06-25  8:29         ` [tip:sched/core] sched/fair: Rename weighted_cpuload() to cpu_runnable_load() tip-bot for Dietmar Eggemann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190527191320.GH2623@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=patrick.bellasi@arm.com \
    --cc=quentin.perret@arm.com \
    --cc=riel@surriel.com \
    --cc=tglx@linutronix.de \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®