aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9d5498e2d0f5..b1447522d346 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2473,10 +2473,10 @@ void si_meminfo_node(struct sysinfo *val, int nid)
2473#endif 2473#endif
2474 2474
2475/* 2475/*
2476 * Determine whether the zone's node should be displayed or not, depending on 2476 * Determine whether the node should be displayed or not, depending on whether
2477 * whether SHOW_MEM_FILTER_NODES was passed to __show_free_areas(). 2477 * SHOW_MEM_FILTER_NODES was passed to show_free_areas().
2478 */ 2478 */
2479static bool skip_free_areas_zone(unsigned int flags, const struct zone *zone) 2479bool skip_free_areas_node(unsigned int flags, int nid)
2480{ 2480{
2481 bool ret = false; 2481 bool ret = false;
2482 2482
@@ -2484,8 +2484,7 @@ static bool skip_free_areas_zone(unsigned int flags, const struct zone *zone)
2484 goto out; 2484 goto out;
2485 2485
2486 get_mems_allowed(); 2486 get_mems_allowed();
2487 ret = !node_isset(zone->zone_pgdat->node_id, 2487 ret = !node_isset(nid, cpuset_current_mems_allowed);
2488 cpuset_current_mems_allowed);
2489 put_mems_allowed(); 2488 put_mems_allowed();
2490out: 2489out:
2491 return ret; 2490 return ret;
@@ -2500,13 +2499,13 @@ out:
2500 * Suppresses nodes that are not allowed by current's cpuset if 2499 * Suppresses nodes that are not allowed by current's cpuset if
2501 * SHOW_MEM_FILTER_NODES is passed. 2500 * SHOW_MEM_FILTER_NODES is passed.
2502 */ 2501 */
2503void __show_free_areas(unsigned int filter) 2502void show_free_areas(unsigned int filter)
2504{ 2503{
2505 int cpu; 2504 int cpu;
2506 struct zone *zone; 2505 struct zone *zone;
2507 2506
2508 for_each_populated_zone(zone) { 2507 for_each_populated_zone(zone) {
2509 if (skip_free_areas_zone(filter, zone)) 2508 if (skip_free_areas_node(filter, zone_to_nid(zone)))
2510 continue; 2509 continue;
2511 show_node(zone); 2510 show_node(zone);
2512 printk("%s per-cpu:\n", zone->name); 2511 printk("%s per-cpu:\n", zone->name);
@@ -2549,7 +2548,7 @@ void __show_free_areas(unsigned int filter)
2549 for_each_populated_zone(zone) { 2548 for_each_populated_zone(zone) {
2550 int i; 2549 int i;
2551 2550
2552 if (skip_free_areas_zone(filter, zone)) 2551 if (skip_free_areas_node(filter, zone_to_nid(zone)))
2553 continue; 2552 continue;
2554 show_node(zone); 2553 show_node(zone);
2555 printk("%s" 2554 printk("%s"
@@ -2618,7 +2617,7 @@ void __show_free_areas(unsigned int filter)
2618 for_each_populated_zone(zone) { 2617 for_each_populated_zone(zone) {
2619 unsigned long nr[MAX_ORDER], flags, order, total = 0; 2618 unsigned long nr[MAX_ORDER], flags, order, total = 0;
2620 2619
2621 if (skip_free_areas_zone(filter, zone)) 2620 if (skip_free_areas_node(filter, zone_to_nid(zone)))
2622 continue; 2621 continue;
2623 show_node(zone); 2622 show_node(zone);
2624 printk("%s: ", zone->name); 2623 printk("%s: ", zone->name);
@@ -2639,11 +2638,6 @@ void __show_free_areas(unsigned int filter)
2639 show_swap_cache_info(); 2638 show_swap_cache_info();
2640} 2639}
2641 2640
2642void show_free_areas(void)
2643{
2644 __show_free_areas(0);
2645}
2646
2647static void zoneref_set_zone(struct zone *zone, struct zoneref *zoneref) 2641static void zoneref_set_zone(struct zone *zone, struct zoneref *zoneref)
2648{ 2642{
2649 zoneref->zone = zone; 2643 zoneref->zone = zone;