Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swapcache_free_entries

Proto:void swapcache_free_entries(swp_entry_t *entries, int n)

Type:void

Parameter:

TypeParameterName
swp_entry_t *entries
intn
1401  If n <= 0 Then Return
1404  prev = NULL
1405  p = NULL
1412  If nr_swapfiles > 1 Then sort(entries, n, size of entries[0] , swp_entry_cmp, NULL)
1414  When i < n cycle
1415  p = swap_info_get_cont(entries[i], prev)
1416  If p Then swap_entry_free(p, entries[i])
1418  prev = p
1420  If p Then spin_unlock( & protect map scan related fields like* swap_map, lowest_bit, highest_bit,* inuse_pages, cluster_next,* cluster_nr, lowest_alloc,* highest_alloc, free/discard cluster* list. other fields are only changed* at swapon/swapoff, so are protected* by swap_lock)
Caller
NameDescribe
drain_slots_cache_cpu
free_swap_slot