Re: Lockless page cache test results

Jens Axboe
2006-04-30T11:38:30Z

On Sun, Apr 30 2006, Nick Piggin wrote:
> @@ -407,19 +422,10 @@
> int error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM);
>
> if (error == 0) {
> - write_lock_irq(&mapping->tree_lock);
> - error = radix_tree_insert(&mapping->page_tree, offset, page);
> - if (!error) {
> - page_cache_get(page);
> - SetPageLocked(page);
> - page->mapping = mapping;
> - page->index = offset;
> - mapping->nrpages++;
> - pagecache_acct(1);
> - }
> - write_unlock_irq(&mapping->tree_lock);
> + error = __add_to_page_cache(page, mapping, offset);
> radix_tree_preload_end();
> }
> +
> return error;

You killed a lock too many there. I'm sure it'd help scalability,
though :-)

--
Jens Axboe