Lines Matching defs:pgdat
2581 static bool pgdat_free_space_enough(struct pglist_data *pgdat)
2587 pgdat->node_present_pages >> 4);
2588 for (z = pgdat->nr_zones - 1; z >= 0; z--) {
2589 struct zone *zone = pgdat->node_zones + z;
2629 static bool numa_promotion_rate_limit(struct pglist_data *pgdat,
2636 mod_node_page_state(pgdat, PGPROMOTE_CANDIDATE, nr);
2637 nr_cand = node_page_state(pgdat, PGPROMOTE_CANDIDATE);
2638 start = pgdat->nbp_rl_start;
2640 cmpxchg(&pgdat->nbp_rl_start, start, now) == start)
2641 pgdat->nbp_rl_nr_cand = nr_cand;
2642 if (nr_cand - pgdat->nbp_rl_nr_cand >= rate_limit)
2649 static void numa_promotion_adjust_threshold(struct pglist_data *pgdat,
2658 start = pgdat->nbp_th_start;
2660 cmpxchg(&pgdat->nbp_th_start, start, now) == start) {
2663 nr_cand = node_page_state(pgdat, PGPROMOTE_CANDIDATE);
2664 diff_cand = nr_cand - pgdat->nbp_th_nr_cand;
2666 th = pgdat->nbp_threshold ? : ref_th;
2671 pgdat->nbp_th_nr_cand = nr_cand;
2672 pgdat->nbp_threshold = th;
2694 struct pglist_data *pgdat;
2699 pgdat = NODE_DATA(dst_nid);
2700 if (pgdat_free_space_enough(pgdat)) {
2702 pgdat->nbp_threshold = 0;
2703 mod_node_page_state(pgdat, PGPROMOTE_CANDIDATE_NRL, nr);
2709 numa_promotion_adjust_threshold(pgdat, rate_limit, def_th);
2711 th = pgdat->nbp_threshold ? : def_th;
2716 return !numa_promotion_rate_limit(pgdat, rate_limit, nr);