Lines Matching refs:pgdat

432 static void update_pgdat_span(struct pglist_data *pgdat)  in update_pgdat_span()  argument
437 for (zone = pgdat->node_zones; in update_pgdat_span()
438 zone < pgdat->node_zones + MAX_NR_ZONES; zone++) { in update_pgdat_span()
456 pgdat->node_start_pfn = node_start_pfn; in update_pgdat_span()
457 pgdat->node_spanned_pages = node_end_pfn - node_start_pfn; in update_pgdat_span()
465 struct pglist_data *pgdat = zone->zone_pgdat; in remove_pfn_range_from_zone() local
490 update_pgdat_span(pgdat); in remove_pfn_range_from_zone()
651 static void __meminit resize_pgdat_range(struct pglist_data *pgdat, unsigned long start_pfn, in resize_pgdat_range() argument
654 unsigned long old_end_pfn = pgdat_end_pfn(pgdat); in resize_pgdat_range()
656 if (!pgdat->node_spanned_pages || start_pfn < pgdat->node_start_pfn) in resize_pgdat_range()
657 pgdat->node_start_pfn = start_pfn; in resize_pgdat_range()
659 pgdat->node_spanned_pages = max(start_pfn + nr_pages, old_end_pfn) - pgdat->node_start_pfn; in resize_pgdat_range()
683 struct pglist_data *pgdat = zone->zone_pgdat; in move_pfn_range_to_zone() local
684 int nid = pgdat->node_id; in move_pfn_range_to_zone()
691 resize_pgdat_range(pgdat, start_pfn, nr_pages); in move_pfn_range_to_zone()
778 pg_data_t *pgdat = NODE_DATA(nid); in auto_movable_can_online_movable() local
789 zone = pgdat->node_zones + i; in auto_movable_can_online_movable()
829 struct pglist_data *pgdat = NODE_DATA(nid); in default_kernel_zone_for_pfn() local
833 struct zone *zone = &pgdat->node_zones[zid]; in default_kernel_zone_for_pfn()
839 return &pgdat->node_zones[ZONE_NORMAL]; in default_kernel_zone_for_pfn()
1154 static void reset_node_present_pages(pg_data_t *pgdat) in reset_node_present_pages() argument
1158 for (z = pgdat->node_zones; z < pgdat->node_zones + MAX_NR_ZONES; z++) in reset_node_present_pages()
1161 pgdat->node_present_pages = 0; in reset_node_present_pages()
1167 struct pglist_data *pgdat; in hotadd_new_pgdat() local
1169 pgdat = NODE_DATA(nid); in hotadd_new_pgdat()
1170 if (!pgdat) { in hotadd_new_pgdat()
1171 pgdat = arch_alloc_nodedata(nid); in hotadd_new_pgdat()
1172 if (!pgdat) in hotadd_new_pgdat()
1175 pgdat->per_cpu_nodestats = in hotadd_new_pgdat()
1177 arch_refresh_nodedata(nid, pgdat); in hotadd_new_pgdat()
1185 pgdat->nr_zones = 0; in hotadd_new_pgdat()
1186 pgdat->kswapd_order = 0; in hotadd_new_pgdat()
1187 pgdat->kswapd_highest_zoneidx = 0; in hotadd_new_pgdat()
1191 p = per_cpu_ptr(pgdat->per_cpu_nodestats, cpu); in hotadd_new_pgdat()
1197 pgdat->node_id = nid; in hotadd_new_pgdat()
1198 pgdat->node_start_pfn = 0; in hotadd_new_pgdat()
1207 build_all_zonelists(pgdat); in hotadd_new_pgdat()
1214 reset_node_managed_pages(pgdat); in hotadd_new_pgdat()
1215 reset_node_present_pages(pgdat); in hotadd_new_pgdat()
1217 return pgdat; in hotadd_new_pgdat()
1222 pg_data_t *pgdat = NODE_DATA(nid); in rollback_node_hotadd() local
1225 free_percpu(pgdat->per_cpu_nodestats); in rollback_node_hotadd()
1226 arch_free_nodedata(pgdat); in rollback_node_hotadd()
1243 pg_data_t *pgdat; in __try_online_node() local
1249 pgdat = hotadd_new_pgdat(nid); in __try_online_node()
1250 if (!pgdat) { in __try_online_node()
1793 struct pglist_data *pgdat = zone->zone_pgdat; in node_states_check_changes_offline() local
1809 present_pages += pgdat->node_zones[zt].present_pages; in node_states_check_changes_offline()
1822 present_pages += pgdat->node_zones[ZONE_MOVABLE].present_pages; in node_states_check_changes_offline()
2049 static int check_cpu_on_node(pg_data_t *pgdat) in check_cpu_on_node() argument
2054 if (cpu_to_node(cpu) == pgdat->node_id) in check_cpu_on_node()
2088 pg_data_t *pgdat = NODE_DATA(nid); in try_offline_node() local
2096 if (pgdat->node_spanned_pages) in try_offline_node()
2108 if (check_cpu_on_node(pgdat)) in try_offline_node()