From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: paulmck@us.ibm.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: Thu, 24 Aug 2006 11:04:41 -0400 [thread overview]
Message-ID: <1156431882.5165.31.camel@localhost> (raw)
In-Reply-To: <20060824052410.GD18961@us.ibm.com>
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.
>
> 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>
next prev parent reply other threads:[~2006-08-24 15:04 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 [this message]
2006-08-26 5:25 ` 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=1156431882.5165.31.camel@localhost \
--to=lee.schermerhorn@hp.com \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--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