public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yuyang Du <yuyang.du@intel.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
	peterz@infradead.org, pjt@google.com, bsegall@google.com,
	morten.rasmussen@arm.com, dietmar.eggemann@arm.com,
	len.brown@intel.com, rafael.j.wysocki@intel.com,
	fengguang.wu@intel.com, boqun.feng@gmail.com,
	srikar@linux.vnet.ibm.com
Subject: Re: [PATCH] sched: update blocked load of idle cpus
Date: Wed, 24 Jun 2015 07:41:14 +0800	[thread overview]
Message-ID: <20150623234114.GA3808@intel.com> (raw)
In-Reply-To: <1435129872-22915-1-git-send-email-vincent.guittot@linaro.org>

Hi Vincent,

On Wed, Jun 24, 2015 at 09:11:12AM +0200, Vincent Guittot wrote:
> The load and the util of idle cpus must be updated periodically in order to
> decay the blocked part.
> 
> If CONFIG_FAIR_GROUP_SCHED is not set, the load and util of idle cpus
> are not decayed and stay at the values set before becoming idle.
> 
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> Hi Yuyang,
> 
> While testing your patchset without CONFIG_FAIR_GROUP_SCHED, i have noticed
> that the load of idle cpus stays sometimes to an high value whereas they were
> not used for a while because we are not decaying the blocked load.
> Futhermore, the peridodic load balance was not pulling tasks onto some idle
> cpus because their load stayed high.
> 
> This patchset fixes the issue. 

Thanks. We should privide an update_blocked_averages() for the
CONFIG_FAIR_GROUP_SCHED=n case. Great.

> 
> Regards,
> Vincent
> 
>  kernel/sched/fair.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index c5f18d9..665cc4b 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5864,6 +5864,17 @@ static unsigned long task_h_load(struct task_struct *p)
>  #else
>  static inline void update_blocked_averages(int cpu)
>  {
> +	struct rq *rq = cpu_rq(cpu);
> +	struct cfs_rq *cfs_rq = &rq->cfs;
> +	unsigned long flags;
> +
> +	raw_spin_lock_irqsave(&rq->lock, flags);
> +	update_rq_clock(rq);
> +
> +	update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq))
> +
> +	raw_spin_unlock_irqrestore(&rq->lock, flags);
> +
>  }
>  
>  static unsigned long task_h_load(struct task_struct *p)

Reviewed-by: Yuyang Du <yuyang.du@intel.com>

> -- 
> 1.9.1

  reply	other threads:[~2015-06-24  7:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23  0:08 [PATCH v9 0/4] sched: Rewrite runnable load and utilization average tracking Yuyang Du
2015-06-23  0:08 ` [PATCH v9 1/4] sched: Remove rq's runnable avg Yuyang Du
2015-06-23 16:49   ` Dietmar Eggemann
2015-06-23  0:08 ` [PATCH v9 2/4] sched: Rewrite runnable load and utilization average tracking Yuyang Du
2015-06-23 10:30   ` Wanpeng Li
2015-06-24  7:11   ` [PATCH] sched: update blocked load of idle cpus Vincent Guittot
2015-06-23 23:41     ` Yuyang Du [this message]
2015-07-13 17:08   ` [PATCH v9 2/4] sched: Rewrite runnable load and utilization average tracking Dietmar Eggemann
2015-07-13 23:59     ` Yuyang Du
2015-06-23  0:08 ` [PATCH v9 3/4] sched: Init cfs_rq's sched_entity load average Yuyang Du
2015-06-23  0:08 ` [PATCH v9 4/4] sched: Remove task and group entity load when they are dead Yuyang Du

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=20150623234114.GA3808@intel.com \
    --to=yuyang.du@intel.com \
    --cc=boqun.feng@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=fengguang.wu@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=srikar@linux.vnet.ibm.com \
    --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