函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-27 16:38:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:alculate_totalreserve_pages - called when sysctl_lowmem_reserve_ratio* or min_free_kbytes changes.

函数原型:static void calculate_totalreserve_pages(void)

返回类型:void

参数:

7650  reserve_pages等于0
7655  * This is a per-node reserve of pages that are not available * to userspace allocations.等于0
7657 i小于MAX_NR_ZONES循环
7658  zone等于包含了结点中各内存域的数据结构i
7659  max等于0
7660  managed_pages等于zone_managed_pages(zone)
7663 j小于MAX_NR_ZONES循环
7664  如果关键性内存分配[j]大于maxmax等于关键性内存分配[j]
7669  max加等于high_wmark_pages(zone)
7671  如果max大于managed_pagesmax等于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
调用者
名称描述
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