Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:enable_swap_info

Proto:static void enable_swap_info(struct swap_info_struct *p, int prio, unsigned char *swap_map, struct swap_cluster_info *cluster_info, unsigned long *frontswap_map)

Type:void

Parameter:

TypeParameterName
struct swap_info_struct *p
intprio
unsigned char *swap_map
struct swap_cluster_info *cluster_info
unsigned long *frontswap_map
2476  frontswap_init(strange name for an index , frontswap_map)
2477  spin_lock( & swap_lock)
2478  spin_lock( & 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)
2479  setup_swap_info(p, prio, swap_map, cluster_info)
2480  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)
2481  spin_unlock( & swap_lock)
2486  synchronize_rcu - wait until a grace period has elapsed
2487  spin_lock( & swap_lock)
2488  spin_lock( & 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)
2489  _enable_swap_info(p)
2490  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)
2491  spin_unlock( & swap_lock)
Caller
NameDescribe
SYSCALL_DEFINE2