Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:zs_shrinker_count

Proto:static unsigned long zs_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc)

Type:unsigned long

Parameter:

TypeParameterName
struct shrinker *shrinker
struct shrink_control *sc
2359  pages_to_free = 0
2360  pool = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(shrinker, structzs_pool, shrinker)
2363  When i >= 0 cycle
2364  class = size_class[i]
2365  If Not class Then Continue
2367  If index != i Then Continue
2370  pages_to_free += Based on the number of unused allocated objects calculate* and return the number of pages that we can free.
2373  Return pages_to_free