函数逻辑报告 |
Source Code:mm\migrate.c |
Create Date:2022-07-27 17:33:15 |
Last Modify:2022-05-20 09:53:13 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Obtain the lock on page, remove all ptes and migrate the page* to the newly allocated page in newpage.
函数原型:static __attribute__((__noinline__)) int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page, unsigned long private, struct page *page, int force, enum migrate_mode mode, enum migrate_reason reason)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
new_page_t | get_new_page | |
free_page_t | put_new_page | |
unsigned long | private | |
struct page * | page | |
int | force | |
enum migrate_mode | mode | |
enum migrate_reason | reason |
1170 | rc等于Return values from addresss_space_operations.migratepage():* - negative errno on page migration failure;* - zero on page migration success; |
1176 | 如果page_count(page)恒等于1则 |
1178 | ClearPageActive(page) |
1179 | ClearPageUnevictable(page) |
1180 | 如果此条件成立可能性小(为编译器优化)(__PageMovable(page))则 |
1182 | 如果非PageMovable(page)则__ClearPageIsolated(page) |
1186 | 转到:out |
1189 | newpage等于get_new_page(page, private) |
1194 | 如果rc恒等于Return values from addresss_space_operations.migratepage():* - negative errno on page migration failure;* - zero on page migration success;则set_page_owner_migrate_reason(newpage, reason) |
1197 | out : |
1205 | 删除链表项 |
1224 | 如果reason恒等于MR_MEMORY_FAILURE则 |
1233 | 否则 |
1248 | put_new : |
1249 | 如果put_new_page则put_new_page(newpage, private) |
1255 | 返回:rc |
名称 | 描述 |
---|---|
migrate_pages | migrate_pages - migrate the pages specified in a list, to the free pages* supplied as the target for the page migration*@from: The list of pages to be migrated.*@get_new_page: The function used to allocate free pages to be used |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |