函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Initialize sparse on a specific node. The node spans [pnum_begin, pnum_end)* And number of present sections in this node is map_count.

函数原型:static void __init sparse_init_nid(int nid, unsigned long pnum_begin, unsigned long pnum_end, unsigned long map_count)

返回类型:void

参数:

类型参数名称
intnid
unsigned longpnum_begin
unsigned longpnum_end
unsigned longmap_count
537  usage等于sparse_early_usemaps_alloc_pgdat_section(NUMA节点数据区(nid), mem_section_usage_size() * map_count)
539  如果非usage
540  打印错误信息("%s: node[%d] usemap allocation failed", __func__, nid)
541  转到:failed
543  sparse_buffer_init(map_count * section_map_size(), nid)
545  pfn等于section_nr_to_pfn(pnum)
547  如果pnum大于等于pnum_end退出
550  map等于__populate_section_memmap(pfn, PAGES_PER_SECTION, nid, NULL)
552  如果非map
553  打印错误信息("%s: node[%d] memory map backing failed. Some memory will not be available.", __func__, nid)
555  pnum_begin等于pnum
556  转到:failed
558  check_usemap_section_nr(nid, usage)
559  sparse_init_one_section(__nr_to_section(pnum), pnum, map, usage, SECTION_IS_EARLY)
561  usage等于usagemem_section_usage_size()
563  sparse_buffer_fini()
564  返回
565  failed :
570  如果pnum大于等于pnum_end退出
572  ms等于__nr_to_section(pnum)
573  section_mem_map等于0
调用者
名称描述
sparse_initAllocate the accumulated non-linear sections, allocate a mem_map* for each and record the physical to section mapping.