Re: [PATCH v4 02/17] sched_clock: Use seqcount instead of rolling our own

2013-07-19 Thread Russell King - ARM Linux
On Fri, Jul 19, 2013 at 10:20:19AM -0400, Nicolas Pitre wrote: > On Fri, 19 Jul 2013, Will Deacon wrote: > > > Looks good to me. The current scheme would be very fiddly to extend to > > 64-bit values on 32-bit architectures without cheap atomic doubleword > > accesses. > > You should have a look

Re: [PATCH v4 02/17] sched_clock: Use seqcount instead of rolling our own

2013-07-19 Thread Nicolas Pitre
On Fri, 19 Jul 2013, Will Deacon wrote: > Looks good to me. The current scheme would be very fiddly to extend to > 64-bit values on 32-bit architectures without cheap atomic doubleword > accesses. You should have a look at include/linux/cnt32_to_63.h. This could be applied to pure software counte

Re: [PATCH v4 02/17] sched_clock: Use seqcount instead of rolling our own

2013-07-19 Thread Will Deacon
On Fri, Jul 19, 2013 at 12:21:15AM +0100, Stephen Boyd wrote: > We're going to increase the cyc value to 64 bits in the near > future. Doing that is going to break the custom seqcount > implementation in the sched_clock code because 64 bit numbers > aren't guaranteed to be atomic. Replace the cyc_c

[PATCH v4 02/17] sched_clock: Use seqcount instead of rolling our own

2013-07-18 Thread Stephen Boyd
We're going to increase the cyc value to 64 bits in the near future. Doing that is going to break the custom seqcount implementation in the sched_clock code because 64 bit numbers aren't guaranteed to be atomic. Replace the cyc_copy with a seqcount to avoid this problem. Cc: Russell King Signed-o