diff options
author | Oleg Nesterov <oleg@redhat.com> | 2010-05-19 14:57:11 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-06-09 10:34:50 +0200 |
commit | 246d86b51845063e4b06b27579990492dc5fa317 (patch) | |
tree | 3f60fc00b8cc587826cc76e31a1afb92353d08dd /kernel/sched_fair.c | |
parent | c676329abb2b8359d9a5d734dec0c81779823fd6 (diff) |
sched: Simplify the reacquire_kernel_lock() logic
- Contrary to what 6d558c3a says, there is no need to reload
prev = rq->curr after the context switch. You always schedule
back to where you came from, prev must be equal to current
even if cpu/rq was changed.
- This also means reacquire_kernel_lock() can use prev instead
of current.
- No need to reassign switch_count if reacquire_kernel_lock()
reports need_resched(), we can just move the initial assignment
down, under the "need_resched_nonpreemptible:" label.
- Try to update the comment after context_switch().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100519125711.GA30199@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
0 files changed, 0 insertions, 0 deletions