)]}'
{
  "commit": "0d1622d7f526311d87d7da2ee7dd14b73e45d3fc",
  "tree": "eb97e7b70d96faabbbd32cfea8fa34ac5e12eef5",
  "parents": [
    "1838ef1d782f7527e6defe87e180598622d2d071"
  ],
  "author": {
    "name": "Avi Kivity",
    "email": "avi@redhat.com",
    "time": "Sat Feb 13 10:33:12 2010 +0200"
  },
  "committer": {
    "name": "H. Peter Anvin",
    "email": "hpa@zytor.com",
    "time": "Sat Feb 13 13:37:56 2010 -0800"
  },
  "message": "x86-64, rwsem: Avoid store forwarding hazard in __downgrade_write\n\nThe Intel Architecture Optimization Reference Manual states that a short\nload that follows a long store to the same object will suffer a store\nforwading penalty, particularly if the two accesses use different addresses.\nTrivially, a long load that follows a short store will also suffer a penalty.\n\n__downgrade_write() in rwsem incurs both penalties:  the increment operation\nwill not be able to reuse a recently-loaded rwsem value, and its result will\nnot be reused by any recently-following rwsem operation.\n\nA comment in the code states that this is because 64-bit immediates are\nspecial and expensive; but while they are slightly special (only a single\ninstruction allows them), they aren\u0027t expensive: a test shows that two loops,\none loading a 32-bit immediate and one loading a 64-bit immediate, both take\n1.5 cycles per iteration.\n\nFix this by changing __downgrade_write to use the same add instruction on\ni386 and on x86_64, so that it uses the same operand size as all the other\nrwsem functions.\n\nSigned-off-by: Avi Kivity \u003cavi@redhat.com\u003e\nLKML-Reference: \u003c1266049992-17419-1-git-send-email-avi@redhat.com\u003e\nSigned-off-by: H. Peter Anvin \u003chpa@zytor.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "10204a25bf93fdf34d12a1737a08957c1a220efa",
      "old_mode": 33188,
      "old_path": "arch/x86/include/asm/rwsem.h",
      "new_id": "606ede126972e568b992268da3df6f64b7e98480",
      "new_mode": 33188,
      "new_path": "arch/x86/include/asm/rwsem.h"
    }
  ]
}
