Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\migrate.c Create Date:2022-07-28 15:58:31
Last Modify:2022-05-20 09:53:13 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:The expected number of remaining references is the same as that* of migrate_page_move_mapping().

Proto:int migrate_huge_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page)

Type:int

Parameter:

TypeParameterName
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 + page_has_private - Determine if page has private stuff*@page: The page to be checked* Determine if a page has private stuff, indicating that release routines* should be invoked upon it.
519  If page_count(page) != expected_count || xas_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 Then
520  xas_unlock_irq( & xas)
521  Return -EAGAIN
524  If Not page_ref_freeze(page, expected_count) Then
525  xas_unlock_irq( & xas)
526  Return -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 Return values from addresss_space_operations.migratepage():* - negative errno on page migration failure;* - zero on page migration success;