All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Doug Smythies" <dsmythies@telus.net>
To: "'Vincent Guittot'" <vincent.guittot@linaro.org>
Cc: "'linux-kernel'" <linux-kernel@vger.kernel.org>,
	"'open list:THERMAL'" <linux-pm@vger.kernel.org>,
	"'Peter Zijlstra'" <peterz@infradead.org>,
	"'Ingo Molnar'" <mingo@kernel.org>,
	"'Linus Torvalds'" <torvalds@linux-foundation.org>,
	"'Thomas Gleixner'" <tglx@linutronix.de>,
	"'Sargun Dhillon'" <sargun@sargun.me>,
	"'Tejun Heo'" <tj@kernel.org>,
	"'Xie XiuQi'" <xiexiuqi@huawei.com>, <xiezhipeng1@huawei.com>,
	"'Srinivas Pandruvada'" <srinivas.pandruvada@linux.intel.com>,
	"'Rik van Riel'" <riel@surriel.com>
Subject: RE: [PATCH] Revert "sched/fair: Fix O(nr_cgroups) in the load balancing path"
Date: Wed, 30 Oct 2019 07:04:40 -0700	[thread overview]
Message-ID: <000001d58f2a$fc593200$f50b9600$@net> (raw)
In-Reply-To: <20191029160210.GA8343@linaro.org>

On 2019.10.29 09:02 Vincent Guittot wrote:

> Could you try the patch below ? It ensures that at least the root cfs rq stays
> in the list so each time update_blocked_averages is called, we will call update_cfs_rq_load_avg()
> for the root cfs_rq at least and even if everything already reach zero.
> This will ensure that cfs_rq_util_change is called even if nothing has
> changed.
>
> ---
>  kernel/sched/fair.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 151c0b7..ac0a549 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7552,6 +7552,8 @@ static inline void update_blocked_load_status(struct rq *rq, bool has_blocked) {
> 
>  static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
>  {
> +	struct rq *rq = rq_of(cfs_rq);
> +
>  	if (cfs_rq->load.weight)
> 		return false;
> 
> @@ -7564,6 +7566,9 @@ static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
> 	if (cfs_rq->avg.runnable_load_sum)
> 		return false;
> 
> +	if (cfs_rq == &rq->cfs)
> +		return false;
> +
> 	return true;
> }
> 
> -- 
> 2.7.4

Yes, this patch works and solves the long time
between calls of the intel_pstate CPU frequency scaling
driver issue.
I see you sent a formal patch a few hours ago.
I'll try it and report back.

... Doug
 


  reply	other threads:[~2019-10-30 14:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25 15:55 [PATCH] Revert "sched/fair: Fix O(nr_cgroups) in the load balancing path" Doug Smythies
2019-10-25 16:51 ` Vincent Guittot
2019-10-26  6:59   ` Doug Smythies
2019-10-28  8:21     ` Vincent Guittot
2019-10-29 14:55       ` Doug Smythies
2019-10-29 15:36         ` Peter Zijlstra
2019-10-29 16:20           ` Vincent Guittot
2019-10-29 16:49             ` Peter Zijlstra
2019-10-29 17:00               ` Vincent Guittot
2019-10-29 17:09                 ` Vincent Guittot
2019-10-29 16:02         ` Vincent Guittot
2019-10-30 14:04           ` Doug Smythies [this message]
2019-10-30 15:27             ` Vincent Guittot
2019-11-08  9:18               ` Vincent Guittot
2019-11-09 16:47                 ` Doug Smythies
2019-11-10 15:13                   ` Vincent Guittot
2019-10-29 19:34 ` Srinivas Pandruvada
2019-10-29 19:59   ` Srinivas Pandruvada
2019-10-30 15:54     ` Doug Smythies

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='000001d58f2a$fc593200$f50b9600$@net' \
    --to=dsmythies@telus.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=sargun@sargun.me \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vincent.guittot@linaro.org \
    --cc=xiexiuqi@huawei.com \
    --cc=xiezhipeng1@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.