[lkml]   [2011]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3/4] sched: Make sleeping inside spinlock detection working in !CONFIG_PREEMPT
Select CONFIG_PREEMPT_COUNT when we enable the sleeping inside
spinlock detection, so that the preempt offset gets correctly
incremented/decremented from preempt_disable()/preempt_enable().

This makes the preempt count eventually working in !CONFIG_PREEMPT
when that debug option is set and thus fixes the detection of explicit
preemption disabled sections under such config. Code that sleeps
in explicitly preempt disabled section can be finally spotted
in non-preemptible kernels.

Signed-off-by: Frederic Weisbecker <>
Cc: Paul E. McKenney <>
Cc: Ingo Molnar <>
Cc: Peter Zijlstra <>
lib/Kconfig.debug | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 28afa4c..a7dd7b5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -650,6 +650,7 @@ config TRACE_IRQFLAGS

bool "Spinlock debugging: sleep-inside-spinlock checking"
depends on DEBUG_KERNEL
If you say Y here, various routines which may sleep will become very

 \ /
  Last update: 2011-06-08 19:51    [W:0.082 / U:8.600 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site