linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP
@ 2016-02-12 18:14 Yang Shi
  2016-02-13 12:11 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Shi @ 2016-02-12 18:14 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, linaro-kernel, yang.shi

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP
  2016-02-12 18:14 [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP Yang Shi
@ 2016-02-13 12:11 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2016-02-13 12:11 UTC (permalink / raw)
  To: Yang Shi; +Cc: mingo, linux-kernel, linaro-kernel

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-13 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 18:14 [PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP Yang Shi
2016-02-13 12:11 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).