Commit 4ff1b2c2 authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Linus Torvalds

procfs: use N_MEMORY instead N_HIGH_MEMORY

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: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: default avatarHillf Danton <dhillf@gmail.com>
Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Lin Feng <linfeng@cn.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 38d7bee9
...@@ -249,7 +249,7 @@ static int kcore_update_ram(void) ...@@ -249,7 +249,7 @@ static int kcore_update_ram(void)
/* Not inialized....update now */ /* Not inialized....update now */
/* find out "max pfn" */ /* find out "max pfn" */
end_pfn = 0; end_pfn = 0;
for_each_node_state(nid, N_HIGH_MEMORY) { for_each_node_state(nid, N_MEMORY) {
unsigned long node_end; unsigned long node_end;
node_end = NODE_DATA(nid)->node_start_pfn + node_end = NODE_DATA(nid)->node_start_pfn +
NODE_DATA(nid)->node_spanned_pages; NODE_DATA(nid)->node_spanned_pages;
......
...@@ -1126,7 +1126,7 @@ static struct page *can_gather_numa_stats(pte_t pte, struct vm_area_struct *vma, ...@@ -1126,7 +1126,7 @@ static struct page *can_gather_numa_stats(pte_t pte, struct vm_area_struct *vma,
return NULL; return NULL;
nid = page_to_nid(page); nid = page_to_nid(page);
if (!node_isset(nid, node_states[N_HIGH_MEMORY])) if (!node_isset(nid, node_states[N_MEMORY]))
return NULL; return NULL;
return page; return page;
...@@ -1279,7 +1279,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) ...@@ -1279,7 +1279,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
if (md->writeback) if (md->writeback)
seq_printf(m, " writeback=%lu", md->writeback); seq_printf(m, " writeback=%lu", md->writeback);
for_each_node_state(n, N_HIGH_MEMORY) for_each_node_state(n, N_MEMORY)
if (md->node[n]) if (md->node[n])
seq_printf(m, " N%d=%lu", n, md->node[n]); seq_printf(m, " N%d=%lu", n, md->node[n]);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment