)]}'
{
  "commit": "176840b3aa3cb795ddec4fc665ffbd707abff906",
  "tree": "c709c05160ab4a4d104d16460e59ecc4cc3cd7a4",
  "parents": [
    "f2071b21553bf8f1eae583e32b9068393f61cbe9"
  ],
  "author": {
    "name": "Filipe Manana",
    "email": "fdmanana@gmail.com",
    "time": "Tue Feb 25 14:15:13 2014 +0000"
  },
  "committer": {
    "name": "Josef Bacik",
    "email": "jbacik@fb.com",
    "time": "Mon Mar 10 15:16:57 2014 -0400"
  },
  "message": "Btrfs: more efficient btrfs_drop_extent_cache\n\nWhile droping extent map structures from the extent cache that cover our\ntarget range, we would remove each extent map structure from the red black\ntree and then add either 1 or 2 new extent map structures if the former\nextent map covered sections outside our target range.\n\nThis change simply attempts to replace the existing extent map structure\nwith a new one that covers the subsection we\u0027re not interested in, instead\nof doing a red black remove operation followed by an insertion operation.\n\nThe number of elements in an inode\u0027s extent map tree can get very high for large\nfiles under random writes. For example, while running the following test:\n\n    sysbench --test\u003dfileio --file-num\u003d1 --file-total-size\u003d10G \\\n        --file-test-mode\u003drndrw --num-threads\u003d32 --file-block-size\u003d32768 \\\n        --max-requests\u003d500000 --file-rw-ratio\u003d2 [prepare|run]\n\nI captured the following histogram capturing the number of extent_map items\nin the red black tree while that test was running:\n\n    Count: 122462\n    Range:  1.000 - 172231.000; Mean: 96415.831; Median: 101855.000; Stddev: 49700.981\n    Percentiles:  90th: 160120.000; 95th: 166335.000; 99th: 171070.000\n       1.000 -    5.231:   452 |\n       5.231 -  187.392:    87 |\n     187.392 -  585.911:   206 |\n     585.911 - 1827.438:   623 |\n    1827.438 - 5695.245:  1962 #\n    5695.245 - 17744.861:  6204 ####\n   17744.861 - 55283.764: 21115 ############\n   55283.764 - 172231.000: 91813 #####################################################\n\nBenchmark:\n\n    sysbench --test\u003dfileio --file-num\u003d1 --file-total-size\u003d10G --file-test-mode\u003drndwr \\\n        --num-threads\u003d64 --file-block-size\u003d32768 --max-requests\u003d0 --max-time\u003d60 \\\n        --file-io-mode\u003dsync --file-fsync-freq\u003d0 [prepare|run]\n\nBefore this change: 122.1Mb/sec\nAfter this change:  125.07Mb/sec\n(averages of 5 test runs)\n\nTest machine: quad core intel i5-3570K, 32Gb of ram, SSD\n\nSigned-off-by: Filipe David Borba Manana \u003cfdmanana@gmail.com\u003e\nSigned-off-by: Josef Bacik \u003cjbacik@fb.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "64d08f94485dc84c957ebd1eb81cc40c8f20ef0f",
      "old_mode": 33188,
      "old_path": "fs/btrfs/extent_map.c",
      "new_id": "1874aee69c86391e6b8a70eb3931a8a824e3da65",
      "new_mode": 33188,
      "new_path": "fs/btrfs/extent_map.c"
    },
    {
      "type": "modify",
      "old_id": "f0a645a14d6e83a5e2b04dcf8ba71d69725ecc32",
      "old_mode": 33188,
      "old_path": "fs/btrfs/extent_map.h",
      "new_id": "e7fd8a56a140f89e521d7901a02c8448e1b929d5",
      "new_mode": 33188,
      "new_path": "fs/btrfs/extent_map.h"
    },
    {
      "type": "modify",
      "old_id": "762ca32bd988b413389f6ee5590b31c92a616bc7",
      "old_mode": 33188,
      "old_path": "fs/btrfs/file.c",
      "new_id": "31e48b9470607a834818eb9fbaa83e4ed013ac14",
      "new_mode": 33188,
      "new_path": "fs/btrfs/file.c"
    }
  ]
}
