Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:31:46
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, const nodemask_t *to, int flags)

Type:int

Parameter:

TypeParameterName
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  If err Then Return err
1085  lock for reading
1118  tmp = from
1119  When Not nodes_empty(tmp) cycle
1121  source = NUMA_NO_NODE
1122  dest = 0
1141  If nodes_weight( * from) != nodes_weight( * to) && No static inline type checking - see Subtlety (1) above. (s, * to) Then Continue
1145  d = node_remap(s, * from, * to)
1146  If s == d Then Continue
1149  source = s
1150  dest = d
1153  If Not No static inline type checking - see Subtlety (1) above. (dest, tmp) Then Break
1156  If source == NUMA_NO_NODE Then Break
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  If err > 0 Then busy += err
1163  If err < 0 Then Break
1166  lease a read lock
1167  If err < 0 Then Return err
1169  Return busy
Caller
NameDescribe
kernel_migrate_pages
cpuset_migrate_mm_workfn