函数逻辑报告 | 
Source Code:mm\mempolicy.c | 
Create Date:2022-07-27 17:04:23 | 
| Last Modify:2020-03-17 22:28:11 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Retrieve NUMA policy
函数原型:static long do_get_mempolicy(int *policy, nodemask_t *nmask, unsigned long addr, unsigned long flags)
返回类型:long
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| int * | policy | |
| nodemask_t * | nmask | |
| unsigned long | addr | |
| unsigned long | flags | 
| 891 | struct vm_area_struct * vma = NULL | 
| 892 | struct mempolicy * pol = mempolicy, * pol_refcount = NULL | 
| 894 | 如果flags按位与urn next IL mode instead of node mask 按位或look up vma using address 按位或urn allowed memories 的值的反则返回:负EINVAL | 
| 898 | 如果flags按位与urn allowed memories 则 | 
| 899 | 如果flags按位与urn next IL mode instead of node mask 按位或look up vma using address 的值则返回:负EINVAL | 
| 901 | policy等于0 | 
| 904 | task_unlock(当前进程) | 
| 905 | 返回:0 | 
| 908 | 如果flags按位与look up vma using address 则 | 
| 914 | lock for reading | 
| 915 | vma等于Look up the first VMA which intersects the interval start_addr..end_addr-1,NULL if none. Assume start_addr < end_addr. | 
| 916 | 如果非vma则 | 
| 918 | 返回:负EFAULT | 
| 922 | 否则pol等于NUMA policy for the VMA | 
| 930 | 如果flags按位与urn next IL mode instead of node mask 则 | 
| 931 | 如果flags按位与look up vma using address 则 | 
| 945 | 否则如果pol恒等于mempolicy且See MPOL_* above 恒等于MPOL_INTERLEAVE则 | 
| 948 | 否则 | 
| 952 | 否则 | 
| 962 | err等于0 | 
| 963 | 如果nmask则 | 
| 964 | 如果mpol_store_user_nodemask(pol)则 | 
| 965 | nmask等于 nodemask passed by user | 
| 966 | 否则 | 
| 969 | task_unlock(当前进程) | 
| 973 | out : | 
| 974 | mpol_cond_put(pol) | 
| 975 | 如果vma则lease a read lock | 
| 977 | 如果pol_refcount则mpol_put(pol_refcount) | 
| 979 | 返回:err | 
| 名称 | 描述 | 
|---|---|
| kernel_get_mempolicy | Retrieve NUMA policy | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |