函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:map_mapping_pages() - Unmap pages from processes.*@mapping: The address space containing pages to be unmapped.*@start: Index of first page to be unmapped.*@nr: Number of pages to be unmapped. 0 to unmap to end of file.

函数原型:void unmap_mapping_pages(struct address_space *mapping, unsigned long start, unsigned long nr, bool even_cows)

返回类型:void

参数:

类型参数名称
struct address_space *mapping
unsigned longstart
unsigned longnr
booleven_cows
2845  struct zap_details details = {}
2847  Check page->mapping if set 等于如果even_cowsNULL否则mapping
2848  Lowest page->index to unmap 等于start
2849  Highest page->index to unmap 等于startnr减1
2850  如果Highest page->index to unmap 小于Lowest page->index to unmap Highest page->index to unmap 等于ULONG_MAX
2853  i_mmap_lock_write(mapping)
2854  如果此条件成立可能性小(为编译器优化)(!RB_EMPTY_ROOT( & rb_root))则unmap_mapping_range_tree( & i_mmap, & details)
2856  i_mmap_unlock_write(mapping)
调用者
名称描述
invalidate_inode_pages2_rangevalidate_inode_pages2_range - remove range of pages from an address_space*@mapping: the address_space*@start: the page offset 'from' which to invalidate*@end: the page offset 'to' which to invalidate (inclusive)* Any pages which are found to be mapped
unmap_mapping_rangemap_mapping_range - unmap the portion of all mmaps in the specified* address_space corresponding to the specified byte range in the underlying* file
dax_insert_entryBy this point grab_mapping_entry() has ensured that we have a locked entry* of the appropriate size so we don't have to worry about downgrading PMDs to* PTEs
truncate_cleanup_pageIf truncate cannot remove the fs-private metadata from the page, the page* becomes orphaned
grab_mapping_entryFind page cache entry at given index. If it is a DAX entry, return it* with the entry locked. If the page cache doesn't contain an entry at* that index, add a locked empty entry.* When requesting an entry with size DAX_PMD, grab_mapping_entry() will