Re: [PATCH] fix vmstat per cpu usage
From: Jan Blunck
Date: Wed Aug 02 2006 - 04:59:14 EST
On Tue, Aug 01, Andrew Morton wrote:
> >
> > 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]++;
> > }
>
> How odd. Are there any negative consequences to the existing code?
In asm-s390/percpu.h we use
#define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)
and for modules on s390x __reloc_hide() is defined as
#define __reloc_hide(var,offset) \
(*({ unsigned long *__ptr; \
asm ( "larl %0,per_cpu__"#var"@GOTENT" \
: "=a" (__ptr) : "X" (per_cpu__##var) ); \
(typeof(&per_cpu__##var))((*__ptr) + (offset)); }))
which leads in this case to
larl %0, per_cpu__vm_event_states.event[item]@GOTENT
which is invalid asm.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/