Re: Lockless page cache test results

From: Jens Axboe
Date: Thu Apr 27 2006 - 04:59:20 EST


On Thu, Apr 27 2006, Nick Piggin wrote:
> Nick Piggin wrote:
> >Jens Axboe wrote:
> >
> >>Things look pretty bad for the lockless kernel though, Nick any idea
> >>what is going on there? The splice change is pretty simple, see the top
> >>three patches here:
> >
> >
> >Could just be the use of spin lock instead of read lock.
> >
> >I don't think it would be hard to convert find_get_pages_contig
> >to be lockless.
> >
> >Patched vanilla numbers look nicer, but I'm curious as to why
> >__do_page_cache was so bad before, if the file was in cache.
> >Presumably it should not more than double tree_lock acquisition...
> >it isn't getting called multiple times for each page, is it?
>
> Hmm, what's more, find_get_pages_contig shouldn't result in any
> fewer tree_lock acquires than the open coded thing there now
> (for the densely populated pagecache case).

How do you figure? The open coded one does a find_get_page() on each
page in that range, so for x number of pages we'll grab and release
->tree_lock x times.

For the fully populated page case, find_get_pages_contig() should return
the full range of x pages with just one grab/release of ->tree_lock.

--
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/