函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:migrate_pages - migrate the pages specified in a list, to the free pages* supplied as the target for the page migration*@from: The list of pages to be migrated.*@get_new_page: The function used to allocate free pages to be used

函数原型:int migrate_pages(struct list_head *from, new_page_t get_new_page, free_page_t put_new_page, unsigned long private, enum migrate_mode mode, int reason)

返回类型:int

参数:

类型参数名称
struct list_head *from
new_page_tget_new_page
free_page_tput_new_page
unsigned longprivate
enum migrate_modemode
intreason
1399  retry等于1
1400  nr_failed等于0
1401  nr_succeeded等于0
1402  pass等于0
1405  swapwrite等于flags按位与Allowed to write to swap
1408  如果非swapwriteflags或等于Allowed to write to swap
1411 pass小于10且retry循环
1412  retry等于0
1415  retry :
1416  cond_resched()
1418  如果PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details.rc等于Counterpart of unmap_and_move_page() for hugepage migration
1422  否则rc等于Obtain the lock on page, remove all ptes and migrate the page* to the newly allocated page in newpage.
1428  :rc恒等于负ENOMEM
1449  nr_failed自加
1450  转到:out
1451  :rc恒等于负EAGAIN
1452  retry自加
1453  退出
1455  nr_succeeded自加
1456  退出
1457  默认
1464  nr_failed自加
1465  退出
1469  nr_failed加等于retry
1470  rc等于nr_failed
1471  out :
1472  如果nr_succeededcount_vm_events(PGMIGRATE_SUCCESS, nr_succeeded)
1474  如果nr_failedcount_vm_events(PGMIGRATE_FAIL, nr_failed)
1476  trace_mm_migrate_pages(nr_succeeded, nr_failed, mode, reason)
1478  如果非swapwriteflags与等于Allowed to write to swap 的反
1481  返回:rc
调用者
名称描述
migrate_to_nodeMigrate pages from one node to a target node.* Returns error or the number of pages not migrated.
do_mbind
do_move_pages_to_node
soft_offline_huge_page
__soft_offline_page
check_and_migrate_cma_pages