linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Andrew Morton <akpm@osdl.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Christoph Lameter <clameter@sgi.com>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] radix-tree:  cleanup radix_tree_deref_slot() and _lookup_slot() comments
Date: Fri, 25 Aug 2006 22:25:46 -0700	[thread overview]
Message-ID: <20060826052546.GB25058@us.ibm.com> (raw)
In-Reply-To: <1156431882.5165.31.camel@localhost>

On Thu, Aug 24, 2006 at 11:04:41AM -0400, Lee Schermerhorn wrote:
> On Wed, 2006-08-23 at 22:24 -0700, Paul E. McKenney wrote:
> > On Tue, Aug 22, 2006 at 04:32:52PM -0400, Lee Schermerhorn wrote:
> > > Andrew:  here is a second patch that just cleans up [I think] the
> > > '_deref_slot() function, and adds more explanation of expected/required
> > > locking to the direct slot access functions.  I separated it out,
> > > because it doesn't fix a serious bug, like the previous one.
> > > 
> > > Paul:  do you agree that we don't need rcu_dereference() in the
> > > _deref_slot() as it can only be used while the tree is held [probably
> > > write] locked?  Do the comments look OK?
> > 
> > Yep, rcu_dereference() is not needed if the tree is prevented from
> > changing.  That said, rcu_dereference() is zero cost on all but
> > Alpha, so there is little benefit to be had from removing it.
> 
> I wasn't concerned about the cost.  I just thought it would be
> "misleading" if, as you have verified, that it's not required, because
> the comment on rcu_dereference() says that one important aspect of using
> rcu_dereference() is to document which pointers are protected by RCU.  

Fair enough!  My hope is that this will eventually be settled by
the needs of RCU-based static-analysis tooling, but we are not there
yet.

						Thanx, Paul

> > The comments look much improved.
> 
> Thanks,
> Lee
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2006-08-26  5:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-22 20:32 Lee Schermerhorn
2006-08-23 17:51 ` Randy.Dunlap
2006-08-23 18:50   ` Lee Schermerhorn
2006-08-23 19:06     ` Randy.Dunlap
2006-08-24  5:24 ` Paul E. McKenney
2006-08-24 15:04   ` Lee Schermerhorn
2006-08-26  5:25     ` Paul E. McKenney [this message]

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=20060826052546.GB25058@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    /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