page_cache_readahead_adaptive — thrashing safe adaptive read-ahead
unsigned long page_cache_readahead_adaptive ( | struct address_space * mapping, |
| struct file_ra_state * ra, | |
| struct file * filp, | |
| struct page * page, | |
| pgoff_t offset, | |
unsigned long req_size); |
mapping-- undescribed --
ra-- undescribed --
filp-- undescribed --
page
the page at offset, or NULL if non-present
offset-- undescribed --
req_size-- undescribed --
page_cache_readahead_adaptive is the entry point of the adaptive
read-ahead logic. It tries a set of methods in turn to determine the
appropriate readahead action and submits the readahead I/O.
page_cache_readahead_adaptive is the entry point of the adaptive
read-ahead logic. It tries a set of methods in turn to determine the
appropriate readahead action and submits the readahead I/O.
1. page == NULL
A cache miss happened, some pages have to be read in
2. page != NULL && PageReadahead(page)
A look-ahead mark encountered, this is set by a previous read-ahead
invocation to instruct the caller to give the function a chance to
check up and do next read-ahead in advance.