public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: byungchul.park@lge.com
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
	fweisbec@gmail.com, tglx@linutronix.de
Subject: Re: [PATCH v4 2/2] sched: consider missed ticks in full NOHZ
Date: Mon, 2 Nov 2015 17:10:16 +0100	[thread overview]
Message-ID: <20151102161016.GS3604@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1444816056-11886-3-git-send-email-byungchul.park@lge.com>

On Wed, Oct 14, 2015 at 06:47:36PM +0900, byungchul.park@lge.com wrote:
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4428,7 +4428,7 @@ static void update_idle_cpu_load(struct rq *this_rq)

So if one were to read the comment above update_idle_cpu_load() one
would find there's a problem with jiffy based accounting.

>  /*
>   * 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)

> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index 7c7ec45..515edf3 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c

> -static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
> +static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now, int active)
>  {
>  	/* Update jiffies first */
>  	tick_do_update_jiffies64(now);
> -	update_cpu_load_nohz();
> +	update_cpu_load_nohz(active);
>  
>  	calc_load_exit_idle();
>  	touch_softlockup_watchdog();

And we could solve all that nicely if we pull up the hrtimer_forward()
result from tick_nohz_restart(), that way we have the actual number of
ticks lost on this cpu, and no need to start guessing about it.

Hmm?

  parent reply	other threads:[~2015-11-02 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14  9:47 [PATCH v4 0/2] sched: consider missed ticks when updating cpu load byungchul.park
2015-10-14  9:47 ` [PATCH v4 1/2] sched: make __update_cpu_load() handle active tickless case byungchul.park
2015-10-19 13:16   ` Peter Zijlstra
2015-10-20  0:49     ` Byungchul Park
2015-10-20  9:48       ` Peter Zijlstra
2015-10-22 10:28         ` Byungchul Park
2015-10-22 11:05           ` Peter Zijlstra
2015-11-23 16:18   ` [tip:sched/core] sched/fair: Prepare __update_cpu_load() to handle active tickless tip-bot for Byungchul Park
2015-10-14  9:47 ` [PATCH v4 2/2] sched: consider missed ticks in full NOHZ byungchul.park
2015-10-22 16:20   ` Frederic Weisbecker
2015-11-02 16:10   ` Peter Zijlstra [this message]
2015-11-09  2:36     ` Byungchul Park
2015-11-09 10:36       ` Peter Zijlstra
2015-11-09 11:16         ` 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=20151102161016.GS3604@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=byungchul.park@lge.com \
    --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