Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:si_swapinfo

Proto:void si_swapinfo(struct sysinfo *val)

Type:void

Parameter:

TypeParameterName
struct sysinfo *val
3360  nr_to_be_unused = 0
3362  spin_lock( & swap_lock)
3363  When type < nr_swapfiles cycle
3364  si = swap_info[type]
3366  If SWP_USED etc: see above & SWP_USED && Not (SWP_USED etc: see above & SWP_WRITEOK) Then nr_to_be_unused += umber of those currently in use
3369  swap space still available = atomic_long_read( & nr_swap_pages) + nr_to_be_unused
3370  Total swap space size = protected with swap_lock. reading in vm_swap_full() doesn't need lock + nr_to_be_unused
3371  spin_unlock( & swap_lock)
Caller
NameDescribe
do_sysinfodo_sysinfo - fill in sysinfo struct*@info: pointer to buffer to fill