)]}'
{
  "commit": "cf40bd16fdad42c053040bcd3988f5fdedbb6c57",
  "tree": "d97ab25726981712be806d77650b7f65167cfc88",
  "parents": [
    "6f2b9b9a9d750a9175dc79c74bfed5add840983c"
  ],
  "author": {
    "name": "Nick Piggin",
    "email": "npiggin@suse.de",
    "time": "Wed Jan 21 08:12:39 2009 +0100"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Sat Feb 14 23:27:49 2009 +0100"
  },
  "message": "lockdep: annotate reclaim context (__GFP_NOFS)\n\nHere is another version, with the incremental patch rolled up, and\nadded reclaim context annotation to kswapd, and allocation tracing\nto slab allocators (which may only ever reach the page allocator\nin rare cases, so it is good to put annotations here too).\n\nHaven\u0027t tested this version as such, but it should be getting closer\nto merge worthy ;)\n\n--\nAfter noticing some code in mm/filemap.c accidentally perform a __GFP_FS\nallocation when it should not have been, I thought it might be a good idea to\ntry to catch this kind of thing with lockdep.\n\nI coded up a little idea that seems to work. Unfortunately the system has to\nactually be in __GFP_FS page reclaim, then take the lock, before it will mark\nit. But at least that might still be some orders of magnitude more common\n(and more debuggable) than an actual deadlock condition, so we have some\nimprovement I hope (the concept is no less complete than discovery of a lock\u0027s\ninterrupt contexts).\n\nI guess we could even do the same thing with __GFP_IO (normal reclaim), and\neven GFP_NOIO locks too... but filesystems will have the most locks and fiddly\ncode paths, so let\u0027s start there and see how it goes.\n\nIt *seems* to work. I did a quick test.\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n[ INFO: inconsistent lock state ]\n2.6.28-rc6-00007-ged31348-dirty #26\n---------------------------------\ninconsistent {in-reclaim-W} -\u003e {ov-reclaim-W} usage.\nmodprobe/8526 [HC0[0]:SC0[0]:HE1:SE1] takes:\n (testlock){--..}, at: [\u003cffffffffa0020055\u003e] brd_init+0x55/0x216 [brd]\n{in-reclaim-W} state was registered at:\n  [\u003cffffffff80267bdb\u003e] __lock_acquire+0x75b/0x1a60\n  [\u003cffffffff80268f71\u003e] lock_acquire+0x91/0xc0\n  [\u003cffffffff8070f0e1\u003e] mutex_lock_nested+0xb1/0x310\n  [\u003cffffffffa002002b\u003e] brd_init+0x2b/0x216 [brd]\n  [\u003cffffffff8020903b\u003e] _stext+0x3b/0x170\n  [\u003cffffffff80272ebf\u003e] sys_init_module+0xaf/0x1e0\n  [\u003cffffffff8020c3fb\u003e] system_call_fastpath+0x16/0x1b\n  [\u003cffffffffffffffff\u003e] 0xffffffffffffffff\nirq event stamp: 3929\nhardirqs last  enabled at (3929): [\u003cffffffff8070f2b5\u003e] mutex_lock_nested+0x285/0x310\nhardirqs last disabled at (3928): [\u003cffffffff8070f089\u003e] mutex_lock_nested+0x59/0x310\nsoftirqs last  enabled at (3732): [\u003cffffffff8061f623\u003e] sk_filter+0x83/0xe0\nsoftirqs last disabled at (3730): [\u003cffffffff8061f5b6\u003e] sk_filter+0x16/0xe0\n\nother info that might help us debug this:\n1 lock held by modprobe/8526:\n #0:  (testlock){--..}, at: [\u003cffffffffa0020055\u003e] brd_init+0x55/0x216 [brd]\n\nstack backtrace:\nPid: 8526, comm: modprobe Not tainted 2.6.28-rc6-00007-ged31348-dirty #26\nCall Trace:\n [\u003cffffffff80265483\u003e] print_usage_bug+0x193/0x1d0\n [\u003cffffffff80266530\u003e] mark_lock+0xaf0/0xca0\n [\u003cffffffff80266735\u003e] mark_held_locks+0x55/0xc0\n [\u003cffffffffa0020000\u003e] ? brd_init+0x0/0x216 [brd]\n [\u003cffffffff802667ca\u003e] trace_reclaim_fs+0x2a/0x60\n [\u003cffffffff80285005\u003e] __alloc_pages_internal+0x475/0x580\n [\u003cffffffff8070f29e\u003e] ? mutex_lock_nested+0x26e/0x310\n [\u003cffffffffa0020000\u003e] ? brd_init+0x0/0x216 [brd]\n [\u003cffffffffa002006a\u003e] brd_init+0x6a/0x216 [brd]\n [\u003cffffffffa0020000\u003e] ? brd_init+0x0/0x216 [brd]\n [\u003cffffffff8020903b\u003e] _stext+0x3b/0x170\n [\u003cffffffff8070f8b9\u003e] ? mutex_unlock+0x9/0x10\n [\u003cffffffff8070f83d\u003e] ? __mutex_unlock_slowpath+0x10d/0x180\n [\u003cffffffff802669ec\u003e] ? trace_hardirqs_on_caller+0x12c/0x190\n [\u003cffffffff80272ebf\u003e] sys_init_module+0xaf/0x1e0\n [\u003cffffffff8020c3fb\u003e] system_call_fastpath+0x16/0x1b\n\nSigned-off-by: Nick Piggin \u003cnpiggin@suse.de\u003e\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "23bf02fb124ffae0dfb282453582385ea34d1919",
      "old_mode": 33188,
      "old_path": "include/linux/lockdep.h",
      "new_id": "cc97bdbc7969227a3b99e2ddace4c6a63ff85cdf",
      "new_mode": 33188,
      "new_path": "include/linux/lockdep.h"
    },
    {
      "type": "modify",
      "old_id": "4efb552aca4738f419e39e2c5b86fa7caf1b7919",
      "old_mode": 33188,
      "old_path": "include/linux/sched.h",
      "new_id": "b00a77f4999ed64d2fe668532819e2a29dfb6fd6",
      "new_mode": 33188,
      "new_path": "include/linux/sched.h"
    },
    {
      "type": "modify",
      "old_id": "06b0c3568f0b230a8c6b669d055c8c442a7eb790",
      "old_mode": 33188,
      "old_path": "kernel/lockdep.c",
      "new_id": "977f940fd5622b8c2b7213615184c260115058e7",
      "new_mode": 33188,
      "new_path": "kernel/lockdep.c"
    },
    {
      "type": "modify",
      "old_id": "56b196932c081e915568d4fef27a92c08e129758",
      "old_mode": 33188,
      "old_path": "kernel/lockdep_internals.h",
      "new_id": "e887b783244f28f663341fcad2bf5211745e6a48",
      "new_mode": 33188,
      "new_path": "kernel/lockdep_internals.h"
    },
    {
      "type": "modify",
      "old_id": "13716b8138961ee9f5feffe23ad9115fc27766e3",
      "old_mode": 33188,
      "old_path": "kernel/lockdep_proc.c",
      "new_id": "b84a1dfa9077c21eb1d636e2345e7e77ea9af9d8",
      "new_mode": 33188,
      "new_path": "kernel/lockdep_proc.c"
    },
    {
      "type": "modify",
      "old_id": "5675b30738546451c47771e5703f06830a63898a",
      "old_mode": 33188,
      "old_path": "mm/page_alloc.c",
      "new_id": "22b15a4cde8a7f79d8e0ec8407e6123750f69288",
      "new_mode": 33188,
      "new_path": "mm/page_alloc.c"
    },
    {
      "type": "modify",
      "old_id": "ddc41f337d587750122f54a44806a8a29a0a67c2",
      "old_mode": 33188,
      "old_path": "mm/slab.c",
      "new_id": "6b61de8543ec25532d55f75f82c2576860d58974",
      "new_mode": 33188,
      "new_path": "mm/slab.c"
    },
    {
      "type": "modify",
      "old_id": "bf7e8fc3aed806542e44cc7b1d222d9e2b56dc3a",
      "old_mode": 33188,
      "old_path": "mm/slob.c",
      "new_id": "1264799df5d1c119925a89ac55b7ea6e52e415bb",
      "new_mode": 33188,
      "new_path": "mm/slob.c"
    },
    {
      "type": "modify",
      "old_id": "bdc9abb08a230f2724ad842a0bc4928da0e48d23",
      "old_mode": 33188,
      "old_path": "mm/slub.c",
      "new_id": "214eb207c513f46276eb06106e94a92e2aa2060b",
      "new_mode": 33188,
      "new_path": "mm/slub.c"
    },
    {
      "type": "modify",
      "old_id": "9a27c44aa327f8f46ddbde07776df8644db82de5",
      "old_mode": 33188,
      "old_path": "mm/vmscan.c",
      "new_id": "303eb658b50bb7d3151c9a2016167223a7c25715",
      "new_mode": 33188,
      "new_path": "mm/vmscan.c"
    }
  ]
}
