Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\frontswap.c Create Date:2022-07-28 15:21:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Frontswap, 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

Proto:void frontswap_shrink(unsigned long target_pages)

Type:void

Parameter:

TypeParameterName
unsigned longtarget_pages
448  pages_to_unuse = 0
449  type = type
456  spin_lock( & swap_lock)
457  ret = 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.
458  spin_unlock( & swap_lock)
459  If ret == 0 Then If the boolean frontswap is true, only unuse pages_to_unuse pages;* pages_to_unuse==0 means all pages; ignored if frontswap is false
461  Return