linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <piggin@cyberone.com.au>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-mm <linux-mm@kvack.org>,
	Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Subject: Re: radix_tree_lookup_slot() comment
Date: Mon, 25 Sep 2006 00:40:00 +1000	[thread overview]
Message-ID: <451698C0.9000903@cyberone.com.au> (raw)
In-Reply-To: <1159036821.5196.8.camel@lappy>

Hi Peter,

Yes, that looks much better, thanks.

BTW. this latest patchset has at least one -mm mismerge (page flags bit),
so I would advise against testing (though do appreciate reviews). I'll
send Andrew a more thorough version against 2.6.18-mm1.

Thanks,
Nick

Peter Zijlstra wrote:

>Hi Nick,
>
>I noticed the comment above radix_tree_lookup_slot() did not match the
>uses in your lockless pagecache. Would this patch be correct?
>
>---
> lib/radix-tree.c |    9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
>Index: linux-2.6-mm/lib/radix-tree.c
>===================================================================
>--- linux-2.6-mm.orig/lib/radix-tree.c	2006-09-23 20:20:21.000000000 +0200
>+++ linux-2.6-mm/lib/radix-tree.c	2006-09-23 20:34:31.000000000 +0200
>@@ -380,11 +380,10 @@ EXPORT_SYMBOL(radix_tree_insert);
>  *	Returns:  the slot corresponding to the position @index in the
>  *	radix tree @root. This is useful for update-if-exists operations.
>  *
>- *	This function cannot be called under rcu_read_lock, it must be
>- *	excluded from writers, as must the returned slot for subsequent
>- *	use by radix_tree_deref_slot() and radix_tree_replace slot.
>- *	Caller must hold tree write locked across slot lookup and
>- *	replace.
>+ * 	This function can be called under rcu_read_lock iff the slot is not
>+ * 	modified by radix_tree_replace_slot, otherwise it must be called
>+ * 	exclusive from other writers. Any dereference of the slot must be done
>+ * 	using radix_tree_deref_slot.
>  */
> void **radix_tree_lookup_slot(struct radix_tree_root *root, unsigned long index)
> {
>  
>

--
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-09-24 14:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-23 18:40 Peter Zijlstra
2006-09-24 14:40 ` Nick Piggin [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=451698C0.9000903@cyberone.com.au \
    --to=piggin@cyberone.com.au \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-mm@kvack.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