Re: Setting of the PageReadahed bit

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

 



On Fri, Jun 3, 2011 at 4:55 AM, Matthew Wilcox <willy@xxxxxxxxxxxxxxx> wrote:
> The exact definition of PageReadahead doesn't seem to be documented
> anywhere. ÂI'm assuming it means "This page was not directly requested;
> it is being read for prefetching purposes", exactly like the READA
> semantics.
>
> If my interpretation is correct, then the implementation in
> __do_page_cache_readahead is wrong:
>
> Â Â Â Â Â Â Â Âif (page_idx == nr_to_read - lookahead_size)
> Â Â Â Â Â Â Â Â Â Â Â ÂSetPageReadahead(page);
>
> It'll only set the PageReadahead bit on one page. ÂThe patch below fixes
> this ... if my understanding is correct.

Incorrect I believe: it's a trigger to say, when you get this far,
it's time to think about kicking off the next read.

>
> If my understanding is wrong, then how are readpage/readpages
> implementations supposed to know that the VM is only prefetching these
> pages, and they're not as important as metadata (dependent) reads?

I don't think they do know at present; but I can well imagine there
may be advantage in them knowing.

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]