函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mpol_set_shared_policy

函数原型:int mpol_set_shared_policy(struct shared_policy *info, struct vm_area_struct *vma, struct mempolicy *npol)

返回类型:int

参数:

类型参数名称
struct shared_policy *info
struct vm_area_struct *vma
struct mempolicy *npol
2642  struct sp_node * new = NULL
2643  sz等于vma_pages(vma)
2645  pr_debug("set_shared_policy %lx sz %lu %d %d %lx\n", Offset (within vm_file) in PAGE_SIZEunits , sz, npol ? See MPOL_* above : - 1, npol ? See set_mempolicy() MPOL_F_* above : - 1, npol ? nodes_addr( interleave/bind )[0] : NUMA_NO_NODE)
2651  如果npol
2652  new等于sp_alloc(Offset (within vm_file) in PAGE_SIZEunits , Offset (within vm_file) in PAGE_SIZEunits + sz, npol)
2653  如果非new则返回:负ENOMEM
2656  err等于Replace a policy range.
2657  如果errnewsp_free(new)
2659  返回:err
调用者
名称描述
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.