函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-27 15:25:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:static struct file *do_sync_mmap_readahead(struct vm_fault *vmf)

返回类型:struct file

参数:

类型参数名称
struct vm_fault *vmf
2385  file等于File we map to (can be NULL).
2386  ra等于f_ra
2387  mapping等于f_mapping
2388  struct file * fpin = NULL
2389  offset等于Logical page offset based on vma
2392  如果Flags, see mm.h. 按位与App will not benefit from clustered reads 则返回:fpin
2394  如果非Maximum readahead window 则返回:fpin
2397  如果Flags, see mm.h. 按位与App will access data sequentially
2398  fpin等于maybe_unlock_mmap_for_io(vmf, fpin)
2399  page_cache_sync_readahead(mapping, ra, file, offset, Maximum readahead window )
2401  返回:fpin
2405  如果Cache miss stat for mmap accesses 小于MMAP_LOTSAMISS乘10则Cache miss stat for mmap accesses 自加
2412  如果Cache miss stat for mmap accesses 大于MMAP_LOTSAMISS则返回:fpin
2418  fpin等于maybe_unlock_mmap_for_io(vmf, fpin)
2419  where readahead started 等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(long, 0, offset - Maximum readahead window / 2)
2420  # of readahead pages 等于Maximum readahead window
2421  do asynchronous readahead whenthere are only # of pages ahead 等于Maximum readahead window 除4
2422  Submit IO for the read-ahead request in file_ra_state.
2423  返回:fpin
调用者
名称描述
filemap_faultlemap_fault - read in file data for page fault handling*@vmf: struct vm_fault containing details of the fault* filemap_fault() is invoked via the vma operations vector for a* mapped memory region to read in file data during a page fault