函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:filemap_map_pages

函数原型:void filemap_map_pages(struct vm_fault *vmf, unsigned long start_pgoff, unsigned long end_pgoff)

返回类型:void

参数:

类型参数名称
struct vm_fault *vmf
unsigned longstart_pgoff
unsigned longend_pgoff
2605  file等于File we map to (can be NULL).
2606  mapping等于f_mapping
2607  last_pgoff等于start_pgoff
2609  XA_STATE() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.* Declare and initialise an xa_state on the stack.(xas, & i_pages, start_pgoff)
2612  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2614  如果xas_retry() - Retry the operation if appropriate.*@xas: XArray operation state.*@entry: Entry from xarray.* The advanced functions may sometimes return an internal entry, such as* a retry entry or a zero entry. This function sets up the @xas to restart则继续下一循环
2616  如果xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.则转到:next
2623  如果PageLocked(page)则转到:next
2625  如果非page_cache_get_speculative(page)则转到:next
2629  如果此条件成立可能性小(为编译器优化)(page != xas_reload() - Refetch an entry from the xarray)则转到:skip
2631  page等于find_subpage(page, xa_index)
2633  如果非PageUptodate(page)或PageReadahead(page)或PageHWPoison(page)则转到:skip
2637  如果非Return true if the page was successfully locked则转到:skip
2640  如果 See page-flags.h for PAGE_MAPPING_FLAGS 不等于mapping或非PageUptodate(page)则转到:unlock
2643  max_idx等于DIV_ROUND_UP(NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they , PAGE_SIZE)
2644  如果 Our offset within mapping. 大于等于max_idx则转到:unlock
2647  如果Cache miss stat for mmap accesses 大于0则Cache miss stat for mmap accesses 自减
2650  Faulting virtual address 加等于xa_indexlast_pgoff左移PAGE_SHIFT determines the page size
2651  如果Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated.Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated.加等于xa_indexlast_pgoff
2653  last_pgoff等于xa_index
2654  如果alloc_set_pte(vmf, NULL, page)则转到:unlock
2656  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
2657  转到:next
2658  unlock :
2659  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
2660  :
2661  put_page(page)
2662  :
2664  如果pmd_trans_huge( * Pointer to pmd entry matching* the 'address' )则退出
2667  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()