Lines Matching refs:pgdat

383 void reset_isolation_suitable(pg_data_t *pgdat)  in reset_isolation_suitable()  argument
388 struct zone *zone = &pgdat->node_zones[zoneid]; in reset_isolation_suitable()
762 static bool too_many_isolated(pg_data_t *pgdat) in too_many_isolated() argument
768 inactive = node_page_state(pgdat, NR_INACTIVE_FILE) + in too_many_isolated()
769 node_page_state(pgdat, NR_INACTIVE_ANON); in too_many_isolated()
770 active = node_page_state(pgdat, NR_ACTIVE_FILE) + in too_many_isolated()
771 node_page_state(pgdat, NR_ACTIVE_ANON); in too_many_isolated()
772 isolated = node_page_state(pgdat, NR_ISOLATED_FILE) + in too_many_isolated()
773 node_page_state(pgdat, NR_ISOLATED_ANON); in too_many_isolated()
777 wake_throttle_isolated(pgdat); in too_many_isolated()
803 pg_data_t *pgdat = cc->zone->zone_pgdat; in isolate_migratepages_block() local
822 while (unlikely(too_many_isolated(pgdat))) { in isolate_migratepages_block()
831 reclaim_throttle(pgdat, VMSCAN_THROTTLE_ISOLATED); in isolate_migratepages_block()
1954 static bool kswapd_is_running(pg_data_t *pgdat) in kswapd_is_running() argument
1956 return pgdat->kswapd && task_is_running(pgdat->kswapd); in kswapd_is_running()
1993 static unsigned int fragmentation_score_node(pg_data_t *pgdat) in fragmentation_score_node() argument
2001 zone = &pgdat->node_zones[zoneid]; in fragmentation_score_node()
2008 static unsigned int fragmentation_score_wmark(pg_data_t *pgdat, bool low) in fragmentation_score_wmark() argument
2021 static bool should_proactive_compact_node(pg_data_t *pgdat) in should_proactive_compact_node() argument
2025 if (!sysctl_compaction_proactiveness || kswapd_is_running(pgdat)) in should_proactive_compact_node()
2028 wmark_high = fragmentation_score_wmark(pgdat, false); in should_proactive_compact_node()
2029 return fragmentation_score_node(pgdat) > wmark_high; in should_proactive_compact_node()
2060 pg_data_t *pgdat; in __compact_finished() local
2062 pgdat = cc->zone->zone_pgdat; in __compact_finished()
2063 if (kswapd_is_running(pgdat)) in __compact_finished()
2067 wmark_low = fragmentation_score_wmark(pgdat, true); in __compact_finished()
2633 static void proactive_compact_node(pg_data_t *pgdat) in proactive_compact_node() argument
2647 zone = &pgdat->node_zones[zoneid]; in proactive_compact_node()
2663 pg_data_t *pgdat = NODE_DATA(nid); in compact_node() local
2677 zone = &pgdat->node_zones[zoneid]; in compact_node()
2720 pg_data_t *pgdat = NODE_DATA(nid); in compaction_proactiveness_sysctl_handler() local
2722 if (pgdat->proactive_compact_trigger) in compaction_proactiveness_sysctl_handler()
2725 pgdat->proactive_compact_trigger = true; in compaction_proactiveness_sysctl_handler()
2726 wake_up_interruptible(&pgdat->kcompactd_wait); in compaction_proactiveness_sysctl_handler()
2775 static inline bool kcompactd_work_requested(pg_data_t *pgdat) in kcompactd_work_requested() argument
2777 return pgdat->kcompactd_max_order > 0 || kthread_should_stop() || in kcompactd_work_requested()
2778 pgdat->proactive_compact_trigger; in kcompactd_work_requested()
2781 static bool kcompactd_node_suitable(pg_data_t *pgdat) in kcompactd_node_suitable() argument
2785 enum zone_type highest_zoneidx = pgdat->kcompactd_highest_zoneidx; in kcompactd_node_suitable()
2788 zone = &pgdat->node_zones[zoneid]; in kcompactd_node_suitable()
2793 if (compaction_suitable(zone, pgdat->kcompactd_max_order, 0, in kcompactd_node_suitable()
2801 static void kcompactd_do_work(pg_data_t *pgdat) in kcompactd_do_work() argument
2810 .order = pgdat->kcompactd_max_order, in kcompactd_do_work()
2811 .search_order = pgdat->kcompactd_max_order, in kcompactd_do_work()
2812 .highest_zoneidx = pgdat->kcompactd_highest_zoneidx, in kcompactd_do_work()
2817 trace_mm_compaction_kcompactd_wake(pgdat->node_id, cc.order, in kcompactd_do_work()
2824 zone = &pgdat->node_zones[zoneid]; in kcompactd_do_work()
2873 if (pgdat->kcompactd_max_order <= cc.order) in kcompactd_do_work()
2874 pgdat->kcompactd_max_order = 0; in kcompactd_do_work()
2875 if (pgdat->kcompactd_highest_zoneidx >= cc.highest_zoneidx) in kcompactd_do_work()
2876 pgdat->kcompactd_highest_zoneidx = pgdat->nr_zones - 1; in kcompactd_do_work()
2879 void wakeup_kcompactd(pg_data_t *pgdat, int order, int highest_zoneidx) in wakeup_kcompactd() argument
2884 if (pgdat->kcompactd_max_order < order) in wakeup_kcompactd()
2885 pgdat->kcompactd_max_order = order; in wakeup_kcompactd()
2887 if (pgdat->kcompactd_highest_zoneidx > highest_zoneidx) in wakeup_kcompactd()
2888 pgdat->kcompactd_highest_zoneidx = highest_zoneidx; in wakeup_kcompactd()
2894 if (!wq_has_sleeper(&pgdat->kcompactd_wait)) in wakeup_kcompactd()
2897 if (!kcompactd_node_suitable(pgdat)) in wakeup_kcompactd()
2900 trace_mm_compaction_wakeup_kcompactd(pgdat->node_id, order, in wakeup_kcompactd()
2902 wake_up_interruptible(&pgdat->kcompactd_wait); in wakeup_kcompactd()
2911 pg_data_t *pgdat = (pg_data_t *)p; in kcompactd() local
2916 const struct cpumask *cpumask = cpumask_of_node(pgdat->node_id); in kcompactd()
2923 pgdat->kcompactd_max_order = 0; in kcompactd()
2924 pgdat->kcompactd_highest_zoneidx = pgdat->nr_zones - 1; in kcompactd()
2935 trace_mm_compaction_kcompactd_sleep(pgdat->node_id); in kcompactd()
2936 if (wait_event_freezable_timeout(pgdat->kcompactd_wait, in kcompactd()
2937 kcompactd_work_requested(pgdat), timeout) && in kcompactd()
2938 !pgdat->proactive_compact_trigger) { in kcompactd()
2941 kcompactd_do_work(pgdat); in kcompactd()
2959 if (should_proactive_compact_node(pgdat)) { in kcompactd()
2962 prev_score = fragmentation_score_node(pgdat); in kcompactd()
2963 proactive_compact_node(pgdat); in kcompactd()
2964 score = fragmentation_score_node(pgdat); in kcompactd()
2973 if (unlikely(pgdat->proactive_compact_trigger)) in kcompactd()
2974 pgdat->proactive_compact_trigger = false; in kcompactd()
2986 pg_data_t *pgdat = NODE_DATA(nid); in kcompactd_run() local
2989 if (pgdat->kcompactd) in kcompactd_run()
2992 pgdat->kcompactd = kthread_run(kcompactd, pgdat, "kcompactd%d", nid); in kcompactd_run()
2993 if (IS_ERR(pgdat->kcompactd)) { in kcompactd_run()
2995 ret = PTR_ERR(pgdat->kcompactd); in kcompactd_run()
2996 pgdat->kcompactd = NULL; in kcompactd_run()
3026 pg_data_t *pgdat = NODE_DATA(nid); in kcompactd_cpu_online() local
3029 mask = cpumask_of_node(pgdat->node_id); in kcompactd_cpu_online()
3033 set_cpus_allowed_ptr(pgdat->kcompactd, mask); in kcompactd_cpu_online()