[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1308908781.27849.23.camel@twins>
Date: Fri, 24 Jun 2011 11:46:21 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Eric B Munson <emunson@...bm.net>
Cc: mingo@...e.hu, borislav.petkov@....com, bblum@...rew.cmu.edu,
linux-kernel@...r.kernel.org, mhack@...ibm.com, eranian@...gle.com
Subject: Re: [PATCH 3/3] events: Ensure that timers are updated without
requiring read() call
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists