函数逻辑报告 |
Source Code:mm\migrate.c |
Create Date:2022-07-27 17:33:04 |
Last Modify:2022-05-20 09:53:13 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:static int move_to_new_page(struct page *newpage, struct page *page, enum migrate_mode mode)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | newpage | |
struct page * | page | |
enum migrate_mode | mode |
932 | is_lru等于非__PageMovable(page) |
934 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
935 | VM_BUG_ON_PAGE(!PageLocked(newpage), newpage) |
937 | mapping等于page_mapping(page) |
939 | 如果此条件成立可能性大(为编译器优化)(is_lru)则 |
940 | 如果非mapping则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 | 否则如果migratepage则rc等于migratepage(mapping, newpage, page, mode) |
955 | 否则 |
960 | VM_BUG_ON_PAGE(!PageIsolated(page), page) |
961 | 如果非PageMovable(page)则 |
978 | 如果__PageMovable(page)则 |
979 | VM_BUG_ON_PAGE(!PageIsolated(page), page) |
985 | __ClearPageIsolated(page) |
993 | 如果非PageMappingFlags(page)则 See page-flags.h for PAGE_MAPPING_FLAGS = NULL |
1000 | out : |
1001 | 返回:rc |
名称 | 描述 |
---|---|
__unmap_and_move | |
unmap_and_move_huge_page | Counterpart of unmap_and_move_page() for hugepage migration |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |