函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-27 15:43:14
Last Modify:2022-05-23 13:41:30 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Returns true if compaction should go ahead for a costly-order request, or* the allocation would already succeed without compaction. Return false if we* should reclaim first.

函数原型:static inline bool compaction_ready(struct zone *zone, struct scan_control *sc)

返回类型:bool

参数:

类型参数名称
struct zone *zone
struct scan_control *sc
2894  suitable等于compaction_suitable(zone, Allocation order , 0, The highest zone to isolate pages for reclaim from )
2895  如果suitable恒等于COMPACT_SUCCESS则返回:true
2898  如果suitable恒等于COMPACT_SKIPPED则返回:false
2911  watermark等于high_wmark_pages(zone)加Number of free order-0 pages that should be available above given watermark* to make sure compaction has reasonable chance of not running out of free* pages that it needs to isolate as migration target during its work.
2913  返回:zone_watermark_ok_safe(zone, 0, watermark, The highest zone to isolate pages for reclaim from )
调用者
名称描述
shrink_zonesThis is the direct reclaim path, for page-allocating processes. We only* try to reclaim pages from zones which will satisfy the caller's allocation* request.* If a zone is deemed to be full of pinned pages then just give it a light