函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cluster_list_add_tail

函数原型:static void cluster_list_add_tail(struct swap_cluster_list *list, struct swap_cluster_info *ci, unsigned int idx)

返回类型:void

参数:

类型参数名称
struct swap_cluster_list *list
struct swap_cluster_info *ci
unsigned intidx
404  如果cluster_list_empty(list)则
405  cluster_set_next_flag( & head, idx, 0)
406  cluster_set_next_flag( & tail, idx, 0)
407  否则
409  tail等于cluster_next( & tail)
415  ci_tail等于citail
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  自旋锁解锁
419  cluster_set_next_flag( & tail, idx, 0)
调用者
名称描述
swap_cluster_schedule_discardAdd a cluster to discard list and schedule it to do discard
__free_cluster
setup_swap_map_and_extents