函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vmpressure() - 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

函数原型:void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree, unsigned long scanned, unsigned long reclaimed)

返回类型:void

参数:

类型参数名称
gfp_tgfp
struct mem_cgroup *memcg
booltree
unsigned longscanned
unsigned longreclaimed
243  vmpr等于Some nice accessors for the vmpressure.
256  如果非gfp按位与__GFP_HIGHMEM按位或ZONE_MOVABLE allowed 按位或DOC: Reclaim modifiers* Reclaim modifiers* ~~~~~~~~~~~~~~~~~* %__GFP_IO can start physical IO.* %__GFP_FS can call down to the low-level FS. Clearing the flag avoids the* allocator recursing into the filesystem which might already be holding* locks.按位或__GFP_FS的值的值则返回
267  如果非scanned则返回
270  如果tree
271  加自旋锁
272  scanned等于tree_scanned加等于scanned
273  tree_reclaimed加等于reclaimed
274  自旋锁解锁
276  如果scanned小于The window size (vmpressure_win) is the number of scanned pages before* we try to analyze scanned/reclaimed ratio. So the window is used as a* rate-limit tunable for the "low" level notification, and also for则返回
278  schedule_work - put work task in global workqueue*@work: job to be done* Returns %false if @work was already on the kernel-global workqueue and* %true otherwise
279  否则
283  如果非memcgmemcg恒等于root_mem_cgroup则返回
286  加自旋锁
287  scanned等于scanned加等于scanned
288  reclaimed等于reclaimed加等于reclaimed
291  返回
293  scanned等于reclaimed等于0
294  自旋锁解锁
296  level等于vmpressure_calc_level(scanned, reclaimed)
298  如果level大于VMPRESSURE_LOW
307  socket_pressure等于jiffiesHZ
调用者
名称描述
shrink_node
vmpressure_priovmpressure_prio() - Account memory pressure through reclaimer priority level*@gfp: reclaimer's gfp mask*@memcg: cgroup memory controller handle*@prio: reclaimer's priority* This function should be called from the reclaim path every time when
shrink_node_memcgs