[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtCjhYKttEuWs9cqicUdJMiJVy5he+=xWofof_4xAWgKAw@mail.gmail.com>
Date: Wed, 30 Oct 2019 16:27:08 +0100
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Doug Smythies <dsmythies@...us.net>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
"open list:THERMAL" <linux-pm@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Sargun Dhillon <sargun@...gun.me>, Tejun Heo <tj@...nel.org>,
Xie XiuQi <xiexiuqi@...wei.com>, xiezhipeng1@...wei.com,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Rik van Riel <riel@...riel.com>
Subject: Re: [PATCH] Revert "sched/fair: Fix O(nr_cgroups) in the load
balancing path"
On Wed, 30 Oct 2019 at 15:04, Doug Smythies <dsmythies@...us.net> wrote:
>
> 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.
The patch that I sent a few hours ago, doesn't solve your problem. It
solves item 1 of my previous email.
The fact that this hack fix your problem means that Intel pstate needs
to be called periodically even if the cfs pelt signals are null and
this is probably linked to the internal state machine of the driver.
The current behavior for CFS makes perfectly sense because cfs signal
is already null so we don't need to update freq because of cfs' signal
Then it remains the rt, dl and irq signals which might not be null yet
and which doesn't trigger a call to cpufreq_update_util whereas it
could worth calling it.
I have to prepare a patch for this part which is item 2
Regards,
Vincent
>
> ... Doug
>
>
Powered by blists - more mailing lists