Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Based on the number of unused allocated objects calculate* and return the number of pages that we can free.

Proto:static unsigned long zs_can_compact(struct size_class *class)

Type:unsigned long

Parameter:

TypeParameterName
struct size_class *class
2253  obj_allocated = ype can be of enum type zs_stat_type or fullness_group
2254  obj_used = ype can be of enum type zs_stat_type or fullness_group
2256  If obj_allocated <= obj_used Then Return 0
2259  obj_wasted = obj_allocated - obj_used
2260  obj_wasted /= objs_per_zspage
2262  Return obj_wasted * Number of PAGE_SIZE sized pages to combine to form a 'zspage'
Caller
NameDescribe
__zs_compact
zs_shrinker_count