函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns true if there is an eligible zone balanced for the request order* and classzone_idx

函数原型:static bool pgdat_balanced(pg_data_t *pgdat, int order, int classzone_idx)

返回类型:bool

参数:

类型参数名称
pg_data_t *pgdat
intorder
intclasszone_idx
3439  mark等于负1
3446 i小于等于classzone_idx循环
3447  zone等于包含了结点中各内存域的数据结构i
3449  如果非Returns true if a zone has pages managed by the buddy allocator.* All the reclaim decisions have to use this function rather than* populated_zone(). If the whole zone is reserved then we can easily* end up with populated_zone() && !managed_zone().则继续下一循环
3452  mark等于high_wmark_pages(zone)
3453  如果zone_watermark_ok_safe(zone, order, mark, classzone_idx)则返回:true
3462  如果mark恒等于负1则返回:true
3465  返回:false
调用者
名称描述
prepare_kswapd_sleepPrepare kswapd for sleeping. This verifies that there are no processes* waiting in throttle_direct_reclaim() and that watermarks have been met.* Returns true if kswapd is ready to sleep
balance_pgdatFor kswapd, balance_pgdat() will reclaim pages across a node from zones* that are eligible for use by the caller until at least one zone is* balanced.* Returns the order kswapd finished reclaiming at.
wakeup_kswapdA zone is low on free memory or too fragmented for high-order memory