函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:The 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.

函数原型:static void dec_cluster_info_page(struct swap_info_struct *p, struct swap_cluster_info *cluster_info, unsigned long page_nr)

返回类型:void

参数:

类型参数名称
struct swap_info_struct *p
struct swap_cluster_info *cluster_info
unsigned longpage_nr
558  idx等于page_nrSWAPFILE_CLUSTER
560  如果非cluster_info则返回
563  VM_BUG_ON(cluster_count( & cluster_info[idx]) == 0)
564  cluster_set_count( & cluster_info[idx], cluster_count( & cluster_info[idx]) - 1)
567  如果cluster_count( & cluster_info[idx])恒等于0则free_cluster(p, idx)
调用者
名称描述
swap_entry_free