Lines Matching refs:pgdat

1574 	pg_data_t *pgdat;  in init_reserved_page()  local
1581 pgdat = NODE_DATA(nid); in init_reserved_page()
1584 struct zone *zone = &pgdat->node_zones[zid]; in init_reserved_page()
2033 pg_data_t *pgdat = data; in deferred_init_memmap() local
2034 const struct cpumask *cpumask = cpumask_of_node(pgdat->node_id); in deferred_init_memmap()
2046 pgdat_resize_lock(pgdat, &flags); in deferred_init_memmap()
2047 first_init_pfn = pgdat->first_deferred_pfn; in deferred_init_memmap()
2049 pgdat_resize_unlock(pgdat, &flags); in deferred_init_memmap()
2055 BUG_ON(pgdat->first_deferred_pfn < pgdat->node_start_pfn); in deferred_init_memmap()
2056 BUG_ON(pgdat->first_deferred_pfn > pgdat_end_pfn(pgdat)); in deferred_init_memmap()
2057 pgdat->first_deferred_pfn = ULONG_MAX; in deferred_init_memmap()
2064 pgdat_resize_unlock(pgdat, &flags); in deferred_init_memmap()
2068 zone = pgdat->node_zones + zid; in deferred_init_memmap()
2101 pgdat->node_id, jiffies_to_msecs(jiffies - start)); in deferred_init_memmap()
2126 pg_data_t *pgdat = zone->zone_pgdat; in deferred_grow_zone() local
2127 unsigned long first_deferred_pfn = pgdat->first_deferred_pfn; in deferred_grow_zone()
2133 if (zone_end_pfn(zone) != pgdat_end_pfn(pgdat)) in deferred_grow_zone()
2136 pgdat_resize_lock(pgdat, &flags); in deferred_grow_zone()
2142 if (first_deferred_pfn != pgdat->first_deferred_pfn) { in deferred_grow_zone()
2143 pgdat_resize_unlock(pgdat, &flags); in deferred_grow_zone()
2150 pgdat->first_deferred_pfn = ULONG_MAX; in deferred_grow_zone()
2151 pgdat_resize_unlock(pgdat, &flags); in deferred_grow_zone()
2177 pgdat->first_deferred_pfn = spfn; in deferred_grow_zone()
2178 pgdat_resize_unlock(pgdat, &flags); in deferred_grow_zone()
5793 pg_data_t *pgdat = NODE_DATA(nid); in si_meminfo_node() local
5796 managed_pages += zone_managed_pages(&pgdat->node_zones[zone_type]); in si_meminfo_node()
5798 val->sharedram = node_page_state(pgdat, NR_SHMEM); in si_meminfo_node()
5802 struct zone *zone = &pgdat->node_zones[zone_type]; in si_meminfo_node()
5882 pg_data_t *pgdat; in show_free_areas() local
5919 for_each_online_pgdat(pgdat) { in show_free_areas()
5920 if (show_mem_node_skip(filter, pgdat->node_id, nodemask)) in show_free_areas()
5948 pgdat->node_id, in show_free_areas()
5949 K(node_page_state(pgdat, NR_ACTIVE_ANON)), in show_free_areas()
5950 K(node_page_state(pgdat, NR_INACTIVE_ANON)), in show_free_areas()
5951 K(node_page_state(pgdat, NR_ACTIVE_FILE)), in show_free_areas()
5952 K(node_page_state(pgdat, NR_INACTIVE_FILE)), in show_free_areas()
5953 K(node_page_state(pgdat, NR_UNEVICTABLE)), in show_free_areas()
5954 K(node_page_state(pgdat, NR_ISOLATED_ANON)), in show_free_areas()
5955 K(node_page_state(pgdat, NR_ISOLATED_FILE)), in show_free_areas()
5956 K(node_page_state(pgdat, NR_FILE_MAPPED)), in show_free_areas()
5957 K(node_page_state(pgdat, NR_FILE_DIRTY)), in show_free_areas()
5958 K(node_page_state(pgdat, NR_WRITEBACK)), in show_free_areas()
5959 K(node_page_state(pgdat, NR_SHMEM)), in show_free_areas()
5961 K(node_page_state(pgdat, NR_SHMEM_THPS)), in show_free_areas()
5962 K(node_page_state(pgdat, NR_SHMEM_PMDMAPPED)), in show_free_areas()
5963 K(node_page_state(pgdat, NR_ANON_THPS)), in show_free_areas()
5965 K(node_page_state(pgdat, NR_WRITEBACK_TEMP)), in show_free_areas()
5966 node_page_state(pgdat, NR_KERNEL_STACK_KB), in show_free_areas()
5968 node_page_state(pgdat, NR_KERNEL_SCS_KB), in show_free_areas()
5970 K(node_page_state(pgdat, NR_PAGETABLE)), in show_free_areas()
5971 pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES ? in show_free_areas()
6086 static int build_zonerefs_node(pg_data_t *pgdat, struct zoneref *zonerefs) in build_zonerefs_node() argument
6094 zone = pgdat->node_zones + zone_type; in build_zonerefs_node()
6203 static void build_zonelists_in_node_order(pg_data_t *pgdat, int *node_order, in build_zonelists_in_node_order() argument
6209 zonerefs = pgdat->node_zonelists[ZONELIST_FALLBACK]._zonerefs; in build_zonelists_in_node_order()
6226 static void build_thisnode_zonelists(pg_data_t *pgdat) in build_thisnode_zonelists() argument
6231 zonerefs = pgdat->node_zonelists[ZONELIST_NOFALLBACK]._zonerefs; in build_thisnode_zonelists()
6232 nr_zones = build_zonerefs_node(pgdat, zonerefs); in build_thisnode_zonelists()
6245 static void build_zonelists(pg_data_t *pgdat) in build_zonelists() argument
6253 local_node = pgdat->node_id; in build_zonelists()
6273 build_zonelists_in_node_order(pgdat, node_order, nr_nodes); in build_zonelists()
6274 build_thisnode_zonelists(pgdat); in build_zonelists()
6303 static void build_zonelists(pg_data_t *pgdat) in build_zonelists() argument
6309 local_node = pgdat->node_id; in build_zonelists()
6311 zonerefs = pgdat->node_zonelists[ZONELIST_FALLBACK]._zonerefs; in build_zonelists()
6312 nr_zones = build_zonerefs_node(pgdat, zonerefs); in build_zonelists()
6386 pg_data_t *pgdat = NODE_DATA(nid); in __build_all_zonelists() local
6388 build_zonelists(pgdat); in __build_all_zonelists()
6441 void __ref build_all_zonelists(pg_data_t *pgdat) in build_all_zonelists() argument
6448 __build_all_zonelists(pgdat); in build_all_zonelists()
6571 struct pglist_data *pgdat = zone->zone_pgdat; in memmap_init_zone_device() local
6575 int nid = pgdat->node_id; in memmap_init_zone_device()
6968 struct pglist_data *pgdat; in setup_per_cpu_pageset() local
6989 for_each_online_pgdat(pgdat) in setup_per_cpu_pageset()
6990 pgdat->per_cpu_nodestats = in setup_per_cpu_pageset()
7015 struct pglist_data *pgdat = zone->zone_pgdat; in init_currently_empty_zone() local
7018 if (zone_idx > pgdat->nr_zones) in init_currently_empty_zone()
7019 pgdat->nr_zones = zone_idx; in init_currently_empty_zone()
7025 pgdat->node_id, in init_currently_empty_zone()
7240 static void __init calculate_node_totalpages(struct pglist_data *pgdat, in calculate_node_totalpages() argument
7248 struct zone *zone = pgdat->node_zones + i; in calculate_node_totalpages()
7253 spanned = zone_spanned_pages_in_node(pgdat->node_id, i, in calculate_node_totalpages()
7258 absent = zone_absent_pages_in_node(pgdat->node_id, i, in calculate_node_totalpages()
7279 pgdat->node_spanned_pages = totalpages; in calculate_node_totalpages()
7280 pgdat->node_present_pages = realtotalpages; in calculate_node_totalpages()
7281 pr_debug("On node %d totalpages: %lu\n", pgdat->node_id, realtotalpages); in calculate_node_totalpages()
7381 static void pgdat_init_split_queue(struct pglist_data *pgdat) in pgdat_init_split_queue() argument
7383 struct deferred_split *ds_queue = &pgdat->deferred_split_queue; in pgdat_init_split_queue()
7390 static void pgdat_init_split_queue(struct pglist_data *pgdat) {} in pgdat_init_split_queue() argument
7394 static void pgdat_init_kcompactd(struct pglist_data *pgdat) in pgdat_init_kcompactd() argument
7396 init_waitqueue_head(&pgdat->kcompactd_wait); in pgdat_init_kcompactd()
7399 static void pgdat_init_kcompactd(struct pglist_data *pgdat) {} in pgdat_init_kcompactd() argument
7402 static void __meminit pgdat_init_internals(struct pglist_data *pgdat) in pgdat_init_internals() argument
7406 pgdat_resize_init(pgdat); in pgdat_init_internals()
7408 pgdat_init_split_queue(pgdat); in pgdat_init_internals()
7409 pgdat_init_kcompactd(pgdat); in pgdat_init_internals()
7411 init_waitqueue_head(&pgdat->kswapd_wait); in pgdat_init_internals()
7412 init_waitqueue_head(&pgdat->pfmemalloc_wait); in pgdat_init_internals()
7415 init_waitqueue_head(&pgdat->reclaim_wait[i]); in pgdat_init_internals()
7417 pgdat_page_ext_init(pgdat); in pgdat_init_internals()
7418 lruvec_init(&pgdat->__lruvec); in pgdat_init_internals()
7444 pg_data_t *pgdat = NODE_DATA(nid); in free_area_init_core_hotplug() local
7446 pgdat_init_internals(pgdat); in free_area_init_core_hotplug()
7448 zone_init_internals(&pgdat->node_zones[z], z, nid, 0); in free_area_init_core_hotplug()
7461 static void __init free_area_init_core(struct pglist_data *pgdat) in free_area_init_core() argument
7464 int nid = pgdat->node_id; in free_area_init_core()
7466 pgdat_init_internals(pgdat); in free_area_init_core()
7467 pgdat->per_cpu_nodestats = &boot_nodestats; in free_area_init_core()
7470 struct zone *zone = pgdat->node_zones + j; in free_area_init_core()
7523 static void __init alloc_node_mem_map(struct pglist_data *pgdat) in alloc_node_mem_map() argument
7529 if (!pgdat->node_spanned_pages) in alloc_node_mem_map()
7532 start = pgdat->node_start_pfn & ~(MAX_ORDER_NR_PAGES - 1); in alloc_node_mem_map()
7533 offset = pgdat->node_start_pfn - start; in alloc_node_mem_map()
7535 if (!pgdat->node_mem_map) { in alloc_node_mem_map()
7544 end = pgdat_end_pfn(pgdat); in alloc_node_mem_map()
7548 pgdat->node_id, false); in alloc_node_mem_map()
7551 size, pgdat->node_id); in alloc_node_mem_map()
7552 pgdat->node_mem_map = map + offset; in alloc_node_mem_map()
7555 __func__, pgdat->node_id, (unsigned long)pgdat, in alloc_node_mem_map()
7556 (unsigned long)pgdat->node_mem_map); in alloc_node_mem_map()
7561 if (pgdat == NODE_DATA(0)) { in alloc_node_mem_map()
7563 if (page_to_pfn(mem_map) != pgdat->node_start_pfn) in alloc_node_mem_map()
7569 static inline void alloc_node_mem_map(struct pglist_data *pgdat) { } in alloc_node_mem_map() argument
7573 static inline void pgdat_set_deferred_range(pg_data_t *pgdat) in pgdat_set_deferred_range() argument
7575 pgdat->first_deferred_pfn = ULONG_MAX; in pgdat_set_deferred_range()
7578 static inline void pgdat_set_deferred_range(pg_data_t *pgdat) {} in pgdat_set_deferred_range() argument
7583 pg_data_t *pgdat = NODE_DATA(nid); in free_area_init_node() local
7588 WARN_ON(pgdat->nr_zones || pgdat->kswapd_highest_zoneidx); in free_area_init_node()
7592 pgdat->node_id = nid; in free_area_init_node()
7593 pgdat->node_start_pfn = start_pfn; in free_area_init_node()
7594 pgdat->per_cpu_nodestats = NULL; in free_area_init_node()
7599 calculate_node_totalpages(pgdat, start_pfn, end_pfn); in free_area_init_node()
7601 alloc_node_mem_map(pgdat); in free_area_init_node()
7602 pgdat_set_deferred_range(pgdat); in free_area_init_node()
7604 free_area_init_core(pgdat); in free_area_init_node()
7921 static void check_for_memory(pg_data_t *pgdat, int nid) in check_for_memory() argument
7926 struct zone *zone = &pgdat->node_zones[zone_type]; in check_for_memory()
8036 pg_data_t *pgdat = NODE_DATA(nid); in free_area_init() local
8040 if (pgdat->node_present_pages) in free_area_init()
8042 check_for_memory(pgdat, nid); in free_area_init()
8292 struct pglist_data *pgdat; in calculate_totalreserve_pages() local
8296 for_each_online_pgdat(pgdat) { in calculate_totalreserve_pages()
8298 pgdat->totalreserve_pages = 0; in calculate_totalreserve_pages()
8301 struct zone *zone = pgdat->node_zones + i; in calculate_totalreserve_pages()
8317 pgdat->totalreserve_pages += max; in calculate_totalreserve_pages()
8333 struct pglist_data *pgdat; in setup_per_zone_lowmem_reserve() local
8336 for_each_online_pgdat(pgdat) { in setup_per_zone_lowmem_reserve()
8338 struct zone *zone = &pgdat->node_zones[i]; in setup_per_zone_lowmem_reserve()
8344 struct zone *upper_zone = &pgdat->node_zones[j]; in setup_per_zone_lowmem_reserve()
8543 pg_data_t *pgdat; in setup_min_unmapped_ratio() local
8546 for_each_online_pgdat(pgdat) in setup_min_unmapped_ratio()
8547 pgdat->min_unmapped_pages = 0; in setup_min_unmapped_ratio()
8571 pg_data_t *pgdat; in setup_min_slab_ratio() local
8574 for_each_online_pgdat(pgdat) in setup_min_slab_ratio()
8575 pgdat->min_slab_pages = 0; in setup_min_slab_ratio()