This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem][rfc] Improvements to uninstrumented code paths
- From: Torvald Riegel <triegel at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: Richard Henderson <rth at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Aldy Hernandez <aldyh at redhat dot com>
- Date: Thu, 08 Nov 2012 13:39:44 +0100
- Subject: Re: [trans-mem][rfc] Improvements to uninstrumented code paths
- References: <509AE85C.2000107@redhat.com> <m2a9utqadh.fsf@firstfloor.org>
On Wed, 2012-11-07 at 15:08 -0800, Andi Kleen wrote:
> Richard Henderson <rth@redhat.com> writes:
> >
> > Is it ever likely that we'd choose an uninstrumented path for a
> > nested transaction, given that we're already executing the instrumented
> > path for an outer transaction?
>
> I don't see why not. A small inner transaction may well succeed
> in HTM, even if the big outer one does not.
It could succeed, but this would require a HyTM scheme: when the
enclosing txn is a SW txn synchronizing with other SW txns, then the
nested HW txn would have to synchronize with those other SW txns too.
So, if the STM has a serialized commit phase or something like that,
then you can run the uninstrumented code path from within HW txns
(because the HyTM part can be done on begin). But for all HyTMs that do
need instrumentation, it wouldn't work.