函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Initialise min_free_kbytes

函数原型:int __meminit init_per_zone_wmark_min(void)

返回类型:int

参数:

7830  lowmem_kbytes等于r_free_buffer_pages - count number of pages beyond high watermark* nr_free_buffer_pages() counts the number of pages which are beyond the high* watermark within ZONE_DMA and ZONE_NORMAL.* Return: number of pages beyond high watermark within ZONE_DMA andPAGE_SIZE右移10位的值
7831  new_min_free_kbytes等于_sqrt - computes the integer square root*@x: integer of which to calculate the sqrt* Computes: floor(sqrt(x))
7833  如果new_min_free_kbytes大于user_min_free_kbytes
7834  min_free_kbytes等于new_min_free_kbytes
7835  如果min_free_kbytes小于128则min_free_kbytes等于128
7837  如果min_free_kbytes大于65536则min_free_kbytes等于65536
7839  否则
7840  打印警告信息("min_free_kbytes is not updated to %d because user defined value %d is preferred\n", new_min_free_kbytes, user_min_free_kbytes)
7843  setup_per_zone_wmarks - called when min_free_kbytes changes* or when memory is hot-{added|removed}* Ensures that the watermark[min,low,high] values for each zone are set* correctly with respect to min_free_kbytes.
7844  refresh_zone_stat_thresholds()
7845  setup_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().
7848  setup_min_unmapped_ratio()
7849  setup_min_slab_ratio()
7852  返回:0