函数逻辑报告 |
Source Code:mm\readahead.c |
Create Date:2022-07-27 15:35:54 |
Last Modify:2020-03-17 21:13:07 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:A minimal readahead algorithm for trivial sequential/random reads.
函数原型: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)
返回类型:unsigned long
参数:
类型 | 参数 | 名称 |
---|---|---|
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) |
396 | 如果req_size大于max_pages且 max allowed IO size 大于max_pages则max_pages等于两数取小(req_size, max allowed IO size ) |
402 | 如果非offset则转到:initial_readahead |
412 | # of readahead pages 等于Get the previous window size, ramp it up, and* return it as the new window size. |
414 | 转到:readit |
423 | 如果hit_readahead_marker则 |
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 | 转到:readit |
444 | 如果req_size大于max_pages则转到:initial_readahead |
453 | 如果offset减prev_offset小于等于1UL则转到:initial_readahead |
469 | initial_readahead : |
472 | do asynchronous readahead whenthere are only # of pages ahead 等于如果# of readahead pages 大于req_size则# of readahead pages 减req_size否则# of readahead pages |
474 | readit : |
名称 | 描述 |
---|---|
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 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |