Comment 32 for bug 1657256

Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Hello Sponsors,

Attached you can find a debdiff for the artful series which fixes the issue expressed
on this bug for powerpc architecture.

The patch cover multiple commits from upstream MariaDB,

* Commit 6ea41f1e84eb6b864cac17ad0b862bde9820dc33: Implements
the os_fast_mutex(unlock_full_barrier/trylock_full_barrier) which
implies a full memory barrier.

It also implements the os_mb OS memory barrier primitives for the
different architectures which is guaranteed to act as
full acquire-release barrier.

* Commit 5ad02062d928cccbd29c0a2db6f0f7ceb33195d1: Based on the
previous commit, it adds a memory barrier on the mutex_exit
to prevent reading the number of waiters before releasing the lock,
this is completed with a modification on mutex_set_waiters that adds
a os_mb to make sure waiters store won't pass over mutex_test_and_set.

* Commit 40497577ffd9f85557b15e08ad913f627b2e9530: The ib mutex set_and_test
function and acquires the lock by calling the os_atomic_test_and_set_byte_acquire
method which should be safe in PowerPC, at the same time the mutex unlock method
will call the os_atomic_test_and_set_byte_release which is implemented as a
__sync_lock_release + a __sync_synchronize call in PowerPC.

I've already performed the verification marked on this bug, with the following results:
http://pastebin.ubuntu.com/25286767/