From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: akpm@linux-foundation.org, Linux MM <linux-mm@kvack.org>,
mgorman@suse.de, minchan@kernel.org,
kamezawa.hiroyu@jp.fujitsu.com, m.szyprowski@samsung.com
Cc: linux-kernel@vger.kernel.org, zhangyanfei@cn.fujitsu.com
Subject: [PATCH 3/3] mm: rename nr_free_pagecache_pages to nr_free_pagecache_high_pages
Date: Wed, 06 Feb 2013 01:14:30 +0800 [thread overview]
Message-ID: <51113DF6.9040308@gmail.com> (raw)
In-Reply-To: <51113CE3.5090000@gmail.com>
From: Zhang Yanfei <zhangyanfei@cn.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@cn.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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: akpm@linux-foundation.org, Linux MM <linux-mm@kvack.org>,
mgorman@suse.de, minchan@kernel.org,
kamezawa.hiroyu@jp.fujitsu.com, m.szyprowski@samsung.com
Cc: linux-kernel@vger.kernel.org, zhangyanfei@cn.fujitsu.com
Subject: [PATCH 3/3] mm: rename nr_free_pagecache_pages to nr_free_pagecache_high_pages
Date: Wed, 06 Feb 2013 01:14:30 +0800 [thread overview]
Message-ID: <51113DF6.9040308@gmail.com> (raw)
In-Reply-To: <51113CE3.5090000@gmail.com>
From: Zhang Yanfei <zhangyanfei@cn.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@cn.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
next prev parent reply other threads:[~2013-02-05 17:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 17:09 [PATCH 0/3] mm: rename confusing function names Zhang Yanfei
2013-02-05 17:09 ` Zhang Yanfei
2013-02-05 17:11 ` [PATCH 1/3] mm: rename nr_free_zone_pages to nr_free_zone_high_pages Zhang Yanfei
2013-02-05 17:11 ` Zhang Yanfei
2013-02-05 17:13 ` [PATCH 2/3] mm: rename nr_free_buffer_pages to nr_free_buffer_high_pages Zhang Yanfei
2013-02-05 17:13 ` Zhang Yanfei
2013-02-05 17:14 ` Zhang Yanfei [this message]
2013-02-05 17:14 ` [PATCH 3/3] mm: rename nr_free_pagecache_pages to nr_free_pagecache_high_pages Zhang Yanfei
2013-02-05 19:26 ` [PATCH 0/3] mm: rename confusing function names Johannes Weiner
2013-02-05 19:26 ` Johannes Weiner
2013-02-05 22:13 ` Andrew Morton
2013-02-05 22:13 ` Andrew Morton
2013-02-06 1:06 ` Zhang Yanfei
2013-02-06 1:06 ` Zhang Yanfei
2013-02-06 1:20 ` Andrew Morton
2013-02-06 1:20 ` Andrew Morton
2013-02-06 1:34 ` Zhang Yanfei
2013-02-06 1:34 ` Zhang Yanfei
2013-02-06 1:58 ` Andrew Morton
2013-02-06 1:58 ` Andrew Morton
2013-02-08 13:34 ` Robin Holt
2013-02-08 13:34 ` Robin Holt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51113DF6.9040308@gmail.com \
--to=zhangyanfei.yes@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=zhangyanfei@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.