函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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,

函数原型:void page_cache_sync_readahead(struct address_space *mapping, struct file_ra_state *ra, struct file *filp, unsigned long offset, unsigned long req_size)

返回类型:void

参数:

类型参数名称
struct address_space *mapping
struct file_ra_state *ra
struct file *filp
unsigned longoffset
unsigned longreq_size
514  如果非Maximum readahead window 则返回
517  如果blk_cgroup_congested()则返回
521  如果filpf_mode按位与Expect random access pattern
522  Chunk the readahead into 2 megabyte units, so that we don't pin too much* memory at once.
523  返回
527  A minimal readahead algorithm for trivial sequential/random reads.
调用者
名称描述
do_sync_mmap_readaheadSynchronous readahead happens when we don't even find a page in the page* cache at all. We don't want to perform IO under the mmap sem, so if we have* to drop the mmap sem we return the file that was pinned in order for us to do* that
generic_file_buffered_readgeneric_file_buffered_read - generic file read routine*@iocb: the iocb to read*@iter: data destination*@written: already copied* This is a generic file read routine, and uses the* mapping->a_ops->readpage() function for the actual low-level stuff.