Function report |
Source Code:mm\swapfile.c |
Create Date:2022-07-28 15:18:04 |
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:We can write to an anon page without COW if there are no other references* to it. And as a side-effect, free up its swap: because the old content* on disk will never be read, and seeking back there to write new content
Proto:bool reuse_swap_page(struct page *page, int *total_map_swapcount)
Type:bool
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct page * | page | |
| int * | total_map_swapcount |
| 1657 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
| 1660 | count = page_trans_huge_map_swapcount(page, & total_mapcount, & total_swapcount) |
| 1662 | If total_map_swapcount Then total_map_swapcount = total_mapcount + total_swapcount |
| 1669 | page = compound_head(page) |
| 1671 | SetPageDirty(page) |
| 1672 | Else |
| 1676 | val = page_private(page) |
| 1677 | p = swap_info_get(entry) |
| 1678 | If SWP_USED etc: see above & SWP_STABLE_WRITES Then |
| 1686 | Return count <= 1 |
| Name | Describe |
|---|---|
| do_wp_page | This routine handles present pages, when users try to write* to a shared page. It is done by copying the page to a new address* and decrementing the shared-page counter for the old page.* Note that this routine assumes that the protection checks have been |
| do_swap_page | We enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with pte unmapped and unlocked.* We return with the mmap_sem locked or unlocked in the same cases |
| 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 |