public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Alex Shi <alex.shi@linaro.org>
Cc: mingo@redhat.com, peterz@infradead.org, morten.rasmussen@arm.com,
	vincent.guittot@linaro.org, daniel.lezcano@linaro.org,
	linux@arm.linux.org.uk, tony.luck@intel.com,
	fenghua.yu@intel.com, tglx@linutronix.de,
	akpm@linux-foundation.org, arjan@linux.intel.com, pjt@google.com,
	fengguang.wu@intel.com, james.hogan@imgtec.com,
	jason.low2@hp.com, viresh.kumar@linaro.org,
	hanjun.guo@linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] nohz_full: update cpu load fix in nohz_full
Date: Tue, 10 Dec 2013 15:02:19 +0100	[thread overview]
Message-ID: <20131210140217.GA10633@localhost.localdomain> (raw)
In-Reply-To: <1386074112-30754-4-git-send-email-alex.shi@linaro.org>

On Tue, Dec 03, 2013 at 08:35:12PM +0800, Alex Shi wrote:
> We are not always 0 when update nohz cpu load, after nohz_full enabled.
> But current code still treat the cpu as idle. that is incorrect.
> Fix it to use correct cpu_load.
> 
> Signed-off-by: Alex Shi <alex.shi@linaro.org>
> ---
>  kernel/sched/proc.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/proc.c b/kernel/sched/proc.c
> index 16f5a30..f1441f0 100644
> --- a/kernel/sched/proc.c
> +++ b/kernel/sched/proc.c
> @@ -568,8 +568,14 @@ void update_cpu_load_nohz(void)
>  		/*
>  		 * We were idle, this means load 0, the current load might be
>  		 * !0 due to remote wakeups and the sort.
> +		 * or we may has only one task and in NO_HZ_FULL, then still use
> +		 * normal cpu load.
>  		 */
> -		__update_cpu_load(this_rq, 0, pending_updates);
> +		if (this_rq->cfs.h_nr_running) {
> +			unsigned load = get_rq_runnable_load(this_rq);
> +			__update_cpu_load(this_rq, load, pending_updates);
> +		} else
> +			__update_cpu_load(this_rq, 0, pending_updates);

But decay_load_missed() doesnt handle non 0 loads, right? It probably make more sense
to first fix __update_cpu_load() to make it handle this kind of thing before fixing the caller.

Now you had patches that remove the cpu_load secondary idx I think? You should move this patch to
that series.

>  	}
>  	raw_spin_unlock(&this_rq->lock);
>  }
> -- 
> 1.8.1.2
> 

  parent reply	other threads:[~2013-12-10 14:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 12:35 [PATCH v2 0/3] nohz_full clean up and bug fix Alex Shi
2013-12-03 12:35 ` [PATCH v2 1/3] nohz_full: fix code sytle issue of tick_nohz_full_stop_tick Alex Shi
2013-12-03 15:00   ` Morten Rasmussen
2013-12-04  1:48     ` Alex Shi
2013-12-10 15:20     ` Alex Shi
2014-01-25 14:22   ` [tip:timers/urgent] nohz_full: fix code style " tip-bot for Alex Shi
2013-12-03 12:35 ` [PATCH v2 2/3] nohz_full: unify nohz_full funcs Alex Shi
2013-12-03 12:35 ` [PATCH v2 3/3] nohz_full: update cpu load fix in nohz_full Alex Shi
2013-12-04  6:17   ` Alex Shi
2013-12-10 13:28     ` Alex Shi
2013-12-10 14:02   ` Frederic Weisbecker [this message]
2013-12-11  1:33     ` Alex Shi
2013-12-03 12:37 ` [PATCH v2 0/3] nohz_full clean up and bug fix Alex Shi

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=20131210140217.GA10633@localhost.localdomain \
    --to=fweisbec@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@linaro.org \
    --cc=arjan@linux.intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=fengguang.wu@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=hanjun.guo@linaro.org \
    --cc=james.hogan@imgtec.com \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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