Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-28 14:02:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static struct file *do_sync_mmap_readahead(struct vm_fault *vmf)

Type:struct file

Parameter:

TypeParameterName
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  If Flags, see mm.h. & App will not benefit from clustered reads Then Return fpin
2394  If Not Maximum readahead window Then Return fpin
2397  If Flags, see mm.h. & App will access data sequentially Then
2398  fpin = maybe_unlock_mmap_for_io(vmf, fpin)
2399  page_cache_sync_readahead(mapping, ra, file, offset, Maximum readahead window )
2401  Return fpin
2405  If Cache miss stat for mmap accesses < MMAP_LOTSAMISS * 10 Then Cache miss stat for mmap accesses ++
2412  If Cache miss stat for mmap accesses > MMAP_LOTSAMISS Then Return 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  Return fpin
Caller
NameDescribe
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