Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\sparse.c Create Date:2022-07-28 15:34:36
Last Modify:2020-03-17 22:36:03 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:void __init sparse_init(void)

Type:void

Parameter:Nothing

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  If nid == nid_begin Then
594  map_count++
595  Continue
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()