Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-28 15:18:30
Last Modify:2020-03-17 22:19:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Scan swap_map (or frontswap_map if frontswap parameter is true)* from current position to next entry still in use. Return 0* if there are no inuse entries after prev till end of the map.

Proto:static unsigned int find_next_to_unuse(struct swap_info_struct *si, unsigned int prev, bool frontswap)

Type:unsigned int

Parameter:

TypeParameterName
struct swap_info_struct *si
unsigned intprev
boolfrontswap
2104  When i < xtent of the swap_map cycle
2105  count = READ_ONCE(vmalloc'ed array of usage counts [i])
2106  If count && swap_count(count) != Note pageblock is bad, in first swap_map Then If Not frontswap || frontswap_test(si, i) Then
2108  Break
2109  If i % LATENCY_LIMIT == 0 Then cond_resched()
2113  If i == xtent of the swap_map Then i = 0
2116  Return i
Caller
NameDescribe
try_to_unuseIf the boolean frontswap is true, only unuse pages_to_unuse pages;* pages_to_unuse==0 means all pages; ignored if frontswap is false