Function report |
Source Code:mm\mempolicy.c |
Create Date:2022-07-28 15:30:50 |
Last Modify:2020-03-17 22:28:11 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function just creates a new policy, does some check and simple* initialization. You must invoke mpol_set_nodemask() to set nodes.
Proto:static struct mempolicy *mpol_new(unsigned short mode, unsigned short flags, nodemask_t *nodes)
Type:struct mempolicy
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned short | mode | |
unsigned short | flags | |
nodemask_t * | nodes |
247 | pr_debug("setting mode %d flags %d nodes[0] %lx\n", mode, flags, nodes ? nodes_addr( * nodes)[0] : NUMA_NO_NODE) |
250 | If mode == MPOL_DEFAULT Then |
251 | If nodes && Not nodes_empty( * nodes) Then Return ERR_PTR( - EINVAL) |
253 | Return NULL |
262 | If mode == MPOL_PREFERRED Then |
263 | If nodes_empty( * nodes) Then |
264 | If flags & Flags for set_mempolicy || flags & MPOL_F_RELATIVE_NODES Then Return ERR_PTR( - EINVAL) |
268 | Else if mode == MPOL_LOCAL Then |
269 | If Not nodes_empty( * nodes) || flags & Flags for set_mempolicy || flags & MPOL_F_RELATIVE_NODES Then Return ERR_PTR( - EINVAL) |
273 | mode = MPOL_PREFERRED |
274 | Else if nodes_empty( * nodes) Then Return ERR_PTR( - EINVAL) |
276 | policy = kmem_cache_alloc(policy_cache, GFP_KERNEL) |
279 | atomic_set( & refcnt, 1) |
280 | See MPOL_* above = mode |
283 | Return policy |
Name | Describe |
---|---|
do_set_mempolicy | Set the process memory policy |
do_mbind | |
mpol_shared_policy_init | mpol_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. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |