Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2015-05-26 Thread Kristian Nielsen
MARK CALLAGHAN writes: > What about ARM which has a much weaker memory model compared to x86? Yes. There is in fact a bug about it: https://mariadb.atlassian.net/browse/MDEV-7658 - Kristian. ___ Mailing list: https://launchpad.net/~maria-develo

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2015-05-26 Thread MARK CALLAGHAN
What about ARM which has a much weaker memory model compared to x86? On Sat, May 23, 2015 at 12:46 AM, Kristian Nielsen wrote: > Stewart Smith writes: > > >> It is probably still incorrect for some other architectures (eg. > multi-core > >> ARM). > > > > What about POWER? It's officially suppor

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2015-05-23 Thread Kristian Nielsen
Stewart Smith writes: >> It is probably still incorrect for some other architectures (eg. multi-core >> ARM). > > What about POWER? It's officially supported by Maria now :) There is special code for POWER (#ifdef), so it should work... - Kristian. __

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2015-05-22 Thread Stewart Smith
Kristian Nielsen writes: > MARK CALLAGHAN writes: > >> Did this ever get resolved? I enjoyed reading this, you did a nice job >> explaining the problem. > > It was resolved for x86 in the sense that the code was reverted to the old > behaviour. The code is semantically incorrect (uses the wrong

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2015-05-21 Thread Kristian Nielsen
MARK CALLAGHAN writes: > Did this ever get resolved? I enjoyed reading this, you did a nice job > explaining the problem. It was resolved for x86 in the sense that the code was reverted to the old behaviour. The code is semantically incorrect (uses the wrong barriers), but it happens to generate

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2015-05-19 Thread MARK CALLAGHAN
Did this ever get resolved? I enjoyed reading this, you did a nice job explaining the problem. Linux had some fun in this area recently -- https://groups.google.com/forum/#!topic/mechanical-sympathy/QbmpZxp6C64 The InnoDB thread that checked waiting threads once per second for wakeup was a hack t

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2014-11-06 Thread Kristian Nielsen
Sergey Vojtovich writes: > Never seen this before. InnoDB of 5.5 and InnoDB/XtraDB of 10.0 both have: > > UNIV_INTERN > void > mutex_set_waiters( > /*==*/ > ib_mutex_t* mutex, /*!< in: mutex */ > ulint n) /*!< in: value to set */ > { > volat

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2014-11-06 Thread Sergey Vojtovich
Kristian, thanks for your answers! My comments inline. On Thu, Nov 06, 2014 at 06:48:18PM +0100, Kristian Nielsen wrote: > Sergey Vojtovich writes: > > >> # First spin wait, hoping to get the mutex without yielding. > >> os_compare_and_swap_ulint(&mutex->waiters, 0, 1); > > Where did you se

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2014-11-06 Thread Kristian Nielsen
Sergey Vojtovich writes: >> # First spin wait, hoping to get the mutex without yielding. >> os_compare_and_swap_ulint(&mutex->waiters, 0, 1); > Where did you see "os_compare_and_swap_ulint(&mutex->waiters, 0, 1)"? > FWICS waiters of InnoDB mutex are non-atomic loads/stores. mutex_enter_func(

Re: [Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2014-11-06 Thread Sergey Vojtovich
Hi Kristian, On Thu, Nov 06, 2014 at 03:12:55PM +0100, Kristian Nielsen wrote: > I have been debugging some test failures seen in Buildbot: > > https://mariadb.atlassian.net/browse/MDEV-7026 > > After some debugging, this is what I think is going on. I will refer to > MariaDB 5.5 sources, th

[Maria-developers] Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs

2014-11-06 Thread Kristian Nielsen
I have been debugging some test failures seen in Buildbot: https://mariadb.atlassian.net/browse/MDEV-7026 After some debugging, this is what I think is going on. I will refer to MariaDB 5.5 sources, though the problem is also in 10.0. InnoDB/XtraDB mutexes are taken in mutex_enter_func() and