Messages in this thread | | | Date | Wed, 02 Oct 2013 07:35:49 -0700 | From | Arjan van de Ven <> | Subject | Re: [PATCH 2/4] nohz: Synchronize sleep time stats with seqlock |
| |
On 10/2/2013 5:45 AM, Frederic Weisbecker wrote: > On Tue, Oct 01, 2013 at 06:59:57PM +0200, Peter Zijlstra wrote: >> On Tue, Oct 01, 2013 at 06:47:10PM +0200, Frederic Weisbecker wrote: >>> Yeah thinking more about it, the preempt disable was probably not >>> necessary. Now that's trading 2 atomics + 1 Lock/Unlock with 2 Lock/Unlock. >> >> It trades the current 2 atomics for 2 LOCK/UNLOCK. And on x86_64 that's >> 2 atomics. > > Do you mean 2 atomics for LOCK/UNLOCK? Or is that pair optimized somehow > in x86?
unlock is not actually an atomic.
and on some modern machines, neither is the lock, for the uncontended case ;-)
| |