函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-27 17:04:35
Last Modify:2020-03-17 22:28:11 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Move pages between the two nodesets so as to preserve the physical* layout as much as possible.* Returns the number of page that could not be moved.

函数原型:int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, const nodemask_t *to, int flags)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
const nodemask_t *from
const nodemask_t *to
intflags
1077  busy等于0
1081  err等于migrate_prep() needs to be called before we start compiling a list of pages* to be migrated using isolate_lru_page(). If scheduling work on other CPUs is* undesirable, use migrate_prep_local()
1082  如果err则返回:err
1085  lock for reading
1118  tmp等于from
1119  当非nodes_empty(tmp)循环
1121  source等于NUMA_NO_NODE
1122  dest等于0
1141  如果nodes_weight( * from)不等于nodes_weight( * to)且No static inline type checking - see Subtlety (1) above. (s, * to)则继续下一循环
1145  d等于node_remap(s, * from, * to)
1146  如果s恒等于d则继续下一循环
1149  source等于s
1150  dest等于d
1153  如果非No static inline type checking - see Subtlety (1) above. (dest, tmp)则退出
1156  如果source恒等于NUMA_NO_NODE退出
1159  node_clear(source, tmp)
1160  err等于Migrate pages from one node to a target node.* Returns error or the number of pages not migrated.
1161  如果err大于0则busy加等于err
1163  如果err小于0则退出
1166  lease a read lock
1167  如果err小于0则返回:err
1169  返回:busy
调用者
名称描述
kernel_migrate_pages
cpuset_migrate_mm_workfn