sched: Kill task_preempt_count()
authorOleg Nesterov <oleg@redhat.com>
Wed, 8 Oct 2014 18:33:48 +0000 (20:33 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 Oct 2014 09:47:56 +0000 (10:47 +0100)
commitd62e73a21cc4b3cbe1f723915796c3c2adfac679
tree36cb6f16841d5e2ee4363b0ec8c421e22942fb5f
parent9bb856ecec1ace8c122743aac8ac8fe9b4ccb704
sched: Kill task_preempt_count()

task_preempt_count() is pointless if preemption counter is per-cpu,
currently this is x86 only. It is only valid if the task is not
running, and even in this case the only info it can provide is the
state of PREEMPT_ACTIVE bit.

Change its single caller to check p->on_rq instead, this should be
the same if p->state != TASK_RUNNING, and kill this helper.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Kirill Tkhai <tkhai@yandex.ru>
Cc: Alexander Graf <agraf@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Lameter <cl@linux.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Link: http://lkml.kernel.org/r/20141008183348.GC17495@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/preempt.h
include/asm-generic/preempt.h
kernel/sched/core.c