函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:set_recommended_min_free_kbytes

函数原型:static void set_recommended_min_free_kbytes(void)

返回类型:void

参数:

2144  nr_zones等于0
2147  do nothing (zone)
2152  如果zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.(zone)大于gfp_zone(GFP_USER)则继续下一循环
2155  nr_zones自加
2159  recommended_min等于pageblock_nr_pagesnr_zones乘2
2167  recommended_min加等于pageblock_nr_pagesnr_zonesMIGRATE_PCPTYPESMIGRATE_PCPTYPES
2171  recommended_min等于两数取小(recommended_min, (unsignedlong)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 and / 20)
2173  recommended_min左移等于PAGE_SHIFT determines the page size 减10位
2175  如果recommended_min大于min_free_kbytes
2176  如果user_min_free_kbytes大于等于0则打印信息("raising min_free_kbytes from %d to %lu to help transparent hugepage allocations\n", min_free_kbytes, recommended_min)
2180  min_free_kbytes等于recommended_min
2182  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.
调用者
名称描述
start_stop_khugepaged