Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:allow_direct_reclaim

Proto:static bool allow_direct_reclaim(pg_data_t *pgdat)

Type:bool

Parameter:

TypeParameterName
pg_data_t *pgdat
3127  pfmemalloc_reserve = 0
3128  free_pages = 0
3132  If Number of 'reclaimed == 0' runs >= Maximum number of reclaim retries without progress before the OOM* killer is consider the only way forward. Then Return true
3135  When i <= * Normal addressable memory is in ZONE_NORMAL. DMA operations can be * performed on pages in ZONE_NORMAL if the DMA devices support * transfers to all addressable memory. cycle
3136  zone = node_zones[i]
3137  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
3140  If Not This misses isolated pages which are not accounted for to save counters.* As the data only determines if reclaim or compaction continues, it is* not expected that isolated pages will be a dominating factor. Then Continue
3143  pfmemalloc_reserve += min_wmark_pages(zone)
3144  free_pages += zone_page_state(zone, NR_FREE_PAGES)
3148  If Not pfmemalloc_reserve Then Return true
3151  wmark_ok = free_pages > pfmemalloc_reserve / 2
3154  If Not wmark_ok && waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_ Then
3155  kswapd_classzone_idx = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(kswapd_classzone_idx, (enumzone_type)* Normal addressable memory is in ZONE_NORMAL. DMA operations can be * performed on pages in ZONE_NORMAL if the DMA devices support * transfers to all addressable memory.)
3157  wake_up_interruptible( & kswapd_wait)
3160  Return wmark_ok
Caller
NameDescribe
throttle_direct_reclaimThrottle direct reclaimers if backing storage is backed by the network* and the PFMEMALLOC reserve for the preferred node is getting dangerously* depleted. kswapd will continue to make progress and wake the processes* when the low watermark is reached.
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.