| Function report | 
| Source Code: mm\migrate.c | Create Date:2022-07-28 15:59:45 | 
| Last Modify:2022-05-20 09:53:13 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Move a list of pages in the address space of the currently executing* process.
Proto:static int kernel_move_pages(pid_t pid, unsigned long nr_pages, const void __user *__user *pages, const int __user *nodes, int __user *status, int flags)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| pid_t | pid | |
| unsigned long | nr_pages | |
| const void __user *__user * | pages | |
| const int __user * | nodes | |
| int __user * | status | |
| int | flags | 
| 1793 | If flags & ~(Move pages owned by this process to conformto policy | Move every page to conform to policy ) Then Return -EINVAL | 
| 1796 | If flags & Move every page to conform to policy && Not Check operation authority Then Return -EPERM | 
| 1801 | task = If pid Then find_task_by_vpid(pid) Else current process | 
| 1802 | If Not task Then | 
| 1804 | Return -ESRCH | 
| 1806 | get_task_struct(task) | 
| 1812 | If Not ptrace_may_access(task, PTRACE_MODE_READ_REALCREDS) Then | 
| 1815 | Go to out | 
| 1819 | err = security_task_movememory(task) | 
| 1825 | put_task_struct(task) | 
| 1830 | If nodes Then err = Migrate an array of page address onto an array of nodes and fill* the corresponding array of status. | 
| 1833 | Else err = Determine the nodes of a user array of pages and store it in* a user array of status. | 
| 1837 | Return err | 
| 1839 | out : | 
| 1840 | put_task_struct(task) | 
| 1841 | Return err | 
| 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 |