Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-28 15:07:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:calculate_node_totalpages

Proto:static void __init calculate_node_totalpages(struct pglist_data *pgdat, unsigned long node_start_pfn, unsigned long node_end_pfn, unsigned long *zones_size, unsigned long *zholes_size)

Type:void

Parameter:

TypeParameterName
struct pglist_data *pgdat
unsigned longnode_start_pfn
unsigned longnode_end_pfn
unsigned long *zones_size
unsigned long *zholes_size
6524  realtotalpages = 0 , totalpages = 0
6527  When i < MAX_NR_ZONES cycle
6528  zone = node_zones + i
6532  size = zone_spanned_pages_in_node(node_id, i, node_start_pfn, node_end_pfn, & zone_start_pfn, & zone_end_pfn, zones_size)
6538  real_size = size - zone_absent_pages_in_node(node_id, i, node_start_pfn, node_end_pfn, zholes_size)
6541  If size Then zone_start_pfn == zone_start_paddr >> PAGE_SHIFT = zone_start_pfn
6543  Else zone_start_pfn == zone_start_paddr >> PAGE_SHIFT = 0
6545  spanned_pages = size
6546  present_pages = real_size
6548  totalpages += size
6549  realtotalpages += real_size
6552  total size of physical page range, including holes = totalpages
6553  total number of physical pages = realtotalpages
6554  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
Caller
NameDescribe
free_area_init_node