内存域水印值:min_free_kbytes
1、内存域水印值:需要为关键性分配保留的内存空间的最小值;该值保存在全局变量min_free_kbytes中
2、内存域水印值的计算由函数init_per_zone_pages_min完成:
/* * results with 256, 32 in the lowmem_reserve sysctl: *1G machine -> (16M dma, 800M-16M normal, 1G-800M high) *1G machine -> (16M dma, 784M normal, 224M high) *NORMAL allocation will leave 784M/256 of ram reserved in the ZONE_DMA *HIGHMEM allocation will leave 224M/32 of ram reserved in ZONE_NORMAL *HIGHMEM allocation will (224M+784M)/256 of ram reserved in ZONE_DMA * * TBD: should special case ZONE_DMA32 machines here - in those we normally * don't need any ZONE_NORMAL reservation */int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {#ifdef CONFIG_ZONE_DMA 256,#endif#ifdef CONFIG_ZONE_DMA32 256,#endif#ifdef CONFIG_HIGHMEM 32,#endif 32,};