[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51113DF6.9040308@gmail.com>
Date: Wed, 06 Feb 2013 01:14:30 +0800
From: Zhang Yanfei <zhangyanfei.yes@...il.com>
To: akpm@...ux-foundation.org, Linux MM <linux-mm@...ck.org>,
mgorman@...e.de, minchan@...nel.org,
kamezawa.hiroyu@...fujitsu.com, m.szyprowski@...sung.com
CC: linux-kernel@...r.kernel.org, zhangyanfei@...fujitsu.com
Subject: [PATCH 3/3] mm: rename nr_free_pagecache_pages to nr_free_pagecache_high_pages
From: Zhang Yanfei <zhangyanfei@...fujitsu.com>
This function actually counts RAM pages that are above high watermark within
all zones, so rename it to a reasonable name.
Signed-off-by: Zhang Yanfei <zhangyanfei@...fujitsu.com>
---
include/linux/swap.h | 2 +-
mm/memory_hotplug.c | 4 ++--
mm/page_alloc.c | 7 ++++---
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 0df8905..9a8ab19 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -217,7 +217,7 @@ extern unsigned long totalram_pages;
extern unsigned long totalreserve_pages;
extern unsigned long dirty_balance_reserve;
extern unsigned int nr_free_buffer_high_pages(void);
-extern unsigned int nr_free_pagecache_pages(void);
+extern unsigned int nr_free_pagecache_high_pages(void);
/* Definition of global_page_state not available yet */
#define nr_free_pages() global_page_state(NR_FREE_PAGES)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index d04ed87..6e482c7 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -777,7 +777,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
if (onlined_pages)
kswapd_run(zone_to_nid(zone));
- vm_total_pages = nr_free_pagecache_pages();
+ vm_total_pages = nr_free_pagecache_high_pages();
writeback_set_ratelimit();
@@ -1356,7 +1356,7 @@ repeat:
if (arg.status_change_nid >= 0)
kswapd_stop(node);
- vm_total_pages = nr_free_pagecache_pages();
+ vm_total_pages = nr_free_pagecache_high_pages();
writeback_set_ratelimit();
memory_notify(MEM_OFFLINE, &arg);
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a021d91..6e0d91a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2816,9 +2816,10 @@ unsigned int nr_free_buffer_high_pages(void)
EXPORT_SYMBOL_GPL(nr_free_buffer_high_pages);
/*
- * Amount of free RAM allocatable within all zones
+ * Amount of free RAM allocatable that is above high watermark
+ * within all zones
*/
-unsigned int nr_free_pagecache_pages(void)
+unsigned int nr_free_pagecache_high_pages(void)
{
return nr_free_zone_high_pages(gfp_zone(GFP_HIGHUSER_MOVABLE));
}
@@ -3649,7 +3650,7 @@ void __ref build_all_zonelists(pg_data_t *pgdat, struct zone *zone)
stop_machine(__build_all_zonelists, pgdat, NULL);
/* cpuset refresh routine should be here */
}
- vm_total_pages = nr_free_pagecache_pages();
+ vm_total_pages = nr_free_pagecache_high_pages();
/*
* Disable grouping by mobility if the number of pages in the
* system is too low to allow the mechanism to work. It would be
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists