[PATCH 2/3] powerpc: Instrument Hypervisor Calls: add wrappers
Nathan Lynch
ntl at pobox.com
Thu Jun 15 08:40:40 EST 2006
Paul Mackerras wrote:
> Nathan Lynch writes:
>
> > Without disabling preemption around the mfspr ... update_stats section
> > in these hcall wrappers, you risk updating the stats on the wrong cpu.
>
> I think we are only looking for total counts and times anyway, so it
> doesn't really matter which cpu updates the stats, as long as the time
> gets accounted on some cpu. The use of per-cpu counters is just for
> better cache behaviour.
Makes sense... then perhaps the stats shouldn't be exported in per-cpu
files in sysfs, and the kernel should calculate and report the totals
to userspace in some other form.
More information about the Linuxppc-dev
mailing list