函数逻辑报告 | 
Source Code:mm\mempolicy.c | 
Create Date:2022-07-27 17:05:18 | 
| Last Modify:2020-03-17 22:28:11 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:kernel_migrate_pages
函数原型:static int kernel_migrate_pages(pid_t pid, unsigned long maxnode, const unsigned long __user *old_nodes, const unsigned long __user *new_nodes)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| pid_t | pid | |
| unsigned long | maxnode | |
| const unsigned long __user * | old_nodes | |
| const unsigned long __user * | new_nodes | 
| 1484 | NODEMASK_SCRATCH(scratch) | 
| 1502 | task等于如果pid则find_task_by_vpid(pid)否则当前进程 | 
| 1503 | 如果非task则 | 
| 1506 | 转到:out | 
| 1508 | get_task_struct(task) | 
| 1516 | 如果非ptrace_may_access(task, PTRACE_MODE_READ_REALCREDS)则 | 
| 1519 | 转到:out_put | 
| 1523 | task_nodes等于cpuset_mems_allowed(task) | 
| 1525 | 如果非nodes_subset( * new, task_nodes)且非操作权限检查则 | 
| 1531 | nodes_and( * new, * new, task_nodes) | 
| 1532 | 如果nodes_empty( * new)则转到:out_put | 
| 1535 | err等于security_task_movememory(task) | 
| 1540 | put_task_struct(task) | 
| 1542 | 如果非mm则 | 
| 1547 | err等于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. | 
| 1551 | out : | 
| 1552 | NODEMASK_SCRATCH_FREE(scratch) | 
| 1554 | 返回:err | 
| 1556 | out_put : | 
| 1557 | put_task_struct(task) | 
| 1558 | 转到:out | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |