Function report |
Source Code:mm\migrate.c |
Create Date:2022-07-28 15:58:57 |
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 page to a newly allocated page* The page is locked and all ptes have been successfully removed.* The new page will have replaced the old page if this function* is successful.* Return value:* < 0 - error code* MIGRATEPAGE_SUCCESS - success
Proto:static int move_to_new_page(struct page *newpage, struct page *page, enum migrate_mode mode)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | newpage | |
struct page * | page | |
enum migrate_mode | mode |
932 | is_lru = Not __PageMovable(page) |
934 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
935 | VM_BUG_ON_PAGE(!PageLocked(newpage), newpage) |
937 | mapping = page_mapping(page) |
939 | If Value is more likely to compile time(is_lru) Then |
940 | If Not mapping Then rc = Common logic to directly migrate a single LRU page suitable for* pages that do not use PagePrivate/PagePrivate2.* Pages are locked upon entry and exit. |
942 | Else if migratepage Then rc = migratepage(mapping, newpage, page, mode) |
955 | Else |
960 | VM_BUG_ON_PAGE(!PageIsolated(page), page) |
961 | If Not PageMovable(page) Then |
978 | If __PageMovable(page) Then |
979 | VM_BUG_ON_PAGE(!PageIsolated(page), page) |
985 | __ClearPageIsolated(page) |
993 | If Not PageMappingFlags(page) Then See page-flags.h for PAGE_MAPPING_FLAGS = NULL |
1000 | out : |
1001 | Return rc |
Name | Describe |
---|---|
__unmap_and_move | |
unmap_and_move_huge_page | Counterpart of unmap_and_move_page() for hugepage migration |
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 |