TSX

Johan did a great job explaining Haswell's Transactional Synchronization eXtensions (TSX), so I won't go into as much depth here. The basic premise is simple, although the implementation is quite complex.

It's easy to demand well threaded applications from software vendors, but actually implementing code that scales well across unlimited threads isn't easy. Parallelizing truly independent tasks is the low hanging fruit, but it's the tasks that all access the same data structure that can create problems. With multiple cores accessing the same data structure, running independent of one another, there's the risk of two different cores writing to the same part of the same structure. Only one set of data can be right, but dealing with this concurrent access problem can get hairy.

The simplest way to deal with it is simply to lock the entire data structure as soon as one core starts accessing it and only allow that one core write access until it's done. Other cores are given access to the data structure, but serially, not in parallel to avoid any data integrity issues.

This is by far the easiest way to deal with the problem of multiple threads accessing the same data structure, however it also prevents any performance scaling across multiple threads/cores. As focused as Intel is on increasing single threaded performance, a lot of die area goes wasted if applications don't scale well with more cores.

Software developers can instead choose to implement more fine grained locking of data structures, however doing so obviously increases the complexity of their code.

Haswell's TSX instructions allow the developer to shift much of the complexity of managing locks to the CPU. Using the new Hardware Lock Elision and its XAQUIRE/XRELEASE instructions, Haswell developers can mark a section of code for transactional execution. Haswell will then execute the code as if no hardware locks were in place and if it completes without issues the CPU will commit all writes to memory and enjoy the performance benefits. If two or more threads attempt to write to the same area in memory, the process is aborted and code re-executed traditionally with locks. The XAQUIRE/XRELEASE instructions decode to no-ops on earlier architectures so backwards compatibility isn't a problem.

Like most new instructions, it's going to take a while for Haswell's TSX to take off as we'll need to see significant adoption of Haswell platforms as well as developers embracing the new instructions. TSX does stand to show improvements in performance anywhere from client to server performance if implemented however, this is definitely one to watch for and be excited about.

Haswell also continues improvements in virtualization performance, including big decreases to guest/host transition times.

Decoupled L3 Cache Haswell's GPU
Comments Locked

245 Comments

View All Comments

  • CaptainDoug - Friday, October 5, 2012 - link

    Quite the read. Very informational. Anandtech has some of the best tech writers. True online journalism. Sometimes i miss that while reading tech blogs... You guys are a cut above.. at least one.
  • colonelclaw - Friday, October 5, 2012 - link

    Couldn't agree more, this article really brightened up what was otherwise a pretty miserable afternoon here in London.

    When am I going to be able to walk into a shop and buy something with Haswell inside it? Next March maybe?
  • Kepe - Friday, October 5, 2012 - link

    As stated in the article, Haswell is coming in the summer of 2013.
  • linuxlowdown - Saturday, October 6, 2012 - link

    Tag team Intel fanboy puke.
  • Azethoth - Sunday, October 7, 2012 - link

    How do I downvote stupid crap like this "Tag team Intel fanboy puke." comment so that collectively we can see high quality comments without having to wade through the interturds as well? It really takes away from the best article I have read in a long time. Not because it is about Intel, but because it is about the state of the art.
  • medi01 - Tuesday, October 9, 2012 - link

    Well, I'd also ask how do I downvote stupid butt kissing like OP, while we are at rating....
  • Kisper - Saturday, October 20, 2012 - link

    Many people enjoy well written and informative articles. Are you telling me that if you wrote, you would not enjoy positive feedback from your readers?
  • CaptainDoug - Tuesday, October 23, 2012 - link

    Exactly.
  • actionjksn - Sunday, October 7, 2012 - link

    Why are you even on this article dumb fuck? I'm sure there is something that is of interest to you on the internet somewhere.
  • medi01 - Tuesday, October 9, 2012 - link

    Not sure about him, but I've looked into this article to figure power targets for haswell (especially interesting to compare to ARM crowd), NOT to read orgasmic comments about eternal wizdom of Intel's engineering...

Log in

Don't have an account? Sign up now