From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Li Zhong <zhong@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, Alex Shi <alex.shi@intel.com>,
Paul Turner <pjt@google.com>, Mike Galbraith <efault@gmx.de>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [RFC PATCH 1/4] sched: Disable lb_bias feature for full dynticks
Date: Thu, 20 Jun 2013 14:01:42 -0700 [thread overview]
Message-ID: <20130620210141.GN4082@linux.vnet.ibm.com> (raw)
In-Reply-To: <1371761141-25386-2-git-send-email-fweisbec@gmail.com>
On Thu, Jun 20, 2013 at 10:45:38PM +0200, Frederic Weisbecker wrote:
> If we run in full dynticks mode, we currently have no way to
> correctly update the secondary decaying indexes of the CPU
> load stats as it is typically maintained by update_cpu_load_active()
> at each tick.
>
> We have an available infrastructure that handles tickless loads
> (cf: decay_load_missed) but it seems to only work for idle tickless
> loads, which only applies if the CPU hasn't run any real task but
> idle on the tickless timeslice.
>
> Until we can provide a sane mathematical solution to handle full
> dynticks loads, lets simply deactivate the LB_BIAS sched feature
> if CONFIG_NO_HZ_FULL as it is currently the only user of the decayed
> load records.
>
> The first load index that represents the current runqueue load weight
> is still maintained and usable.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Li Zhong <zhong@linux.vnet.ibm.com>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Alex Shi <alex.shi@intel.com>
> Cc: Paul Turner <pjt@google.com>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> kernel/sched/fair.c | 13 +++++++++++--
> kernel/sched/features.h | 3 +++
> 2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index c0ac2c3..2e8df6f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2937,6 +2937,15 @@ static unsigned long weighted_cpuload(const int cpu)
> return cpu_rq(cpu)->load.weight;
> }
>
> +static inline int sched_lb_bias(void)
> +{
> +#ifndef CONFIG_NO_HZ_FULL
> + return sched_feat(LB_BIAS);
> +#else
> + return 0;
> +#endif
> +}
> +
> /*
> * Return a low guess at the load of a migration-source cpu weighted
> * according to the scheduling class and "nice" value.
> @@ -2949,7 +2958,7 @@ static unsigned long source_load(int cpu, int type)
> struct rq *rq = cpu_rq(cpu);
> unsigned long total = weighted_cpuload(cpu);
>
> - if (type == 0 || !sched_feat(LB_BIAS))
> + if (type == 0 || !sched_lb_bias())
> return total;
>
> return min(rq->cpu_load[type-1], total);
> @@ -2964,7 +2973,7 @@ static unsigned long target_load(int cpu, int type)
> struct rq *rq = cpu_rq(cpu);
> unsigned long total = weighted_cpuload(cpu);
>
> - if (type == 0 || !sched_feat(LB_BIAS))
> + if (type == 0 || !sched_lb_bias())
> return total;
>
> return max(rq->cpu_load[type-1], total);
> diff --git a/kernel/sched/features.h b/kernel/sched/features.h
> index 99399f8..635f902 100644
> --- a/kernel/sched/features.h
> +++ b/kernel/sched/features.h
> @@ -43,7 +43,10 @@ SCHED_FEAT(ARCH_POWER, true)
>
> SCHED_FEAT(HRTICK, false)
> SCHED_FEAT(DOUBLE_TICK, false)
> +
> +#ifndef CONFIG_NO_HZ_FULL
> SCHED_FEAT(LB_BIAS, true)
> +#endif
>
> /*
> * Decrement CPU power based on time not spent running tasks
> --
> 1.7.5.4
>
next prev parent reply other threads:[~2013-06-20 21:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 20:45 [RFC PATCH 0/4] sched: Disabled LB_BIAS with full dynticks Frederic Weisbecker
2013-06-20 20:45 ` [RFC PATCH 1/4] sched: Disable lb_bias feature for " Frederic Weisbecker
2013-06-20 21:01 ` Paul E. McKenney [this message]
2013-06-20 20:45 ` [RFC PATCH 2/4] sched: Consolidate nohz cpu load prelude code Frederic Weisbecker
2013-06-20 21:01 ` Paul E. McKenney
2013-06-20 20:45 ` [RFC PATCH 3/4] sched: Conditionally build decaying cpu load stats Frederic Weisbecker
2013-06-20 20:45 ` [RFC PATCH 4/4] sched: Consolidate open coded preemptible() checks Frederic Weisbecker
2013-06-26 13:05 ` Peter Zijlstra
2013-07-01 11:20 ` Frederic Weisbecker
2013-07-01 11:55 ` Peter Zijlstra
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=20130620210141.GN4082@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=alex.shi@intel.com \
--cc=bp@alien8.de \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=zhong@linux.vnet.ibm.com \
/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