mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	x86 maintainers <x86@kernel.org>
Cc: Jiang Liu <jiang.liu@huawei.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Yinghai Lu <yinghai@kernel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lai Jiangshan <laijs@cn.fujitsu.com>
Subject: [V4 PATCH 08/26] memcontrol: use N_MEMORY instead N_HIGH_MEMORY
Date: Mon, 10 Sep 2012 16:59:00 +0800	[thread overview]
Message-ID: <1347267558-6707-9-git-send-email-laijs@cn.fujitsu.com> (raw)
In-Reply-To: <1347267558-6707-1-git-send-email-laijs@cn.fujitsu.com>

N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.

The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
 mm/memcontrol.c  |   18 +++++++++---------
 mm/page_cgroup.c |    2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 795e525..0d42f53 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -801,7 +801,7 @@ static unsigned long mem_cgroup_nr_lru_pages(struct mem_cgroup *memcg,
 	int nid;
 	u64 total = 0;
 
-	for_each_node_state(nid, N_HIGH_MEMORY)
+	for_each_node_state(nid, N_MEMORY)
 		total += mem_cgroup_node_nr_lru_pages(memcg, nid, lru_mask);
 	return total;
 }
@@ -1617,9 +1617,9 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
 		return;
 
 	/* make a nodemask where this memcg uses memory from */
-	memcg->scan_nodes = node_states[N_HIGH_MEMORY];
+	memcg->scan_nodes = node_states[N_MEMORY];
 
-	for_each_node_mask(nid, node_states[N_HIGH_MEMORY]) {
+	for_each_node_mask(nid, node_states[N_MEMORY]) {
 
 		if (!test_mem_cgroup_node_reclaimable(memcg, nid, false))
 			node_clear(nid, memcg->scan_nodes);
@@ -1690,7 +1690,7 @@ static bool mem_cgroup_reclaimable(struct mem_cgroup *memcg, bool noswap)
 	/*
 	 * Check rest of nodes.
 	 */
-	for_each_node_state(nid, N_HIGH_MEMORY) {
+	for_each_node_state(nid, N_MEMORY) {
 		if (node_isset(nid, memcg->scan_nodes))
 			continue;
 		if (test_mem_cgroup_node_reclaimable(memcg, nid, noswap))
@@ -3765,7 +3765,7 @@ move_account:
 		drain_all_stock_sync(memcg);
 		ret = 0;
 		mem_cgroup_start_move(memcg);
-		for_each_node_state(node, N_HIGH_MEMORY) {
+		for_each_node_state(node, N_MEMORY) {
 			for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
 				enum lru_list lru;
 				for_each_lru(lru) {
@@ -4093,7 +4093,7 @@ static int memcg_numa_stat_show(struct cgroup *cont, struct cftype *cft,
 
 	total_nr = mem_cgroup_nr_lru_pages(memcg, LRU_ALL);
 	seq_printf(m, "total=%lu", total_nr);
-	for_each_node_state(nid, N_HIGH_MEMORY) {
+	for_each_node_state(nid, N_MEMORY) {
 		node_nr = mem_cgroup_node_nr_lru_pages(memcg, nid, LRU_ALL);
 		seq_printf(m, " N%d=%lu", nid, node_nr);
 	}
@@ -4101,7 +4101,7 @@ static int memcg_numa_stat_show(struct cgroup *cont, struct cftype *cft,
 
 	file_nr = mem_cgroup_nr_lru_pages(memcg, LRU_ALL_FILE);
 	seq_printf(m, "file=%lu", file_nr);
-	for_each_node_state(nid, N_HIGH_MEMORY) {
+	for_each_node_state(nid, N_MEMORY) {
 		node_nr = mem_cgroup_node_nr_lru_pages(memcg, nid,
 				LRU_ALL_FILE);
 		seq_printf(m, " N%d=%lu", nid, node_nr);
@@ -4110,7 +4110,7 @@ static int memcg_numa_stat_show(struct cgroup *cont, struct cftype *cft,
 
 	anon_nr = mem_cgroup_nr_lru_pages(memcg, LRU_ALL_ANON);
 	seq_printf(m, "anon=%lu", anon_nr);
-	for_each_node_state(nid, N_HIGH_MEMORY) {
+	for_each_node_state(nid, N_MEMORY) {
 		node_nr = mem_cgroup_node_nr_lru_pages(memcg, nid,
 				LRU_ALL_ANON);
 		seq_printf(m, " N%d=%lu", nid, node_nr);
@@ -4119,7 +4119,7 @@ static int memcg_numa_stat_show(struct cgroup *cont, struct cftype *cft,
 
 	unevictable_nr = mem_cgroup_nr_lru_pages(memcg, BIT(LRU_UNEVICTABLE));
 	seq_printf(m, "unevictable=%lu", unevictable_nr);
-	for_each_node_state(nid, N_HIGH_MEMORY) {
+	for_each_node_state(nid, N_MEMORY) {
 		node_nr = mem_cgroup_node_nr_lru_pages(memcg, nid,
 				BIT(LRU_UNEVICTABLE));
 		seq_printf(m, " N%d=%lu", nid, node_nr);
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 5ddad0c..c1054ad 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -271,7 +271,7 @@ void __init page_cgroup_init(void)
 	if (mem_cgroup_disabled())
 		return;
 
-	for_each_node_state(nid, N_HIGH_MEMORY) {
+	for_each_node_state(nid, N_MEMORY) {
 		unsigned long start_pfn, end_pfn;
 
 		start_pfn = node_start_pfn(nid);
-- 
1.7.1


  parent reply	other threads:[~2012-09-10  8:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10  8:58 [V4 PATCH 00/26] memory,numa: introduce MOVABLE-dedicated node and online_movable for hotplug Lai Jiangshan
2012-09-10  8:58 ` [V4 PATCH 01/26] page_alloc.c: don't subtract unrelated memmap from zone's present pages Lai Jiangshan
2012-09-10  8:58 ` [V4 PATCH 02/26] memory_hotplug: fix missing nodemask management Lai Jiangshan
2012-09-11  2:55   ` Wen Congyang
2012-09-10  8:58 ` [V4 PATCH 03/26] slub, hotplug: ignore unrelated node's hot-adding and hot-removing Lai Jiangshan
2012-09-10  8:58 ` [V4 PATCH 04/26] node: cleanup node_state_attr Lai Jiangshan
2012-09-10  8:58 ` [V4 PATCH 05/26] node_states: introduce N_MEMORY Lai Jiangshan
2012-09-10  8:58 ` [V4 PATCH 06/26] cpuset: use N_MEMORY instead N_HIGH_MEMORY Lai Jiangshan
2012-09-10  8:58 ` [V4 PATCH 07/26] procfs: " Lai Jiangshan
2012-09-10  8:59 ` Lai Jiangshan [this message]
2012-09-10  8:59 ` [V4 PATCH 09/26] oom: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 10/26] mm,migrate: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 11/26] mempolicy: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 12/26] hugetlb: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 13/26] vmstat: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 14/26] kthread: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 15/26] init: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 16/26] vmscan: " Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 17/26] page_alloc: use N_MEMORY instead N_HIGH_MEMORY change the node_states initialization Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 18/26] hotplug: update nodemasks management Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 19/26] numa: add CONFIG_MOVABLE_NODE for movable-dedicated node Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 20/26] page_alloc: add kernelcore_max_addr Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 21/26] x86: get pg_data_t's memory from other node Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 22/26] x86: use memblock_set_current_limit() to set memblock.current_limit Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 23/26] memblock: limit memory address from memblock Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 24/26] memblock: compare current_limit with end variable at memblock_find_in_range_node() Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 25/26] mm, memory-hotplug: add online_movable and online_kernel Lai Jiangshan
2012-09-10  8:59 ` [V4 PATCH 26/26] memory_hotplug: handle empty zone when online_movable/online_kernel Lai Jiangshan
2012-09-11  0:40 ` [V4 PATCH 00/26] memory,numa: introduce MOVABLE-dedicated node and online_movable for hotplug Yasuaki Ishimatsu
2012-09-11  1:22   ` Lai Jiangshan
2012-09-11  1:37     ` Yasuaki Ishimatsu
2012-09-11  3:09       ` Lai Jiangshan
2012-09-11  9:44   ` [V4 PATCH 27/27] memory,hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock() Lai Jiangshan
2012-09-11 10:18     ` Yasuaki Ishimatsu
2012-09-12  1:38       ` Lai Jiangshan

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=1347267558-6707-9-git-send-email-laijs@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=jiang.liu@huawei.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=rientjes@google.com \
    --cc=rusty@rustcorp.com.au \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®