Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vmpressure_calc_level

Proto:static enum vmpressure_levels vmpressure_calc_level(unsigned long scanned, unsigned long reclaimed)

Type:enum vmpressure_levels

Parameter:

TypeParameterName
unsigned longscanned
unsigned longreclaimed
124  scale = scanned + reclaimed
125  pressure = 0
132  If reclaimed >= scanned Then Go to out
141  pressure = scale - reclaimed * scale / scanned
142  pressure = pressure * 100 / scale
144  out :
145  pr_debug("%s: %3lu (s: %lu r: %lu)\n", __func__, pressure, scanned, reclaimed)
148  Return vmpressure_level(pressure)
Caller
NameDescribe
vmpressure_work_fn
vmpressurevmpressure() - Account memory pressure through scanned/reclaimed ratio*@gfp: reclaimer's gfp mask*@memcg: cgroup memory controller handle*@tree: legacy subtree mode*@scanned: number of pages scanned*@reclaimed: number of pages reclaimed* This function