Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:The cluster corresponding to page_nr will be used. The cluster will be* removed from free cluster list and its usage counter will be increased.

Proto:static void inc_cluster_info_page(struct swap_info_struct *p, struct swap_cluster_info *cluster_info, unsigned long page_nr)

Type:void

Parameter:

TypeParameterName
struct swap_info_struct *p
struct swap_cluster_info *cluster_info
unsigned longpage_nr
538  idx = page_nr / SWAPFILE_CLUSTER
540  If Not cluster_info Then Return
542  If cluster_is_free( & cluster_info[idx]) Then alloc_cluster(p, idx)
545  VM_BUG_ON(cluster_count( & cluster_info[idx]) >= SWAPFILE_CLUSTER)
546  cluster_set_count( & cluster_info[idx], cluster_count( & cluster_info[idx]) + 1)
Caller
NameDescribe
scan_swap_map_slots
setup_swap_map_and_extents