All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: sched: remove unnecessary variable from schedule_tail()
@ 2021-03-06 21:07 Edmundo Carmona Antoranz
  2021-03-06 21:21 ` Edmundo Carmona Antoranz
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Edmundo Carmona Antoranz @ 2021-03-06 21:07 UTC (permalink / raw)
  To: kernel-janitors; +Cc: peterz, Edmundo Carmona Antoranz

Since 565790d28b1 (sched: Fix balance_callback(), 2020-05-11), there
is no longer a need to reuse the result value of the call to finish_task_switch()
inside schedule_tail(), therefore the variable used to hold that value
(rq) is no longer needed.

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
---
 kernel/sched/core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ca2bb629595f..8d89d106b724 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4246,8 +4246,6 @@ static struct rq *finish_task_switch(struct task_struct *prev)
 asmlinkage __visible void schedule_tail(struct task_struct *prev)
 	__releases(rq->lock)
 {
-	struct rq *rq;
-
 	/*
 	 * New tasks start with FORK_PREEMPT_COUNT, see there and
 	 * finish_task_switch() for details.
@@ -4257,7 +4255,7 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev)
 	 * PREEMPT_COUNT kernels).
 	 */
 
-	rq = finish_task_switch(prev);
+	finish_task_switch(prev);
 	preempt_enable();
 
 	if (current->set_child_tid)
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] kernel: sched: remove unnecessary variable from schedule_tail()
  2021-03-06 21:07 [PATCH] kernel: sched: remove unnecessary variable from schedule_tail() Edmundo Carmona Antoranz
@ 2021-03-06 21:21 ` Edmundo Carmona Antoranz
  2021-03-06 21:31   ` Julia Lawall
  2021-03-08  8:21 ` Peter Zijlstra
  2021-03-10 11:26 ` [tip: sched/core] sched: Remove " tip-bot2 for Edmundo Carmona Antoranz
  2 siblings, 1 reply; 6+ messages in thread
From: Edmundo Carmona Antoranz @ 2021-03-06 21:21 UTC (permalink / raw)
  To: kernel-janitors; +Cc: peterz

On Sat, Mar 6, 2021 at 3:08 PM Edmundo Carmona Antoranz
<eantoranz@gmail.com> wrote:

While looking for ways to find compilation messages (still learning,
if you have any good resources for a kernel newbie to look at / learn
from, please, let me know) I found this piece of low hanging fruit
that was begging for a kind soul to pick it up. Given that this is my
first baby intended for linux, let's see how far it is able to fly (I
wouldn't be surprised if it falls directly to the ground). I hope I
didn't mess up too badly in terms of formatting and that I am
_hopefully_ following "the procedure".. and if that's not the case,
please let me know where I can read about it.

Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kernel: sched: remove unnecessary variable from schedule_tail()
  2021-03-06 21:21 ` Edmundo Carmona Antoranz
@ 2021-03-06 21:31   ` Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2021-03-06 21:31 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz; +Cc: kernel-janitors, peterz



On Sat, 6 Mar 2021, Edmundo Carmona Antoranz wrote:

> On Sat, Mar 6, 2021 at 3:08 PM Edmundo Carmona Antoranz
> <eantoranz@gmail.com> wrote:
>
> While looking for ways to find compilation messages (still learning,
> if you have any good resources for a kernel newbie to look at / learn
> from, please, let me know) I found this piece of low hanging fruit
> that was begging for a kind soul to pick it up. Given that this is my
> first baby intended for linux, let's see how far it is able to fly (I
> wouldn't be surprised if it falls directly to the ground). I hope I
> didn't mess up too badly in terms of formatting and that I am
> _hopefully_ following "the procedure".. and if that's not the case,
> please let me know where I can read about it.

I would be better to start with drivers staging than with the scheduler.

julia

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kernel: sched: remove unnecessary variable from schedule_tail()
  2021-03-06 21:07 [PATCH] kernel: sched: remove unnecessary variable from schedule_tail() Edmundo Carmona Antoranz
  2021-03-06 21:21 ` Edmundo Carmona Antoranz
@ 2021-03-08  8:21 ` Peter Zijlstra
       [not found]   ` <CAOc6etbrW15DWRdJ=wP-R_TXzKDqAKAjzB5oVLwWfT7sOAbY_A@mail.gmail.com>
  2021-03-10 11:26 ` [tip: sched/core] sched: Remove " tip-bot2 for Edmundo Carmona Antoranz
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Zijlstra @ 2021-03-08  8:21 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz; +Cc: kernel-janitors

On Sat, Mar 06, 2021 at 03:07:39PM -0600, Edmundo Carmona Antoranz wrote:
> Since 565790d28b1 (sched: Fix balance_callback(), 2020-05-11), there
> is no longer a need to reuse the result value of the call to finish_task_switch()
> inside schedule_tail(), therefore the variable used to hold that value
> (rq) is no longer needed.
> 
> Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>

Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kernel: sched: remove unnecessary variable from schedule_tail()
       [not found]   ` <CAOc6etbrW15DWRdJ=wP-R_TXzKDqAKAjzB5oVLwWfT7sOAbY_A@mail.gmail.com>
@ 2021-03-09  8:06     ` Peter Zijlstra
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2021-03-09  8:06 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz; +Cc: kernel-janitors

On Mon, Mar 08, 2021 at 07:52:11PM -0600, Edmundo Carmona Antoranz wrote:
> On Mon, Mar 8, 2021 at 2:21 AM Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > Thanks!
> 
> You're welcome... but I still have no idea if this baby will make it to
> orbit or if it will have to be included in a revision of the theory of
> tectonic plates. I guess I will be learning the flows of how patches move
> around as time goes by. I will be posting a couple of questions (not
> related to this patch) today or tomorrow, probably.

It found its way here:

  https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=sched/core

And soon, today or tomorrow (provided the robots don't hate on anything
I stick in that branch), I'll push it into tip at which point you'll get
an email.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip: sched/core] sched: Remove unnecessary variable from schedule_tail()
  2021-03-06 21:07 [PATCH] kernel: sched: remove unnecessary variable from schedule_tail() Edmundo Carmona Antoranz
  2021-03-06 21:21 ` Edmundo Carmona Antoranz
  2021-03-08  8:21 ` Peter Zijlstra
@ 2021-03-10 11:26 ` tip-bot2 for Edmundo Carmona Antoranz
  2 siblings, 0 replies; 6+ messages in thread
From: tip-bot2 for Edmundo Carmona Antoranz @ 2021-03-10 11:26 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Edmundo Carmona Antoranz, Peter Zijlstra (Intel), x86, linux-kernel

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     13c2235b2b2870675195f0b551275d1abdd81068
Gitweb:        https://git.kernel.org/tip/13c2235b2b2870675195f0b551275d1abdd81068
Author:        Edmundo Carmona Antoranz <eantoranz@gmail.com>
AuthorDate:    Sat, 06 Mar 2021 15:07:39 -06:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 10 Mar 2021 09:51:49 +01:00

sched: Remove unnecessary variable from schedule_tail()

Since 565790d28b1 (sched: Fix balance_callback(), 2020-05-11), there
is no longer a need to reuse the result value of the call to finish_task_switch()
inside schedule_tail(), therefore the variable used to hold that value
(rq) is no longer needed.

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210306210739.1370486-1-eantoranz@gmail.com
---
 kernel/sched/core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d2629fd..28c4df6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4253,8 +4253,6 @@ static struct rq *finish_task_switch(struct task_struct *prev)
 asmlinkage __visible void schedule_tail(struct task_struct *prev)
 	__releases(rq->lock)
 {
-	struct rq *rq;
-
 	/*
 	 * New tasks start with FORK_PREEMPT_COUNT, see there and
 	 * finish_task_switch() for details.
@@ -4264,7 +4262,7 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev)
 	 * PREEMPT_COUNT kernels).
 	 */
 
-	rq = finish_task_switch(prev);
+	finish_task_switch(prev);
 	preempt_enable();
 
 	if (current->set_child_tid)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-10 11:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 21:07 [PATCH] kernel: sched: remove unnecessary variable from schedule_tail() Edmundo Carmona Antoranz
2021-03-06 21:21 ` Edmundo Carmona Antoranz
2021-03-06 21:31   ` Julia Lawall
2021-03-08  8:21 ` Peter Zijlstra
     [not found]   ` <CAOc6etbrW15DWRdJ=wP-R_TXzKDqAKAjzB5oVLwWfT7sOAbY_A@mail.gmail.com>
2021-03-09  8:06     ` Peter Zijlstra
2021-03-10 11:26 ` [tip: sched/core] sched: Remove " tip-bot2 for Edmundo Carmona Antoranz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.