Sorry, I was confused

Article: Haswell Transactional Memory Alternatives
By: Paul A. Clayton (, September 13, 2012 11:56 am
Room: Moderated Discussions
Paul A. Clayton ( on September 10, 2012 2:17 pm wrote:
> Could this then require separately compiled code that uses locks
> either use the same compiler and options (so that all
> critical/locked sections are in transactions) or limit use to HLE

It seems I was not thinking clearly. It seems that even when using RTM a lock address must be added to the read set--not only to guard against accidental use of locks instead of RTM but also to handle the use of locks in the case of conflict when using RTM. (Unfortunately, this seems to indicate that any failure involving a particular lock will tend to block non-conflicting transactions temporarily. Using retry with a conflict-avoiding delay could avoid having to set the lock under modest contention and when the lock is unset all waiting threads could try using transactions, so the penalty might be small.)

(It seems that in theory a transaction could check the lock at the beginning of the transaction, remove the lock address from the read set, and finally check the lock at the end of the transaction. Any locked sections that are fully enclosed within a transaction will be known to be non-conflicting. One could even conceive of setting up a short duration MWAIT-like operation to wait for the release of the lock so that the transaction could commit, but that seems excessively complex especially with the possibility of [partially] nested transactions.)

It looks like I would need to spend quite a bit more time thinking about this stuff before I even mostly understand it.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Article: Haswell TM AlternativesDavid Kanter2012/08/21 10:17 PM
  Article: Haswell TM AlternativesHÃ¥kan Winbom2012/08/22 12:52 AM
    Article: Haswell TM AlternativesDavid Kanter2012/08/22 02:06 AM
  Article: Haswell TM Alternativesanon2012/08/22 09:46 AM
    Article: Haswell TM AlternativesLinus Torvalds2012/08/22 10:16 AM
      Article: Haswell TM AlternativesDoug S2012/08/24 09:34 AM
    AMD's ASF even more limitedPaul A. Clayton2012/08/22 10:20 AM
      AMD's ASF even more limitedLinus Torvalds2012/08/22 10:41 AM
        Compiler use of ll/sc?Paul A. Clayton2012/08/28 10:28 AM
          Compiler use of ll/sc?Linus Torvalds2012/09/08 01:58 PM
            Lock recognition?Paul A. Clayton2012/09/10 02:17 PM
              Sorry, I was confusedPaul A. Clayton2012/09/13 11:56 AM
  Filter to detect store conflictsPaul A. Clayton2012/08/22 10:19 AM
  Article: Haswell TM Alternativesbakaneko2012/08/22 03:02 PM
    Article: Haswell TM AlternativesDavid Kanter2012/08/22 03:45 PM
      Article: Haswell TM Alternativesbakaneko2012/08/22 10:56 PM
  Cache line granularity?Paul A. Clayton2012/08/28 10:28 AM
    Cache line granularity?David Kanter2012/08/31 09:13 AM
      A looser definition might have advantagesPaul A. Clayton2012/09/01 07:29 AM
    Cache line granularity?rwessel2012/08/31 08:54 PM
      Alpha load locked granularityPaul A. Clayton2012/09/01 07:29 AM
        Alpha load locked granularityanon2012/09/02 06:23 PM
          Alpha pages groupsPaul A. Clayton2012/09/03 05:16 AM
  An alternative implementationMaynard Handley2012/11/20 10:52 PM
    An alternative implementationbakaneko2012/11/21 06:52 AM
      Guarding unread values?Paul A. Clayton2012/11/21 09:39 AM
        Guarding unread values?bakaneko2012/11/21 12:25 PM
    TM granularity and versioningPaul A. Clayton2012/11/21 09:27 AM
      TM granularity and versioningMaynard Handley2012/11/21 11:52 AM
        Indeed, TM (and coherence) has devilish details (NT)Paul A. Clayton2012/11/21 11:56 AM
Reply to this Topic
Body: No Text
How do you spell green?