From: Peter Zijlstra <peterz@infradead.org>
To: byungchul.park@lge.com
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, efault@gmx.de,
tglx@linutronix.de, fweisbec@gmail.com
Subject: Re: [PATCH v5 2/2] sched: make update_cpu_load_nohz() consider missed ticks in NOHZ_FULL
Date: Fri, 20 Nov 2015 14:19:55 +0100 [thread overview]
Message-ID: <20151120131955.GE17308@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1447115762-19734-3-git-send-email-byungchul.park@lge.com>
On Tue, Nov 10, 2015 at 09:36:02AM +0900, byungchul.park@lge.com wrote:
> +++ b/kernel/sched/fair.c
> @@ -4419,10 +4419,11 @@ static void update_idle_cpu_load(struct rq *this_rq)
> /*
> * Called from tick_nohz_idle_exit() -- try and fix up the ticks we missed.
> */
> -void update_cpu_load_nohz(void)
> +void update_cpu_load_nohz(int active)
> {
> struct rq *this_rq = this_rq();
> unsigned long curr_jiffies = READ_ONCE(jiffies);
> + unsigned long load = active ? weighted_cpuload(cpu_of(this_rq)) : 0;
> unsigned long pending_updates;
>
> if (curr_jiffies == this_rq->last_load_update_tick)
> @@ -4433,10 +4434,11 @@ void update_cpu_load_nohz(void)
> if (pending_updates) {
> this_rq->last_load_update_tick = curr_jiffies;
> /*
> - * We were idle, this means load 0, the current load might be
> - * !0 due to remote wakeups and the sort.
> + * In the regular NOHZ case, we were idle, this means load 0.
> + * In the NOHZ_FULL case, we were non-idle, we should consider
> + * its weighted load.
> */
> - __update_cpu_load(this_rq, 0, pending_updates, 0);
> + __update_cpu_load(this_rq, load, pending_updates, active);
> }
> raw_spin_unlock(&this_rq->lock);
> }
Bah, so I did all the work to get the actual number of lost ticks in
there, only to _then_ find out that's mostly pointless :-)
The problem is update_idle_cpu_load() is called while idle (from another
CPU), so it still needs the whole jiffy based thing.
So I'll take this patch for now. Thanks.
next prev parent reply other threads:[~2015-11-20 13:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 0:36 [PATCH v5 0/2] sched: consider missed ticks when updating cpu load byungchul.park
2015-11-10 0:36 ` [PATCH v5 1/2] sched: make __update_cpu_load() handle NOHZ_FULL tickless byungchul.park
2015-11-10 0:36 ` [PATCH v5 2/2] sched: make update_cpu_load_nohz() consider missed ticks in NOHZ_FULL byungchul.park
2015-11-11 9:42 ` Byungchul Park
2015-11-20 13:19 ` Peter Zijlstra [this message]
2015-11-23 2:32 ` Byungchul Park
2015-11-23 16:19 ` [tip:sched/core] sched/fair: Consider missed ticks in NOHZ_FULL in update_cpu_load_nohz() tip-bot for Byungchul Park
2015-11-11 9:38 ` [PATCH v5 0/2] sched: consider missed ticks when updating cpu load Byungchul Park
2015-11-12 6:59 ` Byungchul Park
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=20151120131955.GE17308@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=byungchul.park@lge.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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