函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:setup_usemap

函数原型:static void __ref setup_usemap(struct pglist_data *pgdat, struct zone *zone, unsigned long zone_start_pfn, unsigned long zonesize)

返回类型:void

参数:

类型参数名称
struct pglist_data *pgdat
struct zone *zone
unsigned longzone_start_pfn
unsigned longzonesize
6584  usemapsize等于Calculate the size of the zone->blockflags rounded to an unsigned long* Start by making sure zonesize is a multiple of pageblock_order by rounding* up
6585  * Flags for a pageblock_nr_pages block. See pageblock-flags.h. * In SPARSEMEM, this map is stored in struct mem_section = NULL
6586  如果usemapsize
6587  * Flags for a pageblock_nr_pages block. See pageblock-flags.h. * In SPARSEMEM, this map is stored in struct mem_section等于memblock_alloc_node(usemapsize, SMP_CACHE_BYTES, 全局结点ID)
6590  如果非* Flags for a pageblock_nr_pages block. See pageblock-flags.h. * In SPARSEMEM, this map is stored in struct mem_sectionpanic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
调用者
名称描述
free_area_init_coreSet up the zone data structures:* - mark all pages reserved* - mark all memory queues empty* - clear the memory bitmaps* NOTE: pgdat should get zeroed by caller.* NOTE: this function is only called during early init.