public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org,
	Paul E McKenney <paulmck@us.ibm.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [-mm PATCH] RCU: debug sleep check
Date: Mon, 25 Sep 2006 03:28:52 +0530	[thread overview]
Message-ID: <20060924215851.GH13432@in.ibm.com> (raw)
In-Reply-To: <20060924144440.ca7e6464.akpm@osdl.org>

On Sun, Sep 24, 2006 at 02:44:40PM -0700, Andrew Morton wrote:
> On Mon, 25 Sep 2006 03:05:08 +0530
> Dipankar Sarma <dipankar@in.ibm.com> wrote:
> 
> > On Sun, Sep 24, 2006 at 11:56:46AM -0700, Andrew Morton wrote:
> > > 
> > > Does this actually change anything?  rcu_read_lock is preempt_disable(), and
> > > might_sleep() already triggers if called inside preempt_disable().
> > 
> > It makes a difference if CONFIG_PREEMPT=n. AFAICS, preempt_disable()
> > is a nop then and rcu needs its own check for sleeping while
> > in read-side critical section.
> 
> Right.  I think enough people run with CONFIG_PREEMPT=y to make this
> change rather unnecessary.

I would mostly agree except that for the rcupreempt (-rt) implementation
we don't use preempt_disable/enable in rcu read-side critical section.
So, I have to add a rcu_read_in_atomic() API anyway and there is
no harm in adding the same for rcuclassic (current default)
so that sleeping-while-rcu-atomic check happens irrespective
of CONFIG_PREEMPT. It is included only if CONFIG_DEBUG_SPINLOCK_SLEEP=y.

> 
> And if there are developers out there who are testing their code without an
> effective CONFIG_DEBUG_SPINLOCK_SLEEP, then *that* is what we need to fix,
> no?

Yes. With this patch, I am relying on people to test their
code with CONFIG_DEBUG_SPINLOCK_SLEEP so that we can catch
bad rcu users.

Thanks
Dipankar


  reply	other threads:[~2006-09-24 21:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-23 15:29 [-mm PATCH] RCU: various patches Dipankar Sarma
2006-09-23 15:31 ` [-mm PATCH 1/4] RCU: split classic rcu Dipankar Sarma
2006-09-25 16:54   ` Christoph Hellwig
2006-09-27 16:32     ` Paul E. McKenney
2006-09-28 14:26       ` Christoph Hellwig
2006-09-28 14:44         ` Dipankar Sarma
2006-09-23 15:34 ` [-mm PATCH 2/4]RCU: softirq for RCU Dipankar Sarma
2006-09-23 15:35 ` [-mm PATCH 3/4] RCU: preemptible RCU Dipankar Sarma
2006-09-23 15:36 ` [-mm PATCH 4/4] RCU: preempt rcu trace Dipankar Sarma
2006-09-23 18:56 ` [-mm PATCH] RCU: various patches Dipankar Sarma
2006-09-24  3:01   ` Dipankar Sarma
2006-09-24 14:38     ` Dipankar Sarma
2006-09-24 18:35 ` [-mm PATCH] RCU: debug sleep check Dipankar Sarma
2006-09-24 18:56   ` Andrew Morton
2006-09-24 21:35     ` Dipankar Sarma
2006-09-24 21:44       ` Andrew Morton
2006-09-24 21:58         ` Dipankar Sarma [this message]
2006-09-25 18:08   ` Paul E. McKenney

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=20060924215851.GH13432@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@us.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox