Torvald Riegel <trie...@redhat.com> writes:

> On Thu, 2012-11-08 at 17:23 -0800, Richard Henderson wrote:
>> +         // Honor an abort from abortTransaction.
>> +         else if (htm_abort_is_cancel(ret))
>> +           return a_abortTransaction | a_restoreLiveVariables;
>
> The problem is that we cannot reliably detect whether an abort with a
> certain abort reason code really means that we got canceled.  A nested
> transaction is one example: how do we distinguish whether the nested or
> the outermost transaction were canceled?.

In TSX you always come back to the outermost anyways.
Look at the nested bit in the abort code?

> Thus, there are two options for how to handle transactions that may
> abort: Either execute them transactionally the first time, and do an
> explicit HTM abort on transaction_cancel that tells libitm not not retry
> as HW transaction, or execute such transactions always as SW
> transactions.  Which of these two options is better depends on how
> frequently transaction_cancel would actually be called.  If it's
> infrequent, then trying to run as HW transactions might be better.

I believe the current evidence is that cancel is very uncommon.

-Andi

-- 
a...@linux.intel.com -- Speaking for myself only

Reply via email to