From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Mel Gorman <mel@csn.ul.ie>, linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>,
Balbir Singh <bsingharora@gmail.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Tejun Heo <tj@kernel.org>, Li Zefan <lizefan@huawei.com>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
containers@lists.linux-foundation.org
Subject: [RFC PATCH 07/23 V2] memcontrol: use N_MEMORY instead N_HIGH_MEMORY
Date: Thu, 2 Aug 2012 14:01:12 +0800 [thread overview]
Message-ID: <1343887288-8866-8-git-send-email-laijs@cn.fujitsu.com> (raw)
In-Reply-To: <1343887288-8866-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 f72b5e5..4402c2e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -797,7 +797,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;
}
@@ -1549,9 +1549,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);
@@ -1622,7 +1622,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))
@@ -3700,7 +3700,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) {
@@ -4025,7 +4025,7 @@ static int mem_control_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);
}
@@ -4033,7 +4033,7 @@ static int mem_control_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);
@@ -4042,7 +4042,7 @@ static int mem_control_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);
@@ -4051,7 +4051,7 @@ static int mem_control_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 eb750f8..e775239 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
--
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>
next prev parent reply other threads:[~2012-08-02 6:01 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1343887288-8866-1-git-send-email-laijs@cn.fujitsu.com>
2012-08-02 6:01 ` [RFC PATCH 04/23 V2] oom: use N_MEMORY instead N_HIGH_MEMORY Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 05/23 V2] mm,migrate: " Lai Jiangshan
2012-08-02 16:09 ` Christoph Lameter
2012-08-02 6:01 ` [RFC PATCH 06/23 V2] mempolicy: " Lai Jiangshan
2012-08-02 6:01 ` Lai Jiangshan [this message]
2012-08-02 6:01 ` [RFC PATCH 08/23 V2] hugetlb: " Lai Jiangshan
2012-08-04 14:02 ` Hillf Danton
2012-08-02 6:01 ` [RFC PATCH 09/23 V2] vmstat: " Lai Jiangshan
2012-08-02 16:09 ` Christoph Lameter
2012-08-02 6:01 ` [RFC PATCH 12/23 V2] vmscan: " Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 13/23 V2] page_alloc: use N_MEMORY instead N_HIGH_MEMORY change the node_states initialization Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 14/23 V2] slub, hotplug: ignore unrelated node's hot-adding and hot-removing Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 15/23 V2] memory_hotplug: fix missing nodemask management Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 16/23 V2] numa: add CONFIG_MOVABLE_NODE for movable-dedicated node Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 17/23 V2] page_alloc.c: don't subtract unrelated memmap from zone's present pages Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 18/23 V2] page_alloc: add kernelcore_max_addr Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 21/23 V2] memblock: limit memory address from memblock Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 22/23 V2] memblock: compare current_limit with end variable at memblock_find_in_range_node() Lai Jiangshan
2012-08-02 6:01 ` [RFC PATCH 23/23 V2] mm, memory-hotplug: add online_movable Lai Jiangshan
[not found] ` <1344244999-5081-1-git-send-email-laijs@cn.fujitsu.com>
2012-08-06 9:22 ` [RFC V3 PATCH 01/25] page_alloc.c: don't subtract unrelated memmap from zone's present pages Lai Jiangshan
2012-08-06 9:22 ` [RFC V3 PATCH 02/25] memory_hotplug: fix missing nodemask management Lai Jiangshan
2012-08-06 9:22 ` [RFC V3 PATCH 03/25] slub, hotplug: ignore unrelated node's hot-adding and hot-removing Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 08/25] memcontrol: use N_MEMORY instead N_HIGH_MEMORY Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 09/25] oom: " Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 10/25] mm,migrate: " Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 11/25] mempolicy: " Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 12/25] hugetlb: " Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 13/25] vmstat: " Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 16/25] vmscan: " Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 17/25] page_alloc: use N_MEMORY instead N_HIGH_MEMORY change the node_states initialization Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 18/25] hotplug: update nodemasks management Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 19/25] numa: add CONFIG_MOVABLE_NODE for movable-dedicated node Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 20/25] page_alloc: add kernelcore_max_addr Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 23/25] memblock: limit memory address from memblock Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 24/25] memblock: compare current_limit with end variable at memblock_find_in_range_node() Lai Jiangshan
2012-08-06 9:23 ` [RFC V3 PATCH 25/25] mm, memory-hotplug: add online_movable and online_kernel Lai Jiangshan
2012-08-02 2:52 [RFC PATCH 00/23 V2] memory, numa: introduce MOVABLE-dedicated node and online_movable for hotplug Lai Jiangshan
[not found] ` <1343875991-7533-1-git-send-email-laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-08-02 2:52 ` [RFC PATCH 07/23 V2] memcontrol: use N_MEMORY instead N_HIGH_MEMORY 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=1343887288-8866-8-git-send-email-laijs@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
--cc=mel@csn.ul.ie \
--cc=mhocko@suse.cz \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).