函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mpol_set_nodemask is called after mpol_new() to set up the nodemask, if* any, for the new policy. mpol_new() has already validated the nodes* parameter with respect to the policy mode and flags. But, we need to

函数原型:static int mpol_set_nodemask(struct mempolicy *pol, const nodemask_t *nodes, struct nodemask_scratch *nsc)

返回类型:int

参数:

类型参数名称
struct mempolicy *pol
const nodemask_t *nodes
struct nodemask_scratch *nsc
209  如果(pol == NULL)则返回:0
212  nodes_and(mask1, cpuset_current_mems_allowed, Array of node states.[N_MEMORY])
215  VM_BUG_ON(!nodes)
216  如果See MPOL_* above 恒等于MPOL_PREFERREDnodes_empty( * nodes)则nodes = NULL
218  否则
219  如果See set_mempolicy() MPOL_F_* above 按位与MPOL_F_RELATIVE_NODESmpol_relative_nodemask( & mask2, nodes, & mask1)
221  否则nodes_and(mask2, * nodes, mask1)
224  如果mpol_store_user_nodemask(pol)则user_nodemask等于nodes
226  否则 relative to these nodes 等于cpuset_current_mems_allowed
231  如果nodesret等于create(pol, & mask2)
233  否则ret等于create(pol, NULL)
235  返回:ret
调用者
名称描述
do_set_mempolicySet the process memory policy
do_mbind
mpol_shared_policy_initmpol_shared_policy_init - initialize shared policy for inode*@sp: pointer to inode shared policy*@mpol: struct mempolicy to install* Install non-NULL @mpol in inode's shared policy rb-tree.* On entry, the current task has a reference on a non-NULL @mpol.