From: Chen Yu <yu.c.chen@intel.com>
To: Valentin Schneider <valentin.schneider@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2][v2] sched: Extract the task putting code from pick_next_task()
Date: Tue, 21 Apr 2020 16:00:42 +0800 [thread overview]
Message-ID: <20200421080042.GC9721@chenyu-office.sh.intel.com> (raw)
In-Reply-To: <jhjy2qqkq6a.mognet@arm.com>
Hi,
On Mon, Apr 20, 2020 at 06:44:29PM +0100, Valentin Schneider wrote:
>
> On 20/04/20 16:01, Chen Yu wrote:
> > Introduce a new function finish_prev_task() to do the balance
> > when necessary, and then put previous task back to the run queue.
> > This function is extracted from pick_next_task() to prepare for
> > future usage by other type of task picking logic.
> >
> > No functional change.
> >
>
> With the absolutely tiny nit below:
>
> Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
>
> > Suggested-by: Peter Zijlstra <peterz@infradead.org>
> > Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> > ---
> > kernel/sched/core.c | 39 +++++++++++++++++++++++----------------
> > 1 file changed, 23 insertions(+), 16 deletions(-)
> >
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 3a61a3b8eaa9..bf59a5cf030c 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -3904,6 +3904,28 @@ static inline void schedule_debug(struct task_struct *prev, bool preempt)
> > schedstat_inc(this_rq()->sched_count);
> > }
> >
> > +static void finish_prev_task(struct rq *rq, struct task_struct *prev,
> > + struct rq_flags *rf)
> > +{
> > + const struct sched_class *class;
> > +#ifdef CONFIG_SMP
>
> Nit: I would've put that declaration within the ifdef, given it isn't used
> outside of it.
>
Okay, I'll do.
Thanks,
Chenyu
prev parent reply other threads:[~2020-04-21 8:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 15:01 [PATCH 0/2][v2] sched: Clean up newidle_balance() and pick_next_task() Chen Yu
2020-04-20 15:01 ` [PATCH 1/2][v2] sched: Make newidle_balance() static again Chen Yu
2020-04-20 17:43 ` Valentin Schneider
2020-04-21 7:17 ` Vincent Guittot
2020-04-20 15:01 ` [PATCH 2/2][v2] sched: Extract the task putting code from pick_next_task() Chen Yu
2020-04-20 17:44 ` Valentin Schneider
2020-04-21 8:00 ` Chen Yu [this message]
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=20200421080042.GC9721@chenyu-office.sh.intel.com \
--to=yu.c.chen@intel.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox