函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:si_mem_available

函数原型:long si_mem_available(void)

返回类型:long

参数:

5079  wmark_low等于0
5085 lru小于NR_LRU_LISTS循环pages[lru]等于global_node_page_state(NR_LRU_BASE + lru)
5088  r_each_zone - helper macro to iterate over all memory zones*@zone - pointer to struct zone variable* The user only needs to declare the zone variable, for_each_zone* fills it in.(zone)
5089  wmark_low加等于low_wmark_pages(zone)
5095  available等于global_zone_page_state( First 128 byte cacheline (assuming 64 bit words) )减totalreserve_pages
5102  pagecache等于pages[LRU_ACTIVE_FILE]加pages[LRU_INACTIVE_FILE]
5103  pagecache减等于两数取小(pagecache / 2, wmark_low)
5104  available加等于pagecache
5111  reclaimable等于global_node_page_state(NR_SLAB_RECLAIMABLE)加global_node_page_state( reclaimable non-slab kernel pages )
5113  available加等于reclaimable两数取小(reclaimable / 2, wmark_low)
5115  如果available小于0则available等于0
5117  返回:available
调用者
名称描述
__rb_allocate_pages