函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:unuse_mm

函数原型:static int unuse_mm(struct mm_struct *mm, unsigned int type, bool frontswap, unsigned long *fs_pages_to_unuse)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
unsigned inttype
boolfrontswap
unsigned long *fs_pages_to_unuse
2071  ret等于0
2073  lock for reading
2074 vma循环
2078  如果ret退出
2081  cond_resched()
2083  lease a read lock
2084  返回:ret
调用者
名称描述
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
io_sq_thread
__io_worker_unuseNote: drops the wqe->lock if returning true! The caller must re-acquire* the lock in that case. Some callers need to restart handling if this* happens, so we can't just re-acquire the lock on behalf of the caller.