函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-27 16:48:56
Last Modify:2020-03-17 22:19:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static unsigned int find_next_to_unuse(struct swap_info_struct *si, unsigned int prev, bool frontswap)

返回类型:unsigned int

参数:

类型参数名称
struct swap_info_struct *si
unsigned intprev
boolfrontswap
2104 i小于xtent of the swap_map 循环
2105  count等于READ_ONCE(vmalloc'ed array of usage counts [i])
2106  如果countswap_count(count)不等于Note pageblock is bad, in first swap_map 则如果非frontswapfrontswap_test(si, i)则
2108  退出
2109  如果i取模LATENCY_LIMIT恒等于0则cond_resched()
2113  如果i恒等于xtent of the swap_map i等于0
2116  返回:i
调用者
名称描述
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