Function report |
Source Code:mm\migrate.c |
Create Date:2022-07-28 15:59:34 |
| Last Modify:2022-05-20 09:53:13 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Migrate an array of page address onto an array of nodes and fill* the corresponding array of status.
Proto:static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes, unsigned long nr_pages, const void __user *__user *pages, const int __user *nodes, int __user *status, int flags)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct mm_struct * | mm | |
| nodemask_t | task_nodes | |
| unsigned long | nr_pages | |
| const void __user *__user * | pages | |
| const int __user * | nodes | |
| int __user * | status | |
| int | flags |
| 1596 | current_node = NUMA_NO_NODE |
| 1599 | err = 0 |
| 1609 | If Get a simple variable from user space(p, pages + i) Then Go to out_flush |
| 1611 | If Get a simple variable from user space(node, nodes + i) Then Go to out_flush |
| 1616 | If node < 0 || node >= MAX_NUMNODES Then Go to out_flush |
| 1618 | If Not node_state(node, N_MEMORY) Then Go to out_flush |
| 1622 | If Not No static inline type checking - see Subtlety (1) above. (node, task_nodes) Then Go to out_flush |
| 1625 | If current_node == NUMA_NO_NODE Then |
| 1626 | current_node = node |
| 1628 | Else if node != current_node Then |
| 1629 | err = do_move_pages_to_node(mm, & pagelist, current_node) |
| 1630 | If err Then |
| 1643 | err = store_status(status, start, current_node, i - start) |
| 1647 | current_node = node |
| 1654 | err = Resolves the given address to a struct page, isolates it from the LRU and* puts it to the given pagelist |
| 1657 | If Not err Then |
| 1663 | Else if err > 0 Then |
| 1665 | Continue |
| 1668 | err = store_status(status, i, err, 1) |
| 1672 | err = do_move_pages_to_node(mm, & pagelist, current_node) |
| 1673 | If err Then |
| 1679 | err = store_status(status, start, current_node, i - start) |
| 1683 | current_node = NUMA_NO_NODE |
| 1685 | out_flush : |
| 1686 | If list_empty - tests whether a list is empty*@head: the list to test. Then Return err |
| 1690 | err1 = do_move_pages_to_node(mm, & pagelist, current_node) |
| 1698 | If Not err1 Then err1 = store_status(status, start, current_node, i - start) |
| 1702 | out : |
| 1703 | Return err |
| Name | Describe |
|---|---|
| kernel_move_pages | Move a list of pages in the address space of the currently executing* process. |
| 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 |