Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swap_entry_free

Proto:static void swap_entry_free(struct swap_info_struct *p, swp_entry_t entry)

Type:void

Parameter:

TypeParameterName
struct swap_info_struct *p
swp_entry_tentry
1295  offset = Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format
1298  ci = lock_cluster(p, offset)
1299  count = vmalloc'ed array of usage counts [offset]
1300  VM_BUG_ON(count != Flag page is cached, in first swap_map )
1301  vmalloc'ed array of usage counts [offset] = 0
1302  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.
1303  unlock_cluster(ci)
1305  mem_cgroup_uncharge_swap(entry, 1)
1306  swap_range_free(p, offset, 1)
Caller
NameDescribe
swapcache_free_entries