lkml.org 
[lkml]   [2007]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/9] readahead: clean up and simplify the code for filemap page fault readahead
On Tue, Dec 18, 2007 at 07:50:33PM +0800, Fengguang Wu wrote:
> On Tue, Dec 18, 2007 at 09:19:07AM +0100, Nick Piggin wrote:
> > On Sun, Dec 16, 2007 at 07:59:30PM +0800, Fengguang Wu wrote:
>
> > > + read_lock_irq(&mapping->tree_lock);
> > > + page = radix_tree_lookup(&mapping->page_tree, offset);
> > > + if (likely(page)) {
> > > + int got_lock, uptodate;
> > > + page_cache_get(page);
> > > +
> > > + got_lock = !TestSetPageLocked(page);
> > > + uptodate = PageUptodate(page);
> > > + read_unlock_irq(&mapping->tree_lock);
> >
> > If we could avoid open coding tree_lock here (and expanding its coverage
> > to PageUptodate), that would be nice. I don't think it gains us too much.
>
> To use find_get_page()? That would be nice to me, too.

Exactly.


\
 
 \ /
  Last update: 2007-12-19 00:57    [W:0.112 / U:0.160 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site