Function report |
Source Code:mm\swapfile.c |
Create Date:2022-07-28 15:17:50 |
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 @entry are currently swapped out?* This considers COUNT_CONTINUED so it returns exact answer.
Proto:int swp_swapcount(swp_entry_t entry)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
swp_entry_t | entry |
1505 | p = _swap_info_get(entry) |
1506 | If Not p Then Return 0 |
1509 | offset = Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format |
1511 | ci = Determine the locking method in use for this device. Return* swap_cluster_info if SSD-style cluster-based locking is in place. |
1514 | If Not (count & See swap_map continuation for full count ) Then Go to out |
1518 | n = Max duplication count, in first swap_map + 1 |
1522 | VM_BUG_ON(page_private(page) != SWP_CONTINUED) |
1524 | Do |
1525 | page = list_next_entry - get the next element in list*@pos: the type * to cursor*@member: the name of the list_head within the struct.(page, lru) |
1526 | map = kmap_atomic(page) |
1528 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(map) |
1530 | count += (tmp_count & ~See swap_map continuation for full count ) * n |
1531 | n *= Max count, in each swap_map continuation + 1 |
1532 | When tmp_count & See swap_map continuation for full count cycle |
1533 | out : |
1534 | unlock_cluster_or_swap_info(p, ci) |
1535 | Return count |
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 |