函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Allocate the accumulated non-linear sections, allocate a mem_map* for each and record the physical to section mapping.

函数原型:void __init sparse_init(void)

返回类型:void

参数:

583  pnum_begin等于first_present_section_nr()
584  nid_begin等于sparse_early_nid(__nr_to_section(pnum_begin))
585  map_count等于1
588  When CONFIG_HUGETLB_PAGE_SIZE_VARIABLE is not set, set_pageblock_order()* is unused as pageblock_order is set at compile-time. See* include/linux/pageblock-flags.h for the values of pageblock_order based on* the kernel config
591  nid等于sparse_early_nid(__nr_to_section(pnum_end))
593  如果nid恒等于nid_begin
594  map_count自加
595  继续下一循环
598  Initialize sparse on a specific node. The node spans [pnum_begin, pnum_end)* And number of present sections in this node is map_count.
599  nid_begin等于nid
600  pnum_begin等于pnum_end
601  map_count等于1
604  Initialize sparse on a specific node. The node spans [pnum_begin, pnum_end)* And number of present sections in this node is map_count.
605  vmemmap_populate_print_last()