]> git.baikalelectronics.ru Git - kernel.git/commit
sched: access local runqueue directly in single_task_running
authorDominik Dingel <dingel@linux.vnet.ibm.com>
Fri, 18 Sep 2015 09:27:45 +0000 (11:27 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Sep 2015 11:47:59 +0000 (13:47 +0200)
commitf9170a591e9fb64cd24ca14cfe2d1004ef4074f8
treee2d7d478433a78a135df3aa575cfad98a34c950a
parent47df63ba38f937185a976a4722b52d48a277a0d5
sched: access local runqueue directly in single_task_running

Commit 8fe0b39b8a0e ("sched: Add function single_task_running to let a task
check if it is the only task running on a cpu") referenced the current
runqueue with the smp_processor_id.  When CONFIG_DEBUG_PREEMPT is enabled,
that is only allowed if preemption is disabled or the currrent task is
bound to the local cpu (e.g. kernel worker).

With commit 3a946e741ed4 ("kvm: add halt_poll_ns module parameter") KVM
calls single_task_running. If CONFIG_DEBUG_PREEMPT is enabled that
generates a lot of kernel messages.

To avoid adding preemption in that cases, as it would limit the usefulness,
we change single_task_running to access directly the cpu local runqueue.

Cc: Tim Chen <tim.c.chen@linux.intel.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@vger.kernel.org>
Fixes: 8fe0b39b8a0eb9c0c6b0a7eb4b8ecf6a1addbe7c
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
kernel/sched/core.c