lkml.org 
[lkml]   [2018]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] sched/fair: schedutil: explicit update only when required
On 10-May 18:15, Peter Zijlstra wrote:
> On Thu, May 10, 2018 at 04:05:53PM +0100, Patrick Bellasi wrote:
> > All the above considered, let's make schedutil updates more explicit in
> > fair.c by removing the cfs_rq_util_change() wrapper function in favour
> > of the existing cpufreq_update_util() public API.
> > This can be done by calling cpufreq_update_util() explicitly in the few
> > call sites where it really makes sense and when all the (potentially)
> > required cfs_rq's information have been updated.
>
> Aside from having to redraw my ever stale diagrams _again_ I don't think
> I object too much here. As you write tracking the exact point where we
> did do the update was fairly tedious.

Maybe we can simplify even better these diagrams if we get to the
point where schedutil updates are tirggered just from core.c...

This patch could be a first step on this directions, not entirely sure
we can get there... but, having some well defined callbacks maybe it
can make it easier to factorize up the updates in the core scheduler.

> > @@ -5397,9 +5366,27 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
> > update_cfs_group(se);
> > }
> >
> > + /* The task is visible from the root cfs_rq */
> > + if (!se) {
> > + unsigned int flags = 0;
>
> That one shadows the @flags argument. Some checker is bound to complain
> about it.

Ohps... right... I'll s/flags/sc_flags/ "sc_" standing for SCHED_CPUFREQ_.

> > +
> > add_nr_running(rq, 1);
> >
> > + if (p->in_iowait)
> > + flags |= SCHED_CPUFREQ_IOWAIT;
> > +
> > + /*
> > + * !last_update_time means we've passed through
> > + * migrate_task_rq_fair() indicating we migrated.
> > + *
> > + * IOW we're enqueueing a task on a new CPU.
> > + */
> > + if (!p->se.avg.last_update_time)
> > + flags |= SCHED_CPUFREQ_MIGRATION;
> > +
> > + cpufreq_update_util(rq, flags);
> > + }
> > +
> > hrtick_update(rq);
> > }

--
#include <best/regards.h>

Patrick Bellasi

\
 
 \ /
  Last update: 2018-05-10 18:54    [W:0.123 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site