Function report |
Source Code:mm\readahead.c |
Create Date:2022-07-28 14:12:12 |
Last Modify:2020-03-17 21:13:07 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:A minimal readahead algorithm for trivial sequential/random reads.
Proto:static unsigned long ondemand_readahead(struct address_space *mapping, struct file_ra_state *ra, struct file *filp, bool hit_readahead_marker, unsigned long offset, unsigned long req_size)
Type:unsigned long
Parameter:
Type | Parameter | Name |
---|---|---|
struct address_space * | mapping | |
struct file_ra_state * | ra | |
struct file * | filp | |
bool | hit_readahead_marker | |
unsigned long | offset | |
unsigned long | req_size |
387 | bdi = inode_to_bdi(host) |
402 | If Not offset Then Go to initial_readahead |
412 | # of readahead pages = Get the previous window size, ramp it up, and* return it as the new window size. |
414 | Go to readit |
423 | If hit_readahead_marker Then |
433 | where readahead started = start |
434 | # of readahead pages = start - offset |
435 | # of readahead pages += req_size |
436 | # of readahead pages = Get the previous window size, ramp it up, and* return it as the new window size. |
438 | Go to readit |
444 | If req_size > max_pages Then Go to initial_readahead |
453 | If offset - prev_offset <= 1UL Then Go to initial_readahead |
460 | If page cache context based read-ahead Then Go to readit |
469 | initial_readahead : |
472 | do asynchronous readahead whenthere are only # of pages ahead = If # of readahead pages > req_size Then # of readahead pages - req_size Else # of readahead pages |
474 | readit : |
483 | If # of readahead pages + add_pages <= max_pages Then |
485 | # of readahead pages += add_pages |
486 | Else |
Name | Describe |
---|---|
page_cache_sync_readahead | page_cache_sync_readahead - generic file readahead*@mapping: address_space which holds the pagecache and I/O vectors*@ra: file_ra_state which holds the readahead state*@filp: passed on to ->readpage() and ->readpages()*@offset: start offset into @mapping, |
page_cache_async_readahead | page_cache_async_readahead - file readahead for marked pages*@mapping: address_space which holds the pagecache and I/O vectors*@ra: file_ra_state which holds the readahead state*@filp: passed on to ->readpage() and ->readpages()*@page: the page at @offset |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |