Merging lock elision into glibc
Merging lock elision into glibc
Posted Jul 6, 2013 0:36 UTC (Sat) by wahern (subscriber, #37304)Parent article: Merging lock elision into glibc
FWIW, an interesting comment in the Austin Group Defect Tracker thread (thanks to mjw, above, for the link):
Side note: in OpenBSD, PTHREAD_MUTEX_DEFAULT mutexes call abort() if you pthread_mutex_lock() a mutex you already hold or pthread_mutex_unlock() a mutex you don't hold...and that has turned up several locking bugs in open source projects like glib2, where code *simply failed to grab the right lock* and no one noticed because the default mutexes on Linux returned an ignorable error. The assumption that most code has been debugged completely and that therefore the default behavior should be to turn off the checks and run as fast as possible is a bad joke.
Posted Jul 8, 2013 23:42 UTC (Mon)
by ibukanov (subscriber, #3942)
[Link]
With assertions disabled one gains in performance. However that win is limited, like 10%. Yet potential losses, like the value of important data that were silently corrupt, could be very high. So despite very small probability of that the total probabilistic cost of those gains can be very negative.
Merging lock elision into glibc