lkml.org 
[lkml]   [2006]   [Apr]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 30 Apr 2006 13:39:06 +0200
FromJens Axboe <>
SubjectRe: Lockless page cache test results
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-30 11:43    [from the cache]
©2003-2008