Re: [PATCH v3 4/4] sched_clock: Avoid deadlock during read from NMI

2015-02-04 Thread Stephen Boyd
On 02/04, Steven Rostedt wrote: > On Wed, 4 Feb 2015 17:23:51 -0800 > Stephen Boyd wrote: > > > On 01/30, Daniel Thompson wrote: > > > @@ -98,26 +98,50 @@ unsigned long long notrace sched_clock(void) > > > } > > > > > > /* > > > + * Updating the data required to read the clock. > > > + * > >

Re: [PATCH v3 4/4] sched_clock: Avoid deadlock during read from NMI

2015-02-04 Thread Steven Rostedt
On Wed, 4 Feb 2015 17:23:51 -0800 Stephen Boyd wrote: > On 01/30, Daniel Thompson wrote: > > @@ -98,26 +98,50 @@ unsigned long long notrace sched_clock(void) > > } > > > > /* > > + * Updating the data required to read the clock. > > + * > > + * sched_clock will never observe mis-matched data

Re: [PATCH v3 4/4] sched_clock: Avoid deadlock during read from NMI

2015-02-04 Thread Stephen Boyd
On 01/30, Daniel Thompson wrote: > @@ -98,26 +98,50 @@ unsigned long long notrace sched_clock(void) > } > > /* > + * Updating the data required to read the clock. > + * > + * sched_clock will never observe mis-matched data even if called from > + * an NMI. We do this by maintaining an odd/even

[PATCH v3 4/4] sched_clock: Avoid deadlock during read from NMI

2015-01-30 Thread Daniel Thompson
Currently it is possible for an NMI (or FIQ on ARM) to come in and read sched_clock() whilst update_sched_clock() has locked the seqcount for writing. This results in the NMI handler locking up when it calls raw_read_seqcount_begin(). This patch fixes the NMI safety issues by providing banked cloc