Re: Lockless page cache test results

From: Jens Axboe
Date: Sun Apr 30 2006 - 07:40:06 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/