Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1347983
| From | Alexander Gordeev <agordeev@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 2/2] sched/core: Get rid of 'cpu' local variable in __schedule() |
| Date | 2016-03-02 13:00 +0100 |
| Message-ID | <r8dBD-75k-11@gated-at.bofh.it> (permalink) |
| References | <r8dBD-75k-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Alexander Gordeev <agordeev@redhat.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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v3 2/2] sched/core: Get rid of 'cpu' local variable in __schedule() Alexander Gordeev <agordeev@redhat.com> - 2016-03-02 13:00 +0100 Re: [PATCH v3 2/2] sched/core: Get rid of 'cpu' local variable in __schedule() Peter Zijlstra <peterz@infradead.org> - 2016-03-02 13:10 +0100
csiph-web