Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__zs_compact

Proto:static void __zs_compact(struct zs_pool *pool, struct size_class *class)

Type:void

Parameter:

TypeParameterName
struct zs_pool *pool
struct size_class *class
2269  struct zspage * dst_zspage = NULL
2271  spin_lock( & lock)
2272  When src_zspage = isolate_zspage(class, true) cycle
2274  If Not Based on the number of unused allocated objects calculate* and return the number of pages that we can free. Then Break
2277  Starting object index within @s_page which used for live object * in the subpage. = 0
2278  Source spage for migration which could be a subpage of zspage = get_first_page(src_zspage)
2280  When dst_zspage = isolate_zspage(class, false) cycle
2286  If Not migrate_zspage(pool, class, & cc) Then Break
2293  If (dst_zspage == NULL) Then Break
2296  putback_zspage - add @zspage into right class's fullness list*@class: destination class*@zspage: target page* Return @zspage's fullness_group
2301  spin_unlock( & lock)
2302  cond_resched()
2303  spin_lock( & lock)
2306  If src_zspage Then putback_zspage - add @zspage into right class's fullness list*@class: destination class*@zspage: target page* Return @zspage's fullness_group
2309  spin_unlock( & lock)
Caller
NameDescribe
zs_compact