Name

page_cache_readahead_adaptive — thrashing safe adaptive read-ahead

Synopsis

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);
 

Arguments

mapping

-- undescribed --

ra

-- undescribed --

filp

-- undescribed --

page

the page at offset, or NULL if non-present

offset

-- undescribed --

req_size

-- undescribed --

Description

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.

Description

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.

This function is expected to be called on two conditions

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.