|
From: Eliot M. <mo...@cs...> - 2013-06-20 16:52:44
|
On 6/20/2013 12:19 PM, John Reiser wrote: > On 06/20/2013 08:59 AM, Julian Seward wrote: >> On 06/20/2013 05:33 PM, John Reiser wrote: > The lock might guarantee that P(failure) < (1.0 - delta) for non-infinitesimal > delta > 0. For instance, the lock might guarantee no [other] memory accesses > to the relevant memory region, no context switching, no other XBEGIN (in the > strongest case: no other process, and no other thread), etc. Thus progress > will occur unless VG forces perpetual failure. Furthermore, I know that at least some people at IBM are very interested in an HTM definition that *guarantees* that certain transactions will succeed in the absence of conflicting accesses. The existing IBM spec may even make such a guarantee. As one of the originators of TM ( :-) ), my personal opinion is that it would be interesting to simulate TM in Valgrind, which basically means to build a software TM facility. When run on a platform that supports HTM, one could take a Hybrid TM approach, where some transactions may succeed directly in the target hardware while others will proceed in software (e.g., if the hardware version fails enough times or the transaction is too complex for the hardware). In terms of interaction with tools, one can try weaving in the tool rewrites directly -- which may tend to make transactions bigger, and thus more likely to fail in the underlying hardware. To get the proper semantics, we may need an STM emulation of logical success of the hardware transaction (as opposed to throwing the original code down its failure path). *Perhaps* we can "buffer" the actions of the original transaction, and if it commits, do the work that a tool wants to do. This may be too complex, but it's a thought. It has the virtue of not doing tool work on the actions of failing transactions -- actions that logically disappear anyway. ... Which suggests that we need additional clarity as to what should happen w.r.t. tool actions for a failing transaction. If you run it as a hardware txn and it *fails*, then the tool actions disappear -- which might, or might not, be what you want. Regards -- Eliot Moss |