[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADjb_WQ0rg1O9t8hkevUmf_Yx4mTRZ0O_Wz-p3VN8oDbGVBuJA@mail.gmail.com>
Date: Sun, 19 Apr 2020 23:31:31 +0800
From: Chen Yu <yu.chen.surf@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: vpillai <vpillai@...italocean.com>,
Nishanth Aravamudan <naravamudan@...italocean.com>,
Julien Desfossez <jdesfossez@...italocean.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Paul Turner <pjt@...gle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
fweisbec@...il.com, Kees Cook <keescook@...omium.org>,
Greg Kerr <kerrnel@...gle.com>, Phil Auld <pauld@...hat.com>,
Aaron Lu <aaron.lwe@...il.com>,
Aubrey Li <aubrey.intel@...il.com>,
Aubrey Li <aubrey.li@...ux.intel.com>,
Valentin Schneider <valentin.schneider@....com>,
Mel Gorman <mgorman@...hsingularity.net>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Joel Fernandes <joelaf@...gle.com>, joel@...lfernandes.org,
Aaron Lu <aaron.lu@...ux.alibaba.com>,
Long Cui <long.cui@...el.com>
Subject: Re: [RFC PATCH 07/13] sched: Add core wide task selection and scheduling.
On Fri, Apr 17, 2020 at 7:18 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Thu, Apr 16, 2020 at 11:39:05AM +0800, Chen Yu wrote:
>
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 02495d44870f..ef101a3ef583 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -4477,9 +4477,14 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
> > return next;
> > }
> >
> > - prev->sched_class->put_prev_task(rq, prev);
> > - if (!rq->nr_running)
> > - newidle_balance(rq, rf);
> > +
> > +#ifdef CONFIG_SMP
> > + for_class_range(class, prev->sched_class, &idle_sched_class) {
> > + if (class->balance(rq, prev, rf))
> > + break;
> > + }
> > +#endif
> > + put_prev_task(rq, prev);
> >
> > smt_mask = cpu_smt_mask(cpu);
>
> Instead of duplicating that, how about you put the existing copy in a
> function to share? finish_prev_task() perhaps?
>
> Also, can you please make newidle_balance() static again; I forgot doing
> that in 6e2df0581f56, which would've made you notice this sooner I
> suppose.
Okay, I'll do that,
Thanks,
Chenyu
Powered by blists - more mailing lists