Re: mutex_lock() slowpath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bahadir...
Would you agree it is pointless from an atomicity perspective, to
acquire the mutex lock by atomic_xchg() in __mutex_lock_common(),
since the mutex is locked by a spinlock earlier?
Not quite sure. Maybe it is done to anticipate architecture that freely reorder instructions (IIRC, Alpha for example). So to make sure your CPU does do the assignment and previous value checking BEFORE the if(), atomic operation all-at-one is by design a good choice

regards,

Mulyadi

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux