Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1331663

[PATCH] sched: remove an unnecessary memory access, rq->cpu in __schedule()

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject [PATCH] sched: remove an unnecessary memory access, rq->cpu in __schedule()
Date 2016-02-11 04:10 +0100
Message-ID <r0PNL-2MN-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Is there any reason keeping this statement on the code?

-----8<-----
From d8a387efb8199b69b6464970d6f9fc57cbcf0ab0 Mon Sep 17 00:00:00 2001
From: Byungchul Park <byungchul.park@lge.com>
Date: Thu, 11 Feb 2016 11:50:53 +0900
Subject: [PATCH] sched: remove an unnecessary memory access, rq->cpu in
 __schedule()

Remove an unnecessary assignment of variable not used any more.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 kernel/sched/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1315cec..501f5d9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3193,7 +3193,6 @@ static void __sched notrace __schedule(bool preempt)
 
 		trace_sched_switch(preempt, prev, next);
 		rq = context_switch(rq, prev, next); /* unlocks the rq */
-		cpu = cpu_of(rq);
 	} else {
 		lockdep_unpin_lock(&rq->lock);
 		raw_spin_unlock_irq(&rq->lock);
-- 
1.9.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] sched: remove an unnecessary memory access, rq->cpu in __schedule() Byungchul Park <byungchul.park@lge.com> - 2016-02-11 04:10 +0100
  Re: [PATCH] sched: remove an unnecessary memory access, rq->cpu in  __schedule() Ingo Molnar <mingo@kernel.org> - 2016-02-17 09:40 +0100
    Re: [PATCH] sched: remove an unnecessary memory access, rq->cpu in  __schedule() Byungchul Park <byungchul.park@lge.com> - 2016-02-17 09:50 +0100
  [tip:sched/core] sched/core: Remove dead statement in __schedule(  ) tip-bot for Byungchul Park <tipbot@zytor.com> - 2016-02-17 13:20 +0100

csiph-web