)]}'
{
  "commit": "5e9d834a0e0c0485dfa487281ab9650fc37a3bb5",
  "tree": "b93cf4fd46b50b18f3fc118f1739a71dbdd8f340",
  "parents": [
    "6cf86ac6f36b638459a9a6c2576d5e655d41d451"
  ],
  "author": {
    "name": "David Rientjes",
    "email": "rientjes@google.com",
    "time": "Mon Aug 09 17:18:51 2010 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Aug 09 20:44:56 2010 -0700"
  },
  "message": "oom: sacrifice child with highest badness score for parent\n\nWhen a task is chosen for oom kill, the oom killer first attempts to\nsacrifice a child not sharing its parent\u0027s memory instead.  Unfortunately,\nthis often kills in a seemingly random fashion based on the ordering of\nthe selected task\u0027s child list.  Additionally, it is not guaranteed at all\nto free a large amount of memory that we need to prevent additional oom\nkilling in the very near future.\n\nInstead, we now only attempt to sacrifice the worst child not sharing its\nparent\u0027s memory, if one exists.  The worst child is indicated with the\nhighest badness() score.  This serves two advantages: we kill a\nmemory-hogging task more often, and we allow the configurable\n/proc/pid/oom_adj value to be considered as a factor in which child to\nkill.\n\nReviewers may observe that the previous implementation would iterate\nthrough the children and attempt to kill each until one was successful and\nthen the parent if none were found while the new code simply kills the\nmost memory-hogging task or the parent.  Note that the only time\noom_kill_task() fails, however, is when a child does not have an mm or has\na /proc/pid/oom_adj of OOM_DISABLE.  badness() returns 0 for both cases,\nso the final oom_kill_task() will always succeed.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Nick Piggin \u003cnpiggin@suse.de\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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": "6f6e04c40c9347b5f1b6556bb0a9a4a08cc4af3a",
      "old_mode": 33188,
      "old_path": "mm/oom_kill.c",
      "new_id": "7c8488f6a3f5fd3443a718505c4d6d16368236fa",
      "new_mode": 33188,
      "new_path": "mm/oom_kill.c"
    }
  ]
}
