函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\readahead.c Create Date:2022-07-27 15:35:48
Last Modify:2020-03-17 21:13:07 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:page cache context based read-ahead

函数原型:static int try_context_readahead(struct address_space *mapping, struct file_ra_state *ra, unsigned long offset, unsigned long req_size, unsigned long max)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
struct file_ra_state *ra
unsigned longoffset
unsigned longreq_size
unsigned longmax
355  size等于Count contiguously cached pages from @offset-1 to @offset-@max,* this count is a conservative estimation of* - length of the sequential read sequence, or* - thrashing threshold in memory tight systems
361  如果size小于等于req_size则返回:0
368  如果size大于等于offsetsize乘等于2
371  where readahead started 等于offset
372  # of readahead pages 等于两数取小(size + req_size, max)
373  do asynchronous readahead whenthere are only # of pages ahead 等于1
375  返回:1
调用者
名称描述
ondemand_readaheadA minimal readahead algorithm for trivial sequential/random reads.