Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Add a shrinker callback to be called from the vm.

Proto:int prealloc_shrinker(struct shrinker *shrinker)

Type:int

Parameter:

TypeParameterName
struct shrinker *shrinker
352  size = size of bjs pending delete, per node
354  If flags & Flags Then size *= nr_node_ids
357  bjs pending delete, per node = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
358  If Not bjs pending delete, per node Then Return -ENOMEM
361  If flags & SHRINKER_MEMCG_AWARE Then
362  If prealloc_memcg_shrinker(shrinker) Then Go to free_deferred
366  Return 0
368  free_deferred :
369  kfree - free previously allocated memory*@objp: pointer returned by kmalloc.* If @objp is NULL, no operation is performed.* Don't free memory not originally allocated by kmalloc()* or you will run into trouble.
370  bjs pending delete, per node = NULL
371  Return -ENOMEM
Caller
NameDescribe
register_shrinker
workingset_init