函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\frontswap.c Create Date:2022-07-27 16:52:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Used to check if it's necessory and feasible to unuse pages.* Return 1 when nothing to do, 0 when need to shink pages,* error code when there is an error.

函数原型:static int __frontswap_shrink(unsigned long target_pages, unsigned long *pages_to_unuse, int *type)

返回类型:int

参数:

类型参数名称
unsigned longtarget_pages
unsigned long *pages_to_unuse
int *type
424  total_pages等于0
426  assert_spin_locked( & swap_lock)
428  total_pages等于__frontswap_curr_pages()
429  如果total_pages小于等于target_pages
431  pages_to_unuse等于0
432  返回:1
434  total_pages_to_unuse等于total_pagestarget_pages
435  返回:__frontswap_unuse_pages(total_pages_to_unuse, pages_to_unuse, type)
调用者
名称描述
frontswap_shrinkFrontswap, like a true swap device, may unnecessarily retain pages* under certain circumstances; "shrink" frontswap is essentially a* "partial swapoff" and works by calling try_to_unuse to attempt to* unuse enough frontswap pages to attempt to -- subject