)]}'
{
  "commit": "b4ce94de9b4d64e8ab3cf155d13653c666e22b9b",
  "tree": "ebc44a9554a50b495b091cb0979d79fd29e50fe7",
  "parents": [
    "c487685d7c18a8481900755aa5c56a7a74193101"
  ],
  "author": {
    "name": "Chris Mason",
    "email": "chris.mason@oracle.com",
    "time": "Wed Feb 04 09:25:08 2009 -0500"
  },
  "committer": {
    "name": "Chris Mason",
    "email": "chris.mason@oracle.com",
    "time": "Wed Feb 04 09:25:08 2009 -0500"
  },
  "message": "Btrfs: Change btree locking to use explicit blocking points\n\nMost of the btrfs metadata operations can be protected by a spinlock,\nbut some operations still need to schedule.\n\nSo far, btrfs has been using a mutex along with a trylock loop,\nmost of the time it is able to avoid going for the full mutex, so\nthe trylock loop is a big performance gain.\n\nThis commit is step one for getting rid of the blocking locks entirely.\nbtrfs_tree_lock takes a spinlock, and the code explicitly switches\nto a blocking lock when it starts an operation that can schedule.\n\nWe\u0027ll be able get rid of the blocking locks in smaller pieces over time.\nTracing allows us to find the most common cause of blocking, so we\ncan start with the hot spots first.\n\nThe basic idea is:\n\nbtrfs_tree_lock() returns with the spin lock held\n\nbtrfs_set_lock_blocking() sets the EXTENT_BUFFER_BLOCKING bit in\nthe extent buffer flags, and then drops the spin lock.  The buffer is\nstill considered locked by all of the btrfs code.\n\nIf btrfs_tree_lock gets the spinlock but finds the blocking bit set, it drops\nthe spin lock and waits on a wait queue for the blocking bit to go away.\n\nMuch of the code that needs to set the blocking bit finishes without actually\nblocking a good percentage of the time.  So, an adaptive spin is still\nused against the blocking bit to avoid very high context switch rates.\n\nbtrfs_clear_lock_blocking() clears the blocking bit and returns\nwith the spinlock held again.\n\nbtrfs_tree_unlock() can be called on either blocking or spinning locks,\nit does the right thing based on the blocking bit.\n\nctree.c has a helper function to set/clear all the locked buffers in a\npath as blocking.\n\nSigned-off-by: Chris Mason \u003cchris.mason@oracle.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3b6e35aafc9e3c882fa0c53be65fc338ca59df36",
      "old_mode": 33188,
      "old_path": "fs/btrfs/ctree.c",
      "new_id": "3af777357acb495d876d35bdfa94be205dfaf833",
      "new_mode": 33188,
      "new_path": "fs/btrfs/ctree.c"
    },
    {
      "type": "modify",
      "old_id": "f2b8d26b0472fcce558c9212e5a9a5534dd12572",
      "old_mode": 33188,
      "old_path": "fs/btrfs/ctree.h",
      "new_id": "531db112c8bd5e003bde909c4adfb8c74a8b4e64",
      "new_mode": 33188,
      "new_path": "fs/btrfs/ctree.h"
    },
    {
      "type": "modify",
      "old_id": "549271607c174eeb8164d13337924d397054dea1",
      "old_mode": 33188,
      "old_path": "fs/btrfs/disk-io.c",
      "new_id": "5aebddd711934817e6f2993375bc1031e3330e63",
      "new_mode": 33188,
      "new_path": "fs/btrfs/disk-io.c"
    },
    {
      "type": "modify",
      "old_id": "7a22f2e6ec47e7af91ef460b51b744cbb01809e6",
      "old_mode": 33188,
      "old_path": "fs/btrfs/extent-tree.c",
      "new_id": "ed1e25d724833d7253bf1b07bff122fd831fdbfa",
      "new_mode": 33188,
      "new_path": "fs/btrfs/extent-tree.c"
    },
    {
      "type": "modify",
      "old_id": "2ea7f052722c2d10fbee7ec32cf358761aae913b",
      "old_mode": 33188,
      "old_path": "fs/btrfs/extent_io.c",
      "new_id": "dd5df53e045a1d5818aaa22ec831784a5d911040",
      "new_mode": 33188,
      "new_path": "fs/btrfs/extent_io.c"
    },
    {
      "type": "modify",
      "old_id": "e80c6d96b318d7d6445f9f3fde47a56e83005b81",
      "old_mode": 33188,
      "old_path": "fs/btrfs/extent_io.h",
      "new_id": "1f9df88afbf6922e9f4af87972f05521ed15e862",
      "new_mode": 33188,
      "new_path": "fs/btrfs/extent_io.h"
    },
    {
      "type": "modify",
      "old_id": "4a79e1c5ebd07c5ffbb4c580ccf31fde3a9b9f32",
      "old_mode": 33188,
      "old_path": "fs/btrfs/inode.c",
      "new_id": "ebd7d6c37df8b39126f85e2e71364b816ddac463",
      "new_mode": 33188,
      "new_path": "fs/btrfs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "39bae7761db6c20ae87686a70d383a12c6285ee6",
      "old_mode": 33188,
      "old_path": "fs/btrfs/locking.c",
      "new_id": "68fd9ccf1805e63adf0973612f9822b9585034f8",
      "new_mode": 33188,
      "new_path": "fs/btrfs/locking.c"
    },
    {
      "type": "modify",
      "old_id": "bc1faef12519451294e361becacbd9f404ac0afd",
      "old_mode": 33188,
      "old_path": "fs/btrfs/locking.h",
      "new_id": "d92e707f5870c1dfb13462298047b58c8827f622",
      "new_mode": 33188,
      "new_path": "fs/btrfs/locking.h"
    },
    {
      "type": "modify",
      "old_id": "3e8358c36165ece2969b28348c2286b1b609dcbf",
      "old_mode": 33188,
      "old_path": "fs/btrfs/tree-defrag.c",
      "new_id": "98d25fa4570ea902abc4c8345ecf29f62af9013c",
      "new_mode": 33188,
      "new_path": "fs/btrfs/tree-defrag.c"
    },
    {
      "type": "modify",
      "old_id": "4f26f3ed0c87e3fa8e53c224c2ad20c9d12ce5c0",
      "old_mode": 33188,
      "old_path": "fs/btrfs/tree-log.c",
      "new_id": "20794290256b4f977f14a5ea95810781edc7bbad",
      "new_mode": 33188,
      "new_path": "fs/btrfs/tree-log.c"
    }
  ]
}
