Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cluster_list_add_tail

Proto:static void cluster_list_add_tail(struct swap_cluster_list *list, struct swap_cluster_info *ci, unsigned int idx)

Type:void

Parameter:

TypeParameterName
struct swap_cluster_list *list
struct swap_cluster_info *ci
unsigned intidx
404  If cluster_list_empty(list) Then
405  cluster_set_next_flag( & head, idx, 0)
406  cluster_set_next_flag( & tail, idx, 0)
407  Else
409  tail = cluster_next( & tail)
415  ci_tail = ci + tail
416  spin_lock_nested( & Protect swap_cluster_info fields* and swap_info_struct->swap_map* elements correspond to the swap* cluster, For trivial one-depth nesting of a lock-class, the following* global define can be used. (Subsystems with multiple levels* of nesting should define their own lock-nesting subclasses.))
417  cluster_set_next(ci_tail, idx)
418  spin_unlock( & Protect swap_cluster_info fields* and swap_info_struct->swap_map* elements correspond to the swap* cluster)
419  cluster_set_next_flag( & tail, idx, 0)
Caller
NameDescribe
swap_cluster_schedule_discardAdd a cluster to discard list and schedule it to do discard
__free_cluster
setup_swap_map_and_extents