Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:free_cluster

Proto:static void free_cluster(struct swap_info_struct *si, unsigned long idx)

Type:void

Parameter:

TypeParameterName
struct swap_info_struct *si
unsigned longidx
514  ci = cluster info. Only for SSD + idx
516  VM_BUG_ON(cluster_count(ci) != 0)
522  If (SWP_USED etc: see above & (SWP_WRITEOK | SWP_PAGE_DISCARD)) == (SWP_WRITEOK | SWP_PAGE_DISCARD) Then
524  Add a cluster to discard list and schedule it to do discard
525  Return
528  __free_cluster(si, idx)
Caller
NameDescribe
dec_cluster_info_pageThe cluster corresponding to page_nr decreases one usage. If the usage* counter becomes 0, which means no page in the cluster is in using, we can* optionally discard the cluster and add it to free cluster list.
swap_free_cluster