函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kswapd shrinks a node of pages that are at or below the highest usable* zone that is currently unbalanced.* Returns true if kswapd scanned at least the requested number of pages to* reclaim or if the lack of progress was due to pages under writeback.

函数原型:static bool kswapd_shrink_node(pg_data_t *pgdat, struct scan_control *sc)

返回类型:bool

参数:

类型参数名称
pg_data_t *pgdat
struct scan_control *sc
3529  How many pages shrink_list() should reclaim 等于0
3530 z小于等于 The highest zone to isolate pages for reclaim from 循环
3531  zone等于包含了结点中各内存域的数据结构z
3532  如果非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().则继续下一循环
3535  How many pages shrink_list() should reclaim 加等于两数取大(high_wmark_pages(zone), SWAP_CLUSTER_MAX)
3542  shrink_node(pgdat, sc)
3551  如果 Allocation order Number of pages freed so far during a call to shrink_zones() 大于等于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. Allocation order 等于0
3554  返回: Incremented by the number of inactive pages that were scanned 大于等于 How many pages shrink_list() should reclaim
调用者
名称描述
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.