Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_slots.c Create Date:2022-07-28 15:20:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:check_cache_active

Proto:static bool check_cache_active(void)

Type:bool

Parameter:Nothing

97  If Not swap_slot_cache_enabled || Not swap_slot_cache_initialized Then Return false
100  pages = get_nr_swap_pages()
101  If Not swap_slot_cache_active Then
102  If pages > num_online_cpus() * THRESHOLD_ACTIVATE_SWAP_SLOTS_CACHE Then reactivate_swap_slots_cache()
105  Go to out
109  If pages < num_online_cpus() * THRESHOLD_DEACTIVATE_SWAP_SLOTS_CACHE Then deactivate_swap_slots_cache()
111  out :
112  Return swap_slot_cache_active
Caller
NameDescribe
get_swap_page