Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-28 14:19:47
Last Modify:2022-05-23 13:41:30 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static bool kswapd_shrink_node(pg_data_t *pgdat, struct scan_control *sc)

Type:bool

Parameter:

TypeParameterName
pg_data_t *pgdat
struct scan_control *sc
3529  How many pages shrink_list() should reclaim = 0
3530  When z <= The highest zone to isolate pages for reclaim from cycle
3531  zone = node_zones + z
3532  If Not 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(). Then Continue
3535  How many pages shrink_list() should reclaim += max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(high_wmark_pages(zone), SWAP_CLUSTER_MAX)
3542  shrink_node(pgdat, sc)
3551  If 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. Then Allocation order = 0
3554  Return Incremented by the number of inactive pages that were scanned >= How many pages shrink_list() should reclaim
Caller
NameDescribe
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.