]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Reassign prev and switch_count when reacquire_kernel_lock() fail
authorYong Zhang <yong.zhang0@gmail.com>
Mon, 11 Jan 2010 06:21:25 +0000 (14:21 +0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 21 Jan 2010 12:39:04 +0000 (13:39 +0100)
commitc19dfdfdf6d8b28fd94e769cdd5889e2a37c3e6e
treedbad2aa9c5874ea7ee5fff1f9f32b0be208c3df6
parent46c4f4c076ad02dd3ae2378f07355df62d5e7ca9
sched: Reassign prev and switch_count when reacquire_kernel_lock() fail

Assume A->B schedule is processing, if B have acquired BKL before and it
need reschedule this time. Then on B's context, it will go to
need_resched_nonpreemptible for reschedule. But at this time, prev and
switch_count are related to A. It's wrong and will lead to incorrect
scheduler statistics.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <2674af741001102238w7b0ddcadref00d345e2181d11@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c