* make vmstat cpu-unplug safe
@ 2008-05-06 7:02 KOSAKI Motohiro
2008-05-06 17:48 ` Christoph Lameter
0 siblings, 1 reply; 2+ messages in thread
From: KOSAKI Motohiro @ 2008-05-06 7:02 UTC (permalink / raw)
To: LKML, linux-mm, Andrew Morton, Christoph Lameter; +Cc: kosaki.motohiro
btw: I think all_vm_event() author is Cristoph Lameter, right?
--------------------------------------------
When access cpu_online_map, We should prevent that dynamically
change cpu_online_map by get_online_cpus().
Unfortunately, all_vm_events() doesn't it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Christoph Lameter <clameter@sgi.com>
---
mm/vmstat.c | 2 ++
1 file changed, 2 insertions(+)
Index: b/mm/vmstat.c
===================================================================
--- a/mm/vmstat.c 2008-05-04 23:00:52.000000000 +0900
+++ b/mm/vmstat.c 2008-05-06 16:13:32.000000000 +0900
@@ -42,7 +42,9 @@ static void sum_vm_events(unsigned long
*/
void all_vm_events(unsigned long *ret)
{
+ get_online_cpus();
sum_vm_events(ret, &cpu_online_map);
+ put_online_cpus();
}
EXPORT_SYMBOL_GPL(all_vm_events);
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: make vmstat cpu-unplug safe
2008-05-06 7:02 make vmstat cpu-unplug safe KOSAKI Motohiro
@ 2008-05-06 17:48 ` Christoph Lameter
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lameter @ 2008-05-06 17:48 UTC (permalink / raw)
To: KOSAKI Motohiro; +Cc: LKML, linux-mm, Andrew Morton
On Tue, 6 May 2008, KOSAKI Motohiro wrote:
> btw: I think all_vm_event() author is Cristoph Lameter, right?
Welll I am the last one who reworked it from earlier incarnations.
> When access cpu_online_map, We should prevent that dynamically
> change cpu_online_map by get_online_cpus().
>
> Unfortunately, all_vm_events() doesn't it.
Acked-by: Christoph Lameter <clameter@sgi.com>
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-06 17:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-06 7:02 make vmstat cpu-unplug safe KOSAKI Motohiro
2008-05-06 17:48 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox