All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 3/4] sched: Make sleeping inside spinlock detection working in !CONFIG_PREEMPT
Date: Wed, 8 Jun 2011 12:40:40 -0700	[thread overview]
Message-ID: <20110608194040.GF2324@linux.vnet.ibm.com> (raw)
In-Reply-To: <1307555315-30989-4-git-send-email-fweisbec@gmail.com>

On Wed, Jun 08, 2011 at 07:48:34PM +0200, Frederic Weisbecker wrote:
> 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 <fweisbec@gmail.com>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
>  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
> 
>  config DEBUG_SPINLOCK_SLEEP
>  	bool "Spinlock debugging: sleep-inside-spinlock checking"
> +	select PREEMPT_COUNT
>  	depends on DEBUG_KERNEL
>  	help
>  	  If you say Y here, various routines which may sleep will become very
> -- 
> 1.7.5.4
> 

  reply	other threads:[~2011-06-08 19:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 17:48 [PATCH 0/4] sched: Make sleep inside atomic detection work on !PREEMPT Frederic Weisbecker
2011-06-08 17:48 ` [PATCH 1/4] sched: Remove pointless in_atomic() definition check Frederic Weisbecker
2011-06-08 17:48 ` [PATCH 2/4] sched: Isolate preempt counting in its own config option Frederic Weisbecker
2011-06-08 19:40   ` Paul E. McKenney
2011-06-08 19:47   ` Peter Zijlstra
2011-06-08 19:58     ` Paul E. McKenney
2011-06-08 20:09       ` Peter Zijlstra
2011-06-08 17:48 ` [PATCH 3/4] sched: Make sleeping inside spinlock detection working in !CONFIG_PREEMPT Frederic Weisbecker
2011-06-08 19:40   ` Paul E. McKenney [this message]
2011-06-08 17:48 ` [PATCH 4/4] sched: Generalize sleep inside spinlock detection Frederic Weisbecker
2011-06-08 19:41   ` Paul E. McKenney
2011-06-08 22:49 ` Bug: ACPI, scheduling while atomic (was Re: [PATCH 0/4] sched: Make sleep inside atomic detection work on !PREEMPT) Frederic Weisbecker
2011-08-25  3:57   ` Randy Dunlap
2011-08-27 15:32     ` Frederic Weisbecker
2011-09-26 22:33     ` Davidlohr Bueso
2011-09-26 22:54       ` Paul E. McKenney
  -- strict thread matches above, loose matches on Subject: below --
2011-06-10 13:30 [GIT PULL] sched: Make sleep inside atomic detection work on !PREEMPT Frederic Weisbecker
2011-06-10 13:30 ` [PATCH 3/4] sched: Make sleeping inside spinlock detection working in !CONFIG_PREEMPT Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110608194040.GF2324@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.