)]}'
{
  "commit": "28b83c5193e7ab951e402252278f2cc79dc4d298",
  "tree": "10080e8d3957c2a03f8419ab44c9ecb0ffcdaee0",
  "parents": [
    "f168e1b6390e2d79cf57e48e6ae6d9b0a9e2851a"
  ],
  "author": {
    "name": "KOSAKI Motohiro",
    "email": "kosaki.motohiro@jp.fujitsu.com",
    "time": "Mon Sep 21 17:03:13 2009 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Sep 22 07:17:39 2009 -0700"
  },
  "message": "oom: move oom_adj value from task_struct to signal_struct\n\nCurrently, OOM logic callflow is here.\n\n    __out_of_memory()\n        select_bad_process()            for each task\n            badness()                   calculate badness of one task\n                oom_kill_process()      search child\n                    oom_kill_task()     kill target task and mm shared tasks with it\n\nexample, process-A have two thread, thread-A and thread-B and it have very\nfat memory and each thread have following oom_adj and oom_score.\n\n     thread-A: oom_adj \u003d OOM_DISABLE, oom_score \u003d 0\n     thread-B: oom_adj \u003d 0,           oom_score \u003d very-high\n\nThen, select_bad_process() select thread-B, but oom_kill_task() refuse\nkill the task because thread-A have OOM_DISABLE.  Thus __out_of_memory()\ncall select_bad_process() again.  but select_bad_process() select the same\ntask.  It mean kernel fall in livelock.\n\nThe fact is, select_bad_process() must select killable task.  otherwise\nOOM logic go into livelock.\n\nAnd root cause is, oom_adj shouldn\u0027t be per-thread value.  it should be\nper-process value because OOM-killer kill a process, not thread.  Thus\nThis patch moves oomkilladj (now more appropriately named oom_adj) from\nstruct task_struct to struct signal_struct.  it naturally prevent\nselect_bad_process() choose wrong task.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.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": "6f742f6658a9897503568c3ea7b78407829e760f",
      "old_mode": 33188,
      "old_path": "fs/proc/base.c",
      "new_id": "81cfff82875bd127b00f7b7faa238bb7c2b71c4e",
      "new_mode": 33188,
      "new_path": "fs/proc/base.c"
    },
    {
      "type": "modify",
      "old_id": "899d7304d5940f1479217f3d7c1e5811aff112d8",
      "old_mode": 33188,
      "old_path": "include/linux/sched.h",
      "new_id": "17e9a8e9a51dcabfb7886efa63dc070d89a58889",
      "new_mode": 33188,
      "new_path": "include/linux/sched.h"
    },
    {
      "type": "modify",
      "old_id": "73a442b7be6dff8a2abce0d3537a3cd9cb0db910",
      "old_mode": 33188,
      "old_path": "kernel/fork.c",
      "new_id": "1020977b57ca3d110cd7792dc004a571366cc777",
      "new_mode": 33188,
      "new_path": "kernel/fork.c"
    },
    {
      "type": "modify",
      "old_id": "da4c342f26411a871cb9cc8076aa189f517f8639",
      "old_mode": 33188,
      "old_path": "mm/oom_kill.c",
      "new_id": "630b77fe862f00fe6062908c72706e06cf17c3ae",
      "new_mode": 33188,
      "new_path": "mm/oom_kill.c"
    }
  ]
}
