Info

struct file_ra_state {

unsigned int size; /*

unsigned int async_size; /*

unsigned int ra_pages; /*

start denotes the position in the page cache where readahead was started, and size gives the size of the readahead window. async_size represents the least number of remaining readahead pages. If only this many pages are still available in the readahead window, then asynchronous readahead is initiated to bring more pages into the page cache. The meaning of these values is also illustrated in Figure 16-4.

ra_pages denotes the maximum size of the readahead window. The kernel can decide to read in fewer pages than specified by this value, but it will never read in more. Finally, prev_pos denotes the position that was last visited in previous reads.

Continue reading here: The offset is given as a byte offset into the file not as a page offset into the page cache This allows filesystem code that does not know anything about page cache offsets to aid the readahead mechanism

Was this article helpful?

0 0