From: Peter Zijlstra <peterz@infradead.org>
To: Nick Piggin <npiggin@suse.de>
Cc: Linux Memory Management <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch 3/9] radix-tree: gang slot lookups
Date: Fri, 01 Jun 2007 12:31:18 +0200 [thread overview]
Message-ID: <1180693878.7348.119.camel@twins> (raw)
In-Reply-To: <20070412103223.5564.13412.sendpatchset@linux.site>
On Thu, 2007-04-12 at 14:45 +0200, Nick Piggin wrote:
> @@ -825,13 +889,21 @@ radix_tree_gang_lookup_tag(struct radix_
>
> ret = 0;
> while (ret < max_items) {
> - unsigned int nr_found;
> + unsigned int slots_found, nr_found, i;
> unsigned long next_index; /* Index of next search */
>
> if (cur_index > max_index)
> break;
> - nr_found = __lookup_tag(node, results + ret, cur_index,
> - max_items - ret, &next_index, tag);
> + slots_found = __lookup_tag(node, (void ***)results + ret,
> + cur_index, max_items - ret, &next_index, tag);
> + nr_found = 0;
> + for (i = 0; i < slots_found; i++) {
> + node = *((void ***)results)[ret + i];
> + if (!node)
> + continue;
> + results[ret + nr_found] = rcu_dereference(node);
I think this should read (as you correctly did in
radix_tree_gang_lookup):
struct radix_tree_node *slot;
slot = *((void ***)results)[ret + i];
if (!slot)
continue;
results[ret + nr_found] = rcu_dereference(slot);
by overwriting node, a subsequent __lookup_tag() will do the darnest
things.
> + nr_found++;
> + }
> ret += nr_found;
> if (next_index == 0)
> break;
--
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:[~2007-06-01 10:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 12:44 [patch 0/9] lockless pagecache for 2.6.21-rc6 Nick Piggin
2007-04-12 12:44 ` [patch 1/9] mm: prep find_lock_page Nick Piggin
2007-04-12 12:45 ` [patch 2/9] radix-tree: use indirect bit Nick Piggin
2007-04-12 12:45 ` [patch 3/9] radix-tree: gang slot lookups Nick Piggin
2007-06-01 10:31 ` Peter Zijlstra [this message]
2007-04-12 12:45 ` [patch 4/9] mm: __add_to_swap_cache stuff Nick Piggin
2007-04-12 12:45 ` [patch 5/9] mm: lockless probe Nick Piggin
2007-04-12 12:45 ` [patch 6/9] mm: speculative get page Nick Piggin
2007-04-16 18:54 ` Hugh Dickins
2007-04-17 3:09 ` Nick Piggin
2007-04-12 12:45 ` [patch 7/9] mm: lockless pagecache lookups Nick Piggin
2007-04-12 12:46 ` [patch 8/9] mm: spinlock tree_lock Nick Piggin
2007-04-12 12:46 ` [patch 9/9] mm: lockless test threads Nick Piggin
2007-04-13 16:54 ` Hugh Dickins
2007-04-13 23:31 ` Nick Piggin
2007-04-12 12:46 ` [rfc] rename page_count for lockless pagecache Nick Piggin
2007-04-12 17:03 ` Peter Zijlstra
2007-04-12 23:27 ` Nick Piggin
2007-04-13 11:53 ` Hugh Dickins
2007-04-13 12:13 ` Nick Piggin
2007-04-14 2:24 ` Nick Piggin
2007-04-16 18:28 ` Hugh Dickins
2007-04-17 3:07 ` Nick Piggin
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=1180693878.7348.119.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
/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