提交 38cbcdc0 编写于 作者: J Jan Blunck 提交者: Linus Torvalds

[PATCH] fix vmstat per cpu usage

The per cpu variables are used incorrectly in vmstat.h.
Signed-off-by: NJan Blunck <jblunck@suse.de>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Acked-by: NSteve Fox <drfickle@us.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9f59ce5d
......@@ -41,23 +41,23 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
static inline void __count_vm_event(enum vm_event_item item)
{
__get_cpu_var(vm_event_states.event[item])++;
__get_cpu_var(vm_event_states).event[item]++;
}
static inline void count_vm_event(enum vm_event_item item)
{
get_cpu_var(vm_event_states.event[item])++;
get_cpu_var(vm_event_states).event[item]++;
put_cpu();
}
static inline void __count_vm_events(enum vm_event_item item, long delta)
{
__get_cpu_var(vm_event_states.event[item]) += delta;
__get_cpu_var(vm_event_states).event[item] += delta;
}
static inline void count_vm_events(enum vm_event_item item, long delta)
{
get_cpu_var(vm_event_states.event[item]) += delta;
get_cpu_var(vm_event_states).event[item] += delta;
put_cpu();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册