Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:unuse_mm

Proto:static int unuse_mm(struct mm_struct *mm, unsigned int type, bool frontswap, unsigned long *fs_pages_to_unuse)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
unsigned inttype
boolfrontswap
unsigned long *fs_pages_to_unuse
2071  ret = 0
2073  lock for reading
2074  When vma cycle
2078  If ret Then Break
2081  cond_resched()
2083  lease a read lock
2084  Return ret
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
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.