Function report |
Source Code:mm\swapfile.c |
Create Date:2022-07-28 15:18:06 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:If swap is getting full, or if there are no more mappings of this page,* then try_to_free_swap is called to free its swap space.
Proto:int try_to_free_swap(struct page *page)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | page |
1695 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
1697 | If Not PageSwapCache(page) Then Return 0 |
1699 | If Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting. Then Return 0 |
1701 | If page_swapped(page) Then Return 0 |
1719 | If pm_suspended_storage() Then Return 0 |
1722 | page = compound_head(page) |
1724 | SetPageDirty(page) |
1725 | Return 1 |
Name | Describe |
---|---|
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 |
madvise_free_pte_range | |
swap_writepage | We may have stale swap cache pages in memory: notice* them here and get rid of the unnecessary final write. |
free_swap_cache | If we are the only user, then try to free up the swap cache. * Its ok to check for PageSwapCache without the page lock* here because we are going to recheck again inside* try_to_free_swap() _with_ the lock.* - Marcelo |
__try_to_reclaim_swap | rns 1 if swap entry is freed |
unuse_pte_range | |
try_to_unuse | If the boolean frontswap is true, only unuse pages_to_unuse pages;* pages_to_unuse==0 means all pages; ignored if frontswap is false |
replace_page | place_page - replace page in vma by new ksm page*@vma: vma that holds the pte pointing to page*@page: the page we are replacing by kpage*@kpage: the ksm page we replace page by*@orig_pte: the original value of the pte |
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 |