Re: [PATCH] Add faster HTM fastpath for libitm TSX v2

2013-01-30 Thread Torvald Riegel
On Tue, 2013-01-29 at 20:19 +0100, Andi Kleen wrote: > > next time please reply to the points raised in a review if you disagree > > with them, and don't just ignore them. That speeds up the review. > > It was all in the previous email on the topic. This v2 patch did not incorporate all the chan

Re: [PATCH] Add faster HTM fastpath for libitm TSX v2

2013-01-29 Thread Andi Kleen
> next time please reply to the points raised in a review if you disagree > with them, and don't just ignore them. That speeds up the review. It was all in the previous email on the topic. > > // See gtm_thread::begin_transaction. > > -uint32_t GTM::htm_fastpath = 0; > > +uint32_t GTM::htm_fast

Re: [PATCH] Add faster HTM fastpath for libitm TSX v2

2013-01-29 Thread Torvald Riegel
On Thu, 2013-01-24 at 19:30 -0800, Andi Kleen wrote: > From: Andi Kleen > > The libitm TSX hardware transaction fast path currently does quite a bit of > unnecessary work (saving registers etc.) before even trying to start > a hardware transaction. This patch moves the initial attempt at a > tran

Re: [PATCH] Add faster HTM fastpath for libitm TSX

2013-01-29 Thread Torvald Riegel
On Thu, 2013-01-24 at 17:45 +0100, Andi Kleen wrote: > > > > > + uint32_t *__gtm_global_lock; > > > > Same, and rearrange the serial lock's fields (see below). > > My understanding is that C++ makes no guarantees of class layout. > That is why i ended up not relying on the layout. gtm_rwlock i

Re: [PATCH] Add faster HTM fastpath for libitm TSX v2

2013-01-25 Thread Andi Kleen
> Probably the attached (RFC) patch can be useful in this case. The > patch allows to specify the label for xbegin, so it is possible to > implement code like following (non-sensical) example: It can be actually implemented using asm goto. I have some macros for this. And the tree optimizers shou

Re: [PATCH] Add faster HTM fastpath for libitm TSX v2

2013-01-25 Thread Uros Bizjak
Hello! > The libitm TSX hardware transaction fast path currently does quite a bit of > unnecessary work (saving registers etc.) before even trying to start > a hardware transaction. This patch moves the initial attempt at a > transaction early into the assembler stub. Complicated work like retries

Re: [PATCH] Add faster HTM fastpath for libitm TSX

2013-01-24 Thread Richard Henderson
On 01/24/2013 08:45 AM, Andi Kleen wrote: >Please keep this as-is and rather use the same approach as for >gtm_thread::begin_transaction. What approach? Using __asm__ to set the assembler name. r~

Re: [PATCH] Add faster HTM fastpath for libitm TSX

2013-01-24 Thread Andi Kleen
> > // See gtm_thread::begin_transaction. > > -uint32_t GTM::htm_fastpath = 0; > > +extern "C" > > +{ > > + uint32_t __gtm_htm_fastpath = 0; > > Please keep this as-is and rather use the same approach as for > gtm_thread::begin_transaction. What approach? I don't want to hardcode C++ mangling

Re: [PATCH] Add faster HTM fastpath for libitm TSX

2013-01-24 Thread Torvald Riegel
On Sat, 2013-01-12 at 13:03 -0800, Andi Kleen wrote: > From: Andi Kleen > > The libitm TSX hardware transaction fast path currently does quite a bit of > unnecessary work (saving registers etc.) before even trying to start > a hardware transaction. This patch moves the initial attempt at a > tran

[PING] Re: [PATCH] Add faster HTM fastpath for libitm TSX

2013-01-20 Thread Andi Kleen
Andi Kleen writes: PING! This patch needs review. -Andi > From: Andi Kleen > > The libitm TSX hardware transaction fast path currently does quite a bit of > unnecessary work (saving registers etc.) before even trying to start > a hardware transaction. This patch moves the initial attempt at a >