All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Jim Houston <jim.houston@comcast.net>
Cc: dipankar@in.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC&PATCH] Alternative RCU implementation
Date: Tue, 31 Aug 2004 17:57:50 -0700	[thread overview]
Message-ID: <20040901005750.GG1241@us.ibm.com> (raw)
In-Reply-To: <1093997450.4069.1.camel@new.localdomain>

On Tue, Aug 31, 2004 at 08:10:50PM -0400, Jim Houston wrote:
> On Mon, 2004-08-30 at 13:38, Dipankar Sarma wrote:
> 
> > > I'm also trying to figure out if I need the call_rcu_bh() changes.
> > > Since my patch will recognize a grace periods as soon as any 
> > > pending read-side critical sections complete, I suspect that I
> > > don't need this change.
> > 
> > Except that under a softirq flood, a reader in a different read-side
> > critical section may get delayed a lot holding up RCU. Let me know
> > if I am missing something here.
> 
> Hi Dipankar,
> 
> O.k.  That makes sense.  So the rcu_read_lock_bh(), rcu_read_unlock_bh()
> and call_rcu_bh() would be the preferred interface.  Are there cases
> where they can't be used?  How do you decide where to use the _bh 
> flavor?

Hello, Jim,

You would use rcu_read_lock() instead of rcu_read_lock_bh() in cases
where you did not want the read-side code to disable bottom halves.
This is very similar to choosing between read_lock() and read_lock_bh()
-- if you unnecessarily use read_lock_bh() or rcu_read_lock_bh(), you
will be unnecessarily delaying drivers' bottom-half execution.

> I see that local_bh_enable() WARNS if interrupts are disabled.  Is that
> the issue?  Are rcu_read_lock()/rcu_read_unlock() ever called from 
> code which disables interrupts?

The RCU "_bh()" interfaces correspond to a different set of quiescent
states than do the standard interfaces.  You could indeed use
rcu_read_lock() with interrupts disabled, but I don't know of any
such use.

						Thanx, Paul

> Jim Houston - Concurrent Computer Corp.
> 
> 

  reply	other threads:[~2004-09-01  1:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3brgwgi30.fsf@new.localdomain>
2004-08-30  0:43 ` [RFC&PATCH] Alternative RCU implementation Paul E. McKenney
2004-08-30 17:13   ` Jim Houston
2004-08-30 17:38     ` Dipankar Sarma
2004-09-01  0:10       ` Jim Houston
2004-09-01  0:57         ` Paul E. McKenney [this message]
2004-08-30 18:52     ` Paul E. McKenney
2004-08-31  3:22       ` Jim Houston
2004-09-01  3:53         ` Paul E. McKenney
2004-09-01 13:02           ` Jim Houston
2004-09-02 16:38             ` Paul E. McKenney
2004-09-02 18:54               ` Jim Houston
2004-09-02 21:20                 ` Manfred Spraul
2004-09-03  1:19                   ` Jim Houston

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=20040901005750.GG1241@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=dipankar@in.ibm.com \
    --cc=jim.houston@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    /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.