MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain

Part of this work is based on Stewart Smitch's memory barrier and lower priori
patches for power8.

- Added memory syncronization for innodb & xtradb for power8.
- Added HAVE_WINDOWS_MM_FENCE to CMakeList.txt
- Added os_isync to fix a syncronization problem on power
- Added log_get_lsn_nowait which is now used srv_error_monitor_thread to ensur
  if log mutex is locked.

All changes done both for InnoDB and Xtradb
This commit is contained in:
Michael Widenius 2014-08-19 19:28:35 +03:00
commit 5569132ffe
21 changed files with 359 additions and 19 deletions

View file

@ -92,6 +92,7 @@ mutex_test_and_set(
ut_a(mutex->lock_word == 0);
mutex->lock_word = 1;
os_wmb;
}
return((byte)ret);
@ -147,6 +148,7 @@ mutex_get_waiters(
ptr = &(mutex->waiters);
os_rmb;
return(*ptr); /* Here we assume that the read of a single
word from memory is atomic */
}
@ -181,6 +183,7 @@ mutex_exit_func(
to wake up possible hanging threads if
they are missed in mutex_signal_object. */
os_isync;
if (mutex_get_waiters(mutex) != 0) {
mutex_signal_object(mutex);