[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <087fca802283fabd6697f99be0a027c26c0c506b.1456919394.git.agordeev@redhat.com>
Date: Wed, 2 Mar 2016 12:53:32 +0100
From: Alexander Gordeev <agordeev@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Alexander Gordeev <agordeev@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH v3 2/2] sched/core: Get rid of 'cpu' local variable in __schedule()
This update is a continuation of commit 3223d05 ("sched/core:
Remove dead statement in __schedule()") and completes the
removal of a dead code with a removal of an unnecessary 'cpu'
local variable - as it is only used to acquire the current
runqueue.
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Alexander Gordeev <agordeev@...hat.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 735e87c..75e62ef 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3131,10 +3131,8 @@ static void __sched notrace __schedule(bool preempt)
struct task_struct *prev, *next;
unsigned long *switch_count;
struct rq *rq;
- int cpu;
- cpu = smp_processor_id();
- rq = cpu_rq(cpu);
+ rq = this_rq();
prev = rq->curr;
/*
--
1.8.3.1
Powered by blists - more mailing lists