Commit 84c2008a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] revert "mm: page_state fixes"

Hugh says:

page_alloc_cpu_notify() specifically contains code to

 		/* Add dead cpu's page_states to our own. */

which handles this more efficiently.

Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9f5336e2
...@@ -1204,6 +1204,7 @@ static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask) ...@@ -1204,6 +1204,7 @@ static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
int cpu = 0; int cpu = 0;
memset(ret, 0, sizeof(*ret)); memset(ret, 0, sizeof(*ret));
cpus_and(*cpumask, *cpumask, cpu_online_map);
cpu = first_cpu(*cpumask); cpu = first_cpu(*cpumask);
while (cpu < NR_CPUS) { while (cpu < NR_CPUS) {
...@@ -1256,7 +1257,7 @@ unsigned long read_page_state_offset(unsigned long offset) ...@@ -1256,7 +1257,7 @@ unsigned long read_page_state_offset(unsigned long offset)
unsigned long ret = 0; unsigned long ret = 0;
int cpu; int cpu;
for_each_cpu(cpu) { for_each_online_cpu(cpu) {
unsigned long in; unsigned long in;
in = (unsigned long)&per_cpu(page_states, cpu) + offset; in = (unsigned long)&per_cpu(page_states, cpu) + offset;
......
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