netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, SteveW@acm.org, dipankar@in.ibm.com
Subject: Re: dn_route.c momentarily exiting RCU read-side critical section
Date: Mon, 5 Nov 2007 08:12:03 -0800	[thread overview]
Message-ID: <20071105161203.GB9479@linux.vnet.ibm.com> (raw)
In-Reply-To: <E1Ip0Vs-0002zP-00@gondolin.me.apana.org.au>

On Mon, Nov 05, 2007 at 07:53:04PM +0800, Herbert Xu wrote:
> Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> >> 
> >> > net/decnet/dn_route.c in dn_rt_cache_get_next() is as follows:
> >> > 
> >> > static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_route *rt)
> >> > {
> >> >     struct dn_rt_cache_iter_state *s = rcu_dereference(seq->private);
> >> > 
> >> >     rt = rt->u.dst.dn_next;
> >> >     while(!rt) {
> >> >             rcu_read_unlock_bh();
> >> >             if (--s->bucket < 0)
> >> >                     break;
> >
> > OK, for my next stupid question: why is the rcu_dereference(seq->private)
> > required, as opposed to simply seq->private?
> 
> It was put there by someone who went through the code converting
> all occurances of smp_read_barrier_depends to rcu_dereference.
> In this instance the rcu_dereference conversion doesn't make much
> sense so we should probably just revert it.

Thank you for the info!  Stupid question #3: what sequence of events
would the smp_read_barrier_depends() be defending against?

							Thanx, Paul

  reply	other threads:[~2007-11-05 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 21:15 dn_route.c momentarily exiting RCU read-side critical section Paul E. McKenney
2007-10-30  8:10 ` David Miller
2007-10-30 15:12   ` Paul E. McKenney
2007-11-05 11:53     ` Herbert Xu
2007-11-05 16:12       ` Paul E. McKenney [this message]
2007-11-05 23:51         ` Herbert Xu

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=20071105161203.GB9479@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=SteveW@acm.org \
    --cc=davem@davemloft.net \
    --cc=dipankar@in.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 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).