Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-28 14:17:04
Last Modify:2022-05-23 13:41:30 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:prealloc_memcg_shrinker

Proto:static int prealloc_memcg_shrinker(struct shrinker *shrinker)

Type:int

Parameter:

TypeParameterName
struct shrinker *shrinker
221  ret = -ENOMEM
223  lock for writing
225  id = dr_alloc() - Allocate an ID.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@start: The minimum ID (inclusive).*@end: The maximum ID (exclusive).*@gfp: Memory allocation flags.
226  If id < 0 Then Go to unlock
229  If id >= shrinker_nr_max Then
232  Go to unlock
235  shrinker_nr_max = id + 1
237  ID in shrinker_idr = id
238  ret = 0
239  unlock :
240  lease a write lock
241  Return ret
Caller
NameDescribe
prealloc_shrinkerAdd a shrinker callback to be called from the vm.