)]}'
{
  "commit": "9a5a8f19b43430752067ecaee62fc59e11e88fa6",
  "tree": "ffa31761b0e208d8be324dc97368caf4bea87fd8",
  "parents": [
    "1756954c61cb5c97c618ccb366482b9c1f891d6d"
  ],
  "author": {
    "name": "Michal Hocko",
    "email": "mhocko@suse.cz",
    "time": "Fri Nov 16 14:14:49 2012 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Nov 16 14:33:04 2012 -0800"
  },
  "message": "memcg: oom: fix totalpages calculation for memory.swappiness\u003d\u003d0\n\noom_badness() takes a totalpages argument which says how many pages are\navailable and it uses it as a base for the score calculation.  The value\nis calculated by mem_cgroup_get_limit which considers both limit and\ntotal_swap_pages (resp.  memsw portion of it).\n\nThis is usually correct but since fe35004fbf9e (\"mm: avoid swapping out\nwith swappiness\u003d\u003d0\") we do not swap when swappiness is 0 which means\nthat we cannot really use up all the totalpages pages.  This in turn\nconfuses oom score calculation if the memcg limit is much smaller than\nthe available swap because the used memory (capped by the limit) is\nnegligible comparing to totalpages so the resulting score is too small\nif adj!\u003d0 (typically task with CAP_SYS_ADMIN or non zero oom_score_adj).\nA wrong process might be selected as result.\n\nThe problem can be worked around by checking mem_cgroup_swappiness\u003d\u003d0\nand not considering swap at all in such a case.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: \u003cstable@vger.kernel.org\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": "c07f7b4fb88d162ad012e69a3d77aa90d62868ff",
      "old_mode": 33188,
      "old_path": "Documentation/cgroups/memory.txt",
      "new_id": "71c4da413444d969519ae464250774db5c05de63",
      "new_mode": 33188,
      "new_path": "Documentation/cgroups/memory.txt"
    },
    {
      "type": "modify",
      "old_id": "7acf43bf04a270cf2bf90f342c66142d1c5cf675",
      "old_mode": 33188,
      "old_path": "mm/memcontrol.c",
      "new_id": "93a7e36ded89f264194c77c7f8cd27c5f02410fa",
      "new_mode": 33188,
      "new_path": "mm/memcontrol.c"
    }
  ]
}
