函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\zsmalloc.c Create Date:2022-07-27 18:01:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:set_zspage_mapping

函数原型:static void set_zspage_mapping(struct zspage *zspage, unsigned int class_idx, enum fullness_group fullness)

返回类型:void

参数:

类型参数名称
struct zspage *zspage
unsigned intclass_idx
enum fullness_groupfullness
528  class等于class_idx
529  fullness等于fullness
调用者
名称描述
fix_fullness_groupEach size class maintains zspages in different fullness groups depending* on the number of live objects they contain. When allocating or freeing* objects, the fullness status of the page can change, say, from ALMOST_FULL
zs_malloczs_malloc - Allocate block of given size from pool.*@pool: pool to allocate from*@size: size of block to allocate*@gfp: gfp flags when allocating object* On success, handle to the allocated object is returned,* otherwise 0.
putback_zspageputback_zspage - add @zspage into right class's fullness list*@class: destination class*@zspage: target page* Return @zspage's fullness_group