Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-28 15:08:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:alculate_totalreserve_pages - called when sysctl_lowmem_reserve_ratio* or min_free_kbytes changes.

Proto:static void calculate_totalreserve_pages(void)

Type:void

Parameter:Nothing

7650  reserve_pages = 0
7655  * This is a per-node reserve of pages that are not available * to userspace allocations. = 0
7657  When i < MAX_NR_ZONES cycle
7658  zone = node_zones + i
7659  max = 0
7660  managed_pages = zone_managed_pages(zone)
7663  When j < MAX_NR_ZONES cycle
7669  max += high_wmark_pages(zone)
7671  If max > managed_pages Then max = managed_pages
7674  * This is a per-node reserve of pages that are not available * to userspace allocations. += max
7676  reserve_pages += max
7679  totalreserve_pages = reserve_pages
Caller
NameDescribe
setup_per_zone_lowmem_reservesetup_per_zone_lowmem_reserve - called whenever* sysctl_lowmem_reserve_ratio changes. Ensures that each zone* has a correct pages reserved value, so an adequate number of* pages are left in the zone after a successful __alloc_pages().
__setup_per_zone_wmarks