Function report |
Source Code:mm\migrate.c |
Create Date:2022-07-28 15:59:13 |
| Last Modify:2022-05-20 09:53:13 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Counterpart of unmap_and_move_page() for hugepage migration
Proto:static int unmap_and_move_huge_page(new_page_t get_new_page, free_page_t put_new_page, unsigned long private, struct page *hpage, int force, enum migrate_mode mode, int reason)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| new_page_t | get_new_page | |
| free_page_t | put_new_page | |
| unsigned long | private | |
| struct page * | hpage | |
| int | force | |
| enum migrate_mode | mode | |
| int | reason |
| 1282 | page_was_mapped = 0 |
| 1293 | If Not hugepage_migration_supported(page_hstate(hpage)) Then |
| 1294 | putback_active_hugepage(hpage) |
| 1295 | Return -ENOSYS |
| 1298 | new_hpage = get_new_page(hpage, private) |
| 1302 | If Not Return true if the page was successfully locked Then |
| 1306 | Case mode == MIGRATE_SYNC |
| 1307 | Case mode == MIGRATE_SYNC_NO_COPY |
| 1308 | Break |
| 1309 | Default |
| 1310 | Go to out |
| 1320 | If page_private(hpage) && Not page_mapping(hpage) Then |
| 1322 | Go to out_unlock |
| 1328 | If Value for the false possibility is greater at compile time(!Return true if the page was successfully locked) Then Go to put_anon |
| 1334 | page_was_mapped = 1 |
| 1340 | If page_was_mapped Then Get rid of all migration entries and replace them by* references to the indicated page. |
| 1346 | put_anon : |
| 1347 | If anon_vma Then put_anon_vma(anon_vma) |
| 1351 | move_hugetlb_state(hpage, new_hpage, reason) |
| 1352 | put_new_page = NULL |
| 1355 | out_unlock : |
| 1357 | out : |
| 1358 | If rc != -EAGAIN Then putback_active_hugepage(hpage) |
| 1366 | If put_new_page Then put_new_page(new_hpage, private) |
| 1368 | Else putback_active_hugepage(new_hpage) |
| 1371 | Return rc |
| Name | Describe |
|---|---|
| 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 |
| 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 |