Re: [PATCH 3/3] events: Ensure that timers are updated without requiring read() call

Peter Zijlstra
2011-06-24T09:47:14Z

On Fri, 2011-06-24 at 11:44 +0200, Peter Zijlstra wrote:
> > + calc_timer_values(event,
> > + &event->total_time_enabled,
> > + &event->total_time_running);
>
> I'm not sure writing those from NMI context is a sane thing to do, best
> is to compute the values into a local variable and use that variable
> below.

To clarify, on 32bit architectures the NMI might come in the middle of
writing the two words of one of those, writing them again from the NMI
handler will result in overlapping writes, which might lead to some
weird end-results.