On Thu, 2013-01-24 at 21:44 +0400, Dmitry Vyukov wrote:
> On Thu, Jan 24, 2013 at 9:29 PM, Torvald Riegel <trie...@redhat.com> wrote:
> > On Mon, 2012-12-17 at 13:52 +0400, Dmitry Vyukov wrote:
> >> > I think the simplest way to solve it for now, it to use... well, single 
> >> > global lock.
> >> > I.e. replace __txn_start() with global pthread_mutex_t acquisition, 
> >> > __txn_commit() with lock release. And no transactional instrumentation 
> >> > inside of the trx. It should be correct transformation, right. However, 
> >> > I am not sure what to do with __txn_abort()...
> >
> > This is already an execution mode supported by libitm.  It can be forced
> > by setting an env var: LIBITM_DEFAULT_METHOD=serial
> >
> > Should we just tell users (in the docs) to set this env var when using
> > TSAN, or can TSAN set it, or should there be a way for TSAN to set the
> > mode using another mechanism?
> 
> Tsan can set LIBITM_DEFAULT_METHOD during initialization. Other modes
> won't work with tsan, and users don't usually read docs. Users must
> not be able to override the mode.

The only way to influence the mode is through the env var, so if Tsan
sets it before the first transaction is executed, this should be fine I
guess.

> Does somebody tried to execute some transactional code with tsan? Does
> it work at all (with LIBITM_DEFAULT_METHOD=serial)?

I haven't yet.


Torvald

Reply via email to