函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:free_cluster

函数原型:static void free_cluster(struct swap_info_struct *si, unsigned long idx)

返回类型:void

参数:

类型参数名称
struct swap_info_struct *si
unsigned longidx
514  ci等于cluster info. Only for SSD idx
516  VM_BUG_ON(cluster_count(ci) != 0)
522  如果SWP_USED etc: see above 按位与SWP_WRITEOK按位或SWP_PAGE_DISCARD的值的值恒等于SWP_WRITEOK按位或SWP_PAGE_DISCARD的值则
524  Add a cluster to discard list and schedule it to do discard
525  返回
528  __free_cluster(si, idx)
调用者
名称描述
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