Re: [PATCH 2/9] readahead: clean up and simplify the code for filemap page fault readahead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux