Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-20 Thread Andreas Krebbel
On 20/06/13 05:13, Peter Bergner wrote: > On Thu, 2013-06-20 at 00:51 +0200, Torvald Riegel wrote: >> On Wed, 2013-06-19 at 14:43 -0500, Peter Bergner wrote: > I'd still like to hear from Andreas, whether the reentrant.c test case > with both patches, now works on S390. The patches fix the testca

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-20 Thread Richard Henderson
On 06/20/2013 02:49 AM, Torvald Riegel wrote: > commit c8352d4d9fa5cfa3453a61c581956835de9753e5 > Author: Torvald Riegel > Date: Thu Jun 20 00:46:59 2013 +0200 > > libitm: Handle HTM fastpath in status query functions. Ok. r~

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-20 Thread Richard Henderson
On 06/19/2013 07:57 AM, Torvald Riegel wrote: > commit 185af84e365e1bae31aea5afd6e67e81f3c32c72 > Author: Torvald Riegel > Date: Wed Jun 19 16:42:24 2013 +0200 > > libitm: Fix handling of reentrancy in the HTM fastpath. > > PR libitm/57643 Ok. r~

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-20 Thread Peter Bergner
On Thu, 2013-06-20 at 11:49 +0200, Torvald Riegel wrote: > You're right, that was missing for x86 as well. Please see the updated > second patch that is attached. It additionally checks htm_fastpath to > see whether we are actually using the HTM. This variable is initialized > to the value that

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-20 Thread Torvald Riegel
On Wed, 2013-06-19 at 22:13 -0500, Peter Bergner wrote: > On Thu, 2013-06-20 at 00:51 +0200, Torvald Riegel wrote: > > On Wed, 2013-06-19 at 14:43 -0500, Peter Bergner wrote: > > >> I'm having trouble seeing why/when _ITM_inTransaction() is > > >> returning something other than inIrrevocableTransa

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-19 Thread Peter Bergner
On Thu, 2013-06-20 at 00:51 +0200, Torvald Riegel wrote: > On Wed, 2013-06-19 at 14:43 -0500, Peter Bergner wrote: > >> I'm having trouble seeing why/when _ITM_inTransaction() is > >> returning something other than inIrrevocableTransaction. I'll see if I can > >> determine why and will report bac

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-19 Thread Torvald Riegel
On Wed, 2013-06-19 at 14:43 -0500, Peter Bergner wrote: > On Wed, 2013-06-19 at 10:57 -0500, Peter Bergner wrote: > > On Wed, 2013-06-19 at 10:49 -0500, Peter Bergner wrote: > > > This is due to the following in _ITM_inTransaction(): > > > > > > 47 if (tx && (tx->nesting > 0)) > > > (gdb

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-19 Thread Peter Bergner
On Wed, 2013-06-19 at 10:57 -0500, Peter Bergner wrote: > On Wed, 2013-06-19 at 10:49 -0500, Peter Bergner wrote: > > This is due to the following in _ITM_inTransaction(): > > > > 47if (tx && (tx->nesting > 0)) > > (gdb) p tx > > $2 = (GTM::gtm_thread *) 0x10901bf0 > > (gdb) p tx->nesting > >

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-19 Thread Peter Bergner
On Wed, 2013-06-19 at 10:49 -0500, Peter Bergner wrote: > This is due to the following in _ITM_inTransaction(): > > 47 if (tx && (tx->nesting > 0)) > (gdb) p tx > $2 = (GTM::gtm_thread *) 0x10901bf0 > (gdb) p tx->nesting > $3 = 1 > (gdb) step > 49 if (tx->state & gtm_thread::STATE_IR

Re: [patch] libitm: Fix handling of reentrancy in the HTM fastpath

2013-06-19 Thread Peter Bergner
On Wed, 2013-06-19 at 16:57 +0200, Torvald Riegel wrote: > (Re-sending to the proper list. Sorry for the noise at gcc@.) > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57643 > > The HTM fastpath didn't handle a situation in which a relaxed > transaction executed unsafe code that in turn starts a