)]}'
{
  "commit": "2ff05b2b4eac2e63d345fc731ea151a060247f53",
  "tree": "1840bc2d3b381eca5d39869499339b0fcc6eabbf",
  "parents": [
    "c9e444103b5e7a5a3519f9913f59767f92e33baf"
  ],
  "author": {
    "name": "David Rientjes",
    "email": "rientjes@google.com",
    "time": "Tue Jun 16 15:32:56 2009 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Jun 16 19:47:43 2009 -0700"
  },
  "message": "oom: move oom_adj value from task_struct to mm_struct\n\nThe per-task oom_adj value is a characteristic of its mm more than the\ntask itself since it\u0027s not possible to oom kill any thread that shares the\nmm.  If a task were to be killed while attached to an mm that could not be\nfreed because another thread were set to OOM_DISABLE, it would have\nneedlessly been terminated since there is no potential for future memory\nfreeing.\n\nThis patch moves oomkilladj (now more appropriately named oom_adj) from\nstruct task_struct to struct mm_struct.  This requires task_lock() on a\ntask to check its oom_adj value to protect against exec, but it\u0027s already\nnecessary to take the lock when dereferencing the mm to find the total VM\nsize for the badness heuristic.\n\nThis fixes a livelock if the oom killer chooses a task and another thread\nsharing the same memory has an oom_adj value of OOM_DISABLE.  This occurs\nbecause oom_kill_task() repeatedly returns 1 and refuses to kill the\nchosen task while select_bad_process() will repeatedly choose the same\ntask during the next retry.\n\nTaking task_lock() in select_bad_process() to check for OOM_DISABLE and in\noom_kill_task() to check for threads sharing the same memory will be\nremoved in the next patch in this series where it will no longer be\nnecessary.\n\nWriting to /proc/pid/oom_adj for a kthread will now return -EINVAL since\nthese threads are immune from oom killing already.  They simply report an\noom_adj value of OOM_DISABLE.\n\nCc: Nick Piggin \u003cnpiggin@suse.de\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cd8717a362712fbb537bf562eaa95b0be778dd3b",
      "old_mode": 33188,
      "old_path": "Documentation/filesystems/proc.txt",
      "new_id": "ebff3c10a07fc124b865f815de5b38d65f38d1fa",
      "new_mode": 33188,
      "new_path": "Documentation/filesystems/proc.txt"
    },
    {
      "type": "modify",
      "old_id": "1539e630c47d524b1df251236e638dbb1e8d279b",
      "old_mode": 33188,
      "old_path": "fs/proc/base.c",
      "new_id": "3ce5ae9e3d2dabd36dce105ecb4545a4723c1202",
      "new_mode": 33188,
      "new_path": "fs/proc/base.c"
    },
    {
      "type": "modify",
      "old_id": "0e80e26ecf21220104d8d2abbeb9cca6a1215e6e",
      "old_mode": 33188,
      "old_path": "include/linux/mm_types.h",
      "new_id": "f4408106fcbc4c2047380a913f886c757b247ee0",
      "new_mode": 33188,
      "new_path": "include/linux/mm_types.h"
    },
    {
      "type": "modify",
      "old_id": "1048bf50540a18825731d614fe396b6aa01347c3",
      "old_mode": 33188,
      "old_path": "include/linux/sched.h",
      "new_id": "1bc6fae0c1351b96ffd7e7f1e88dda544891f73c",
      "new_mode": 33188,
      "new_path": "include/linux/sched.h"
    },
    {
      "type": "modify",
      "old_id": "a7b2460e922b779252ebcc225cecaf6060b0e964",
      "old_mode": 33188,
      "old_path": "mm/oom_kill.c",
      "new_id": "b60913520ef3a746cb56839d8fd4813337f2b271",
      "new_mode": 33188,
      "new_path": "mm/oom_kill.c"
    }
  ]
}
