skip offline CPUs in show_free_areas
PATCH 1/1 skip offline CPUs in show_free_areas
Without this ouput on a box with 8cpus and NR_CPUS=64 looks rather strange.
Index: mm/page_alloc.c
===================================================================
RCS file: /home/cvs/linux/mm/page_alloc.c,v
retrieving revision 1.113
page_alloc.c +7 -1
@@ -972,7 +972,13 @@ void show_free_areas(void)printk ("\n" );for (cpu =0 ; cpu <NR_CPUS ; ++cpu) { -struct per_cpu_pageset *pageset = zone->pageset + cpu; +struct per_cpu_pageset *pageset; + +if (!cpu_online (cpu)) +continue ; + + pageset = zone->pageset + cpu; +for (temperature =0 ; temperature <2 ; temperature++) printk("cpu %d %s: low %d, high %d, batch %d\n", cpu,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Christoph Hellwig
Without this ouput on a box with 8cpus and NR_CPUS=64 looks rather strange.
You should probably just use for_each_online_cpu()
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 15 lines · Christoph Hellwig
Without this ouput on a box with 8cpus and NR_CPUS=64 looks rather
strange.Index:
mm/page_alloc.c
===================================================================
RCS file:/home/cvs/linux/mm/page_alloc.c,v
retrieving revision 1.113
diff -u -p -r1.113page_alloc.c
---mm/page_alloc.c10 Jan 2004 04:59:57 -0000 1.113
+++mm/page_alloc.c10 Feb 2004 13:17:43 -0000
@@ -972,7 +972,13 @@ voidshow_free_areas(void)
printk("\n");
Quoted 6 lines
for (cpu = 0; cpu <
NR_CPUS; ++cpu) {
- structper_cpu_pageset*pageset =zone->pageset+ cpu;
+ structper_cpu_pageset*pageset;
+
+ if (!cpu_online(cpu))
+ continue;
Thanks. I think I'll change that to cpu_possible(). Because there might still be pages there from the time when that cpu used to be online. Otherwise we wouldn't notice leaks due to cpu downing.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>