)]}'
{
  "commit": "88e89a57f985296a6eeb416b2a875072e09d7faa",
  "tree": "1b8b30a624e75bb0a488ae6a5a3c0a7192fc6cd1",
  "parents": [
    "44ea34309e38ce1bcb7d2c8816c6b0baaee7979c"
  ],
  "author": {
    "name": "Xin Tong",
    "email": "trent.tong@gmail.com",
    "time": "Mon Aug 04 20:35:23 2014 -0500"
  },
  "committer": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Mon Sep 01 17:43:06 2014 +0100"
  },
  "message": "implementing victim TLB for QEMU system emulated TLB\n\nQEMU system mode page table walks are expensive. Taken by running QEMU\nqemu-system-x86_64 system mode on Intel PIN , a TLB miss and walking a\n4-level page tables in guest Linux OS takes ~450 X86 instructions on\naverage.\n\nQEMU system mode TLB is implemented using a directly-mapped hashtable.\nThis structure suffers from conflict misses. Increasing the\nassociativity of the TLB may not be the solution to conflict misses as\nall the ways may have to be walked in serial.\n\nA victim TLB is a TLB used to hold translations evicted from the\nprimary TLB upon replacement. The victim TLB lies between the main TLB\nand its refill path. Victim TLB is of greater associativity (fully\nassociative in this patch). It takes longer to lookup the victim TLB,\nbut its likely better than a full page table walk. The memory\ntranslation path is changed as follows :\n\nBefore Victim TLB:\n1. Inline TLB lookup\n2. Exit code cache on TLB miss.\n3. Check for unaligned, IO accesses\n4. TLB refill.\n5. Do the memory access.\n6. Return to code cache.\n\nAfter Victim TLB:\n1. Inline TLB lookup\n2. Exit code cache on TLB miss.\n3. Check for unaligned, IO accesses\n4. Victim TLB lookup.\n5. If victim TLB misses, TLB refill\n6. Do the memory access.\n7. Return to code cache\n\nThe advantage is that victim TLB can offer more associativity to a\ndirectly mapped TLB and thus potentially fewer page table walks while\nstill keeping the time taken to flush within reasonable limits.\nHowever, placing a victim TLB before the refill path increase TLB\nrefill path as the victim TLB is consulted before the TLB refill. The\nperformance results demonstrate that the pros outweigh the cons.\n\nsome performance results taken on SPECINT2006 train\ndatasets and kernel boot and qemu configure script on an\nIntel(R) Xeon(R) CPU  E5620  @ 2.40GHz Linux machine are shown in the\nGoogle Doc link below.\n\nhttps://docs.google.com/spreadsheets/d/1eiItzekZwNQOal_h-5iJmC4tMDi051m9qidi5_nwvH4/edit?usp\u003dsharing\n\nIn summary, victim TLB improves the performance of qemu-system-x86_64 by\n11% on average on SPECINT2006, kernelboot and qemu configscript and with\nhighest improvement of in 26% in 456.hmmer. And victim TLB does not result\nin any performance degradation in any of the measured benchmarks. Furthermore,\nthe implemented victim TLB is architecture independent and is expected to\nbenefit other architectures in QEMU as well.\n\nAlthough there are measurement fluctuations, the performance\nimprovement is very significant and by no means in the range of\nnoises.\n\nSigned-off-by: Xin Tong \u003ctrent.tong@gmail.com\u003e\nMessage-id: 1407202523-23553-1-git-send-email-trent.tong@gmail.com\nReviewed-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\nSigned-off-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "afd3705ff38f07bc3d3cb8fd758dde8614b53505",
      "old_mode": 33188,
      "old_path": "cputlb.c",
      "new_id": "a55518a0d266610326bab050a52a29a81ecad919",
      "new_mode": 33188,
      "new_path": "cputlb.c"
    },
    {
      "type": "modify",
      "old_id": "2dd6206d4a66c9825a0af0f12b9ba37782fb9dec",
      "old_mode": 33188,
      "old_path": "include/exec/cpu-defs.h",
      "new_id": "0ca6f0b953cfdc476453ad360c852a5b3fc4565c",
      "new_mode": 33188,
      "new_path": "include/exec/cpu-defs.h"
    },
    {
      "type": "modify",
      "old_id": "5a07f991a1453da4751f2f24a7d012e12fe232d5",
      "old_mode": 33188,
      "old_path": "softmmu_template.h",
      "new_id": "88e33900b6f4b1ed002acb2c7204ec2e5d9a4b9e",
      "new_mode": 33188,
      "new_path": "softmmu_template.h"
    }
  ]
}
