Function report |
Source Code:mm\migrate.c |
Create Date:2022-07-28 15:59:20 |
| Last Modify:2022-05-20 09:53:13 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int migrate_pages(struct list_head *from, new_page_t get_new_page, free_page_t put_new_page, unsigned long private, enum migrate_mode mode, int reason)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct list_head * | from | |
| new_page_t | get_new_page | |
| free_page_t | put_new_page | |
| unsigned long | private | |
| enum migrate_mode | mode | |
| int | reason |
| 1399 | retry = 1 |
| 1400 | nr_failed = 0 |
| 1401 | nr_succeeded = 0 |
| 1402 | pass = 0 |
| 1405 | swapwrite = flags & Allowed to write to swap |
| 1408 | If Not swapwrite Then flags |= Allowed to write to swap |
| 1412 | retry = 0 |
| 1415 | retry : |
| 1416 | cond_resched() |
| 1422 | Else rc = Obtain the lock on page, remove all ptes and migrate the page* to the newly allocated page in newpage. |
| 1444 | If Not rc Then |
| 1449 | nr_failed++ |
| 1450 | Go to out |
| 1452 | retry++ |
| 1453 | Break |
| 1455 | nr_succeeded++ |
| 1456 | Break |
| 1457 | Default |
| 1464 | nr_failed++ |
| 1465 | Break |
| 1471 | out : |
| 1472 | If nr_succeeded Then count_vm_events(PGMIGRATE_SUCCESS, nr_succeeded) |
| 1474 | If nr_failed Then count_vm_events(PGMIGRATE_FAIL, nr_failed) |
| 1478 | If Not swapwrite Then flags &= ~Allowed to write to swap |
| 1481 | Return rc |
| Name | Describe |
|---|---|
| migrate_to_node | Migrate pages from one node to a target node.* Returns error or the number of pages not migrated. |
| do_mbind | |
| do_move_pages_to_node | |
| soft_offline_huge_page | |
| __soft_offline_page | |
| check_and_migrate_cma_pages |
| 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 |