On Fri, 19 Jul 2019 at 14:51, Peter Zijlstra <[email protected]> wrote:
>
> On Fri, Jul 19, 2019 at 09:58:22AM +0200, Vincent Guittot wrote:
> > sum_nr_running will track rq->nr_running task and sum_h_nr_running
> > will track cfs->h_nr_running so we can use both to detect when other
> > scheduling class are running and preempt CFS.
> >
> > There is no functional changes.
> >
> > Signed-off-by: Vincent Guittot <[email protected]>
> > ---
> >  kernel/sched/fair.c | 31 +++++++++++++++++--------------
> >  1 file changed, 17 insertions(+), 14 deletions(-)
> >
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 7a530fd..67f0acd 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -7650,6 +7650,7 @@ struct sg_lb_stats {
> >       unsigned long group_capacity;
> >       unsigned long group_util; /* Total utilization of the group */
> >       unsigned int sum_nr_running; /* Nr tasks running in the group */
> > +     unsigned int sum_h_nr_running; /* Nr tasks running in the group */
> >       unsigned int idle_cpus;
> >       unsigned int group_weight;
> >       enum group_type group_type;
>
> > @@ -8000,6 +8002,7 @@ static inline void update_sg_lb_stats(struct lb_env 
> > *env,
> >
> >               sgs->group_load += cpu_runnable_load(rq);
> >               sgs->group_util += cpu_util(i);
> > +             sgs->sum_h_nr_running += rq->cfs.h_nr_running;
> >               sgs->sum_nr_running += rq->cfs.h_nr_running;
> >
> >               nr_running = rq->nr_running;
>
> Maybe completely remove sum_nr_running in this patch, and introduce it
> again later when you change what it counts.

yes

Reply via email to