Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1333013 > unrolled thread

[PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP

Started byYang Shi <yang.shi@linaro.org>
First post2016-02-12 19:40 +0100
Last post2016-02-13 13:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP Yang Shi <yang.shi@linaro.org> - 2016-02-12 19:40 +0100
    Re: [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in  DEBUG_ATOMIC_SLEEP Peter Zijlstra <peterz@infradead.org> - 2016-02-13 13:20 +0100

#1333013 — [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP

FromYang Shi <yang.shi@linaro.org>
Date2016-02-12 19:40 +0100
Subject[PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP
Message-ID<r1qNl-2ew-29@gated-at.bofh.it>
When building non-preempt kernel (PREEMPT_NONE), PREEMPT_COUNT is still enabled
if DEBUG_ATOMIC_SLEEP is enabled. But, it sounds not make sense to have
PREEMPT_COUNT set in non-preempt kernel.

So, make PREEMPT_COUNT depend on PREEMPT here.

Signed-off-by: Yang Shi <yang.shi@linaro.org>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index ecb9e75..a5b6e11 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1075,7 +1075,7 @@ config DEBUG_LOCKDEP
 
 config DEBUG_ATOMIC_SLEEP
 	bool "Sleep inside atomic section checking"
-	select PREEMPT_COUNT
+	select PREEMPT_COUNT if PREEMPT
 	depends on DEBUG_KERNEL
 	help
 	  If you say Y here, various routines which may sleep will become very
-- 
2.0.2

[toc] | [next] | [standalone]


#1333313 — Re: [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP

FromPeter Zijlstra <peterz@infradead.org>
Date2016-02-13 13:20 +0100
SubjectRe: [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP
Message-ID<r1Hl8-4EJ-13@gated-at.bofh.it>
In reply to#1333013
On Fri, Feb 12, 2016 at 10:14:22AM -0800, Yang Shi wrote:
> When building non-preempt kernel (PREEMPT_NONE), PREEMPT_COUNT is still enabled
> if DEBUG_ATOMIC_SLEEP is enabled. But, it sounds not make sense to have
> PREEMPT_COUNT set in non-preempt kernel.
> 
> So, make PREEMPT_COUNT depend on PREEMPT here.
> 
> Signed-off-by: Yang Shi <yang.shi@linaro.org>
> ---
>  lib/Kconfig.debug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index ecb9e75..a5b6e11 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1075,7 +1075,7 @@ config DEBUG_LOCKDEP
>  
>  config DEBUG_ATOMIC_SLEEP
>  	bool "Sleep inside atomic section checking"
> -	select PREEMPT_COUNT
> +	select PREEMPT_COUNT if PREEMPT

OK, so do tell, how is it supposed to debug atomic sections without
actually tracking atomic sections?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web