函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\migrate.c Create Date:2022-07-27 17:32:37
Last Modify:2022-05-20 09:53:13 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:The expected number of remaining references is the same as that* of migrate_page_move_mapping().

函数原型:int migrate_huge_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
struct page *newpage
struct page *page
514  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, Return the pagecache index of the passed page. Regular pagecache pages* use ->index whereas swapcache pages use swp_offset(->private))
517  xas_lock_irq( & xas)
518  expected_count等于2加页面私有占用
519  如果page_count(page)不等于expected_countxas_load() - Load an entry from the XArray (advanced).*@xas: XArray operation state.* Usually walks the @xas to the appropriate state to load the entry* stored at xa_index. However, it will do nothing and return %NULL if*@xas is in an error state不等于page
520  xas_unlock_irq( & xas)
521  返回:负EAGAIN
524  如果非page_ref_freeze(page, expected_count)则
525  xas_unlock_irq( & xas)
526  返回:负EAGAIN
529  Our offset within mapping. 等于 Our offset within mapping.
530  See page-flags.h for PAGE_MAPPING_FLAGS 等于 See page-flags.h for PAGE_MAPPING_FLAGS
532  get_page(newpage)
534  xas_store() - Store this entry in the XArray
536  page_ref_unfreeze(page, expected_count - 1)
538  xas_unlock_irq( & xas)
540  返回:Return values from addresss_space_operations.migratepage():* - negative errno on page migration failure;* - zero on page migration success;