mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Brendan Jackman <brendan.jackman@arm.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH v2 2/2] sched/fair: Update blocked load from newly idle balance
Date: Thu, 21 Dec 2017 10:19:22 +0100	[thread overview]
Message-ID: <b56fe5c1-c5f7-2a59-9f7c-8d0ac8e04cc2@arm.com> (raw)
In-Reply-To: <20171220142202.2x7yx3w43wxfel7d@hirez.programming.kicks-ass.net>

On 12/20/2017 03:22 PM, Peter Zijlstra wrote:
> On Fri, Dec 01, 2017 at 06:01:57PM +0000, Brendan Jackman wrote:
>> @@ -7913,6 +7928,29 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
>>   	if (child && child->flags & SD_PREFER_SIBLING)
>>   		prefer_sibling = 1;
>>   
>> +#ifdef CONFIG_NO_HZ_COMMON
>> +	if (env->idle == CPU_NEWLY_IDLE) {
>> +		int cpu;
>> +
>> +		/* Update the stats of NOHZ idle CPUs in the sd */
>> +		for_each_cpu_and(cpu, sched_domain_span(env->sd),
>> +				 nohz.idle_cpus_mask) {
>> +			struct rq *rq = cpu_rq(cpu);
>> +
>> +			/* ... Unless we've already done since the last tick */
>> +			if (time_after(jiffies, rq->last_blocked_load_update_tick))
>> +				update_blocked_averages(cpu);
>> +		}
>> +	}
>> +	/*
>> +	 * If we've just updated all of the NOHZ idle CPUs, then we can push
>> +	 * back the next nohz.next_update, which will prevent an unnecessary
>> +	 * wakeup for the nohz stats kick
>> +	 */
>> +	if (cpumask_subset(nohz.idle_cpus_mask, sched_domain_span(env->sd)))
>> +		nohz.next_update = jiffies + LOAD_AVG_PERIOD;
>> +#endif
>> +
>>   	load_idx = get_sd_load_idx(env->sd, env->idle);
>>   
>>   	do {
> 
> We're already going to be iterating all those CPUs through
> update_sg_lb_stats(), why not push it all the way down there and avoid
> the double iteration?

Brendan doesn't work for ARM anymore although he might still follow this 
discussion.

So you think that we can do the time_after(jiffies, 
rq->last_blocked_load_update_tick) check in update_sg_lb_stats() and 
possibly the update_blocked_averages() for all the cpus in the sd and 
then only update nohz.next_update in update_sd_lb_stats(). Let me try 
this ...

      reply	other threads:[~2017-12-21  9:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 18:01 [PATCH v2 0/2] sched/fair: remote load updates for idle CPUs Brendan Jackman
2017-12-01 18:01 ` [PATCH v2 1/2] sched: force update of blocked load of idle cpus Brendan Jackman
2017-12-20 14:03   ` Peter Zijlstra
2017-12-20 14:23     ` Vincent Guittot
2017-12-20 15:01       ` Peter Zijlstra
2017-12-20 15:05         ` Peter Zijlstra
2017-12-21  7:59         ` Vincent Guittot
2017-12-20 14:09   ` Peter Zijlstra
2017-12-20 14:27     ` Vincent Guittot
2017-12-21 10:01       ` Vincent Guittot
2017-12-01 18:01 ` [PATCH v2 2/2] sched/fair: Update blocked load from newly idle balance Brendan Jackman
2017-12-20 14:22   ` Peter Zijlstra
2017-12-21  9:19     ` Dietmar Eggemann [this message]

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=b56fe5c1-c5f7-2a59-9f7c-8d0ac8e04cc2@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=brendan.jackman@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --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®