| Function report | 
| Source Code: mm\swapfile.c | Create Date:2022-07-28 15:17:43 | 
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:How many references to page are currently swapped out?* This does not give an exact answer when swap count is continued,* but does include the high COUNT_CONTINUED flag to allow for that.
Proto:int page_swapcount(struct page *page)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct page * | page | 
| 1431 | count = 0 | 
| 1437 | val = page_private(page) | 
| 1438 | p = _swap_info_get(entry) | 
| 1439 | If p Then | 
| 1440 | offset = Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format | 
| 1441 | ci = Determine the locking method in use for this device. Return* swap_cluster_info if SSD-style cluster-based locking is in place. | 
| 1443 | unlock_cluster_or_swap_info(p, ci) | 
| 1445 | Return count | 
| Name | Describe | 
|---|---|
| page_swapped | |
| page_trans_huge_map_swapcount | |
| reuse_swap_page | 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 | 
| 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 |