)]}'
{
  "log": [
    {
      "commit": "1e11ad8dc42975d5c2bab7d478f6cd875602eda4",
      "tree": "62e755edfd19ac45cc11b50311ad802907485ff7",
      "parents": [
        "72494504498ff5ac2f086a83473d4dd1ca490bd3"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Fri Jun 08 13:21:26 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jun 08 15:07:35 2012 -0700"
      },
      "message": "mm, oom: fix badness score underflow\n\nIf the privileges given to root threads (3% of allowable memory) or a\nnegative value of /proc/pid/oom_score_adj happen to exceed the amount of\nrss of a thread, its badness score overflows as a result of commit\na7f638f999ff (\"mm, oom: normalize oom scores to oom_score_adj scale only\nfor userspace\").\n\nFix this by making the type signed and return 1, meaning the thread is\nstill eligible for kill, if the value is negative.\n\nReported-by: Dave Jones \u003cdavej@redhat.com\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a7f638f999ff42310e9582273b1fe25ea6e469ba",
      "tree": "174dec4d849b78023a23a15d5947cf1d3be9f564",
      "parents": [
        "fe35004fbf9eaf67482b074a2e032abb9c89b1dd"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue May 29 15:06:47 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:24 2012 -0700"
      },
      "message": "mm, oom: normalize oom scores to oom_score_adj scale only for userspace\n\nThe oom_score_adj scale ranges from -1000 to 1000 and represents the\nproportion of memory available to the process at allocation time.  This\nmeans an oom_score_adj value of 300, for example, will bias a process as\nthough it was using an extra 30.0% of available memory and a value of\n-350 will discount 35.0% of available memory from its usage.\n\nThe oom killer badness heuristic also uses this scale to report the oom\nscore for each eligible process in determining the \"best\" process to\nkill.  Thus, it can only differentiate each process\u0027s memory usage by\n0.1% of system RAM.\n\nOn large systems, this can end up being a large amount of memory: 256MB\non 256GB systems, for example.\n\nThis can be fixed by having the badness heuristic to use the actual\nmemory usage in scoring threads and then normalizing it to the\noom_score_adj scale for userspace.  This results in better comparison\nbetween eligible threads for kill and no change from the userspace\nperspective.\n\nSuggested-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nTested-by: Dave Jones \u003cdavej@redhat.com\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"
    },
    {
      "commit": "078de5f706ece36afd73bb4b8283314132d2dfdf",
      "tree": "0dee00713f9cb5e2516260a66b8df99ef7d03e4d",
      "parents": [
        "ae2975bc3476243b45a1e2344236d7920c268f38"
      ],
      "author": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Wed Feb 08 07:00:08 2012 -0800"
      },
      "committer": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Thu May 03 03:28:38 2012 -0700"
      },
      "message": "userns: Store uid and gid values in struct cred with kuid_t and kgid_t types\n\ncred.h and a few trivial users of struct cred are changed.  The rest of the users\nof struct cred are left for other patches as there are too many changes to make\nin one go and leave the change reviewable.  If the user namespace is disabled and\nCONFIG_UIDGID_STRICT_TYPE_CHECKS are disabled the code will contiue to compile\nand behave correctly.\n\nAcked-by: Serge Hallyn \u003cserge.hallyn@canonical.com\u003e\nSigned-off-by: Eric W. Biederman \u003cebiederm@xmission.com\u003e\n"
    },
    {
      "commit": "d2d393099de21eda91c5ec6a05d60e5dee4d5175",
      "tree": "92f2f5eaed87e35c43d8461a86f618b6f2a28406",
      "parents": [
        "def8cf72562e17ec8316ce0cb5697c7afd6400e3"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Fri Mar 23 15:02:45 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 23 16:58:41 2012 -0700"
      },
      "message": "signal: oom_kill_task: use SEND_SIG_FORCED instead of force_sig()\n\nChange oom_kill_task() to use do_send_sig_info(SEND_SIG_FORCED) instead\nof force_sig(SIGKILL).  With the recent changes we do not need force_ to\nkill the CLONE_NEWPID tasks.\n\nAnd this is more correct.  force_sig() can race with the exiting thread\neven if oom_kill_task() checks p-\u003emm !\u003d NULL, while\ndo_send_sig_info(group \u003d\u003e true) kille the whole process.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Anton Vorontsov \u003canton.vorontsov@linaro.org\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@gmail.com\u003e\nCc: 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"
    },
    {
      "commit": "e845e199362cc5712ba0e7eedc14eed70e144258",
      "tree": "3968125d82e512c3aee44ed96694fdd58b863506",
      "parents": [
        "c7cfa37b7324a190fc36ff116d79d0f899e8d273"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:34:10 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:59 2012 -0700"
      },
      "message": "mm, memcg: pass charge order to oom killer\n\nThe oom killer typically displays the allocation order at the time of oom\nas a part of its diangostic messages (for global, cpuset, and mempolicy\nooms).\n\nThe memory controller may also pass the charge order to the oom killer so\nit can emit the same information.  This is useful in determining how large\nthe memory allocation is that triggered the oom killer.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nAcked-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"
    },
    {
      "commit": "08ab9b10d43aca091fdff58b69fc1ec89c5b8a83",
      "tree": "73abfd3a257f3feadc0fa28c3117aaa9d95af596",
      "parents": [
        "b76437579d1344b612cf1851ae610c636cec7db0"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:34:04 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:58 2012 -0700"
      },
      "message": "mm, oom: force oom kill on sysrq+f\n\nThe oom killer chooses not to kill a thread if:\n\n - an eligible thread has already been oom killed and has yet to exit,\n   and\n\n - an eligible thread is exiting but has yet to free all its memory and\n   is not the thread attempting to currently allocate memory.\n\nSysRq+F manually invokes the global oom killer to kill a memory-hogging\ntask.  This is normally done as a last resort to free memory when no\nprogress is being made or to test the oom killer itself.\n\nFor both uses, we always want to kill a thread and never defer.  This\npatch causes SysRq+F to always kill an eligible thread and can be used to\nforce a kill even if another oom killed thread has failed to exit.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Pekka Enberg \u003cpenberg@kernel.org\u003e\nAcked-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"
    },
    {
      "commit": "dc3f21eadeea6d9898271ff32d35d5e00c6872ea",
      "tree": "be56e2d8b5bf7ce4a140d020b5e248dff6a06795",
      "parents": [
        "8447d950e7445cae71ad66d0e33784f8388aaf9d"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:33:47 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:55 2012 -0700"
      },
      "message": "mm, oom: introduce independent oom killer ratelimit state\n\nprintk_ratelimit() uses the global ratelimit state for all printks.  The\noom killer should not be subjected to this state just because another\nsubsystem or driver may be flooding the kernel log.\n\nThis patch introduces printk ratelimiting specifically for the oom killer.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: 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"
    },
    {
      "commit": "8447d950e7445cae71ad66d0e33784f8388aaf9d",
      "tree": "b7f7cfba3d2264b87ca168131e0a65d89faa51a8",
      "parents": [
        "647f2bdf4a00dbcaa8964286501d68e7d2e6da93"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:33:47 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:55 2012 -0700"
      },
      "message": "mm, oom: do not emit oom killer warning if chosen thread is already exiting\n\nIf a thread is chosen for oom kill and is already PF_EXITING, then the oom\nkiller simply sets TIF_MEMDIE and returns.  This allows the thread to have\naccess to memory reserves so that it may quickly exit.  This logic is\npreceeded with a comment saying there\u0027s no need to alarm the sysadmin.\nThis patch adds truth to that statement.\n\nThere\u0027s no need to emit any warning about the oom condition if the thread\nis already exiting since it will not be killed.  In this condition, just\nsilently return the oom killer since its only giving access to memory\nreserves and is otherwise a no-op.\n\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "647f2bdf4a00dbcaa8964286501d68e7d2e6da93",
      "tree": "a9efa94d4add977b4629b137de7f4d002eec56dd",
      "parents": [
        "2a1c9b1fc0a0ea2e30cdeb69062647c5c5ae661f"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:33:46 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:55 2012 -0700"
      },
      "message": "mm, oom: fold oom_kill_task() into oom_kill_process()\n\noom_kill_task() has a single caller, so fold it into its parent function,\noom_kill_process().  Slightly reduces the number of lines in the oom\nkiller.\n\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2a1c9b1fc0a0ea2e30cdeb69062647c5c5ae661f",
      "tree": "a123d061a5d95984e0446a350189f4a310d06b53",
      "parents": [
        "ce24d8a14207c2036df86d2bd3d14b4393eb51e3"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:33:46 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:55 2012 -0700"
      },
      "message": "mm, oom: avoid looping when chosen thread detaches its mm\n\noom_kill_task() returns non-zero iff the chosen process does not have any\nthreads with an attached -\u003emm.\n\nIn such a case, it\u0027s better to just return to the page allocator and retry\nthe allocation because memory could have been freed in the interim and the\noom condition may no longer exist.  It\u0027s unnecessary to loop in the oom\nkiller and find another thread to kill.\n\nThis allows both oom_kill_task() and oom_kill_process() to be converted to\nvoid functions.  If the oom condition persists, the oom killer will be\nrecalled.\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "72835c86ca15d0126354b73d5f29ce9194931c9b",
      "tree": "369f31168b405e4d597b3cd067a1fd0ac2025dbc",
      "parents": [
        "ec0fffd84b162e0563a28a81aa049f946b31a8e2"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:32 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:06 2012 -0800"
      },
      "message": "mm: unify remaining mem_cont, mem, etc. variable names to memcg\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ec0fffd84b162e0563a28a81aa049f946b31a8e2",
      "tree": "48e4c79076a917207c869b960ecd26da8fcb8505",
      "parents": [
        "0527b6903b2838e214c895d527806aefd61b3c8f"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:29 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:06 2012 -0800"
      },
      "message": "mm: oom_kill: remove memcg argument from oom_kill_task()\n\nThe memcg argument of oom_kill_task() hasn\u0027t been used since 341aea2\n\u0027oom-kill: remove boost_dying_task_prio()\u0027.  Kill it.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "43d2b113241d6797b890318767e0af78e313414b",
      "tree": "6f25647f2660f8fca63cc8355b70ad643993dab8",
      "parents": [
        "6bd4837de96e7d9f9bf33e59117c24fc230862ac"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Jan 10 15:08:09 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jan 10 16:30:44 2012 -0800"
      },
      "message": "tracepoint: add tracepoints for debugging oom_score_adj\n\noom_score_adj is used for guarding processes from OOM-Killer.  One of\nproblem is that it\u0027s inherited at fork().  When a daemon set oom_score_adj\nand make children, it\u0027s hard to know where the value is set.\n\nThis patch adds some tracepoints useful for debugging. This patch adds\n3 trace points.\n  - creating new task\n  - renaming a task (exec)\n  - set oom_score_adj\n\nTo debug, users need to enable some trace pointer. Maybe filtering is useful as\n\n# EVENT\u003d/sys/kernel/debug/tracing/events/task/\n# echo \"oom_score_adj !\u003d 0\" \u003e $EVENT/task_newtask/filter\n# echo \"oom_score_adj !\u003d 0\" \u003e $EVENT/task_rename/filter\n# echo 1 \u003e $EVENT/enable\n# EVENT\u003d/sys/kernel/debug/tracing/events/oom/\n# echo 1 \u003e $EVENT/enable\n\noutput will be like this.\n# grep oom /sys/kernel/debug/tracing/trace\nbash-7699  [007] d..3  5140.744510: oom_score_adj_update: pid\u003d7699 comm\u003dbash oom_score_adj\u003d-1000\nbash-7699  [007] ...1  5151.818022: task_newtask: pid\u003d7729 comm\u003dbash clone_flags\u003d1200011 oom_score_adj\u003d-1000\nls-7729  [003] ...2  5151.818504: task_rename: pid\u003d7729 oldcomm\u003dbash newcomm\u003dls oom_score_adj\u003d-1000\nbash-7699  [002] ...1  5175.701468: task_newtask: pid\u003d7730 comm\u003dbash clone_flags\u003d1200011 oom_score_adj\u003d-1000\ngrep-7730  [007] ...2  5175.701993: task_rename: pid\u003d7730 oldcomm\u003dbash newcomm\u003dgrep oom_score_adj\u003d-1000\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-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"
    },
    {
      "commit": "b00f4dc5ff022cb9cbaffd376d9454d7fa1e496f",
      "tree": "40f1b232e2f1e8ac365317a14fdcbcb331722b46",
      "parents": [
        "1eac8111e0763853266a171ce11214da3a347a0a",
        "b9e26dfdad5a4f9cbdaacafac6998614cc9c41bc"
      ],
      "author": {
        "name": "Rafael J. Wysocki",
        "email": "rjw@sisk.pl",
        "time": "Wed Dec 21 21:59:45 2011 +0100"
      },
      "committer": {
        "name": "Rafael J. Wysocki",
        "email": "rjw@sisk.pl",
        "time": "Wed Dec 21 21:59:45 2011 +0100"
      },
      "message": "Merge branch \u0027master\u0027 into pm-sleep\n\n* master: (848 commits)\n  SELinux: Fix RCU deref check warning in sel_netport_insert()\n  binary_sysctl(): fix memory leak\n  mm/vmalloc.c: remove static declaration of va from __get_vm_area_node\n  ipmi_watchdog: restore settings when BMC reset\n  oom: fix integer overflow of points in oom_badness\n  memcg: keep root group unchanged if creation fails\n  nilfs2: potential integer overflow in nilfs_ioctl_clean_segments()\n  nilfs2: unbreak compat ioctl\n  cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask\n  evm: prevent racing during tfm allocation\n  evm: key must be set once during initialization\n  mmc: vub300: fix type of firmware_rom_wait_states module parameter\n  Revert \"mmc: enable runtime PM by default\"\n  mmc: sdhci: remove \"state\" argument from sdhci_suspend_host\n  x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT\n  IB/qib: Correct sense on freectxts increment and decrement\n  RDMA/cma: Verify private data length\n  cgroups: fix a css_set not found bug in cgroup_attach_proc\n  oprofile: Fix uninitialized memory access when writing to writing to oprofilefs\n  Revert \"xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel\"\n  ...\n\nConflicts:\n\tkernel/cgroup_freezer.c\n"
    },
    {
      "commit": "ff05b6f7ae762b6eb464183eec994b28ea09f6dd",
      "tree": "070237daa279229f3245b1498dfb3a81a0f01264",
      "parents": [
        "a41c58a6665cc995e237303b05db42100b71b65e"
      ],
      "author": {
        "name": "Frantisek Hrbata",
        "email": "fhrbata@redhat.com",
        "time": "Mon Dec 19 17:11:59 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 20 10:25:04 2011 -0800"
      },
      "message": "oom: fix integer overflow of points in oom_badness\n\nAn integer overflow will happen on 64bit archs if task\u0027s sum of rss,\nswapents and nr_ptes exceeds (2^31)/1000 value.  This was introduced by\ncommit\n\nf755a04 oom: use pte pages in OOM score\n\nwhere the oom score computation was divided into several steps and it\u0027s no\nlonger computed as one expression in unsigned long(rss, swapents, nr_pte\nare unsigned long), where the result value assigned to points(int) is in\nrange(1..1000).  So there could be an int overflow while computing\n\n176          points *\u003d 1000;\n\nand points may have negative value. Meaning the oom score for a mem hog task\nwill be one.\n\n196          if (points \u003c\u003d 0)\n197                  return 1;\n\nFor example:\n[ 3366]     0  3366 35390480 24303939   5       0             0 oom01\nOut of memory: Kill process 3366 (oom01) score 1 or sacrifice child\n\nHere the oom1 process consumes more than 24303939(rss)*4096~\u003d92GB physical\nmemory, but it\u0027s oom score is one.\n\nIn this situation the mem hog task is skipped and oom killer kills another and\nmost probably innocent task with oom score greater than one.\n\nThe points variable should be of type long instead of int to prevent the\nint overflow.\n\nSigned-off-by: Frantisek Hrbata \u003cfhrbata@redhat.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\t\t[2.6.36+]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a5be2d0d1a8746e7be5210e3d6b904455000443c",
      "tree": "1dcfa2725057a73059a3f768f5f5f7825b5d56ef",
      "parents": [
        "8a32c441c1609f80e55df75422324a1151208f40"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Nov 21 12:32:23 2011 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Nov 21 12:32:23 2011 -0800"
      },
      "message": "freezer: rename thaw_process() to __thaw_task() and simplify the implementation\n\nthaw_process() now has only internal users - system and cgroup\nfreezers.  Remove the unnecessary return value, rename, unexport and\ncollapse __thaw_process() into it.  This will help further updates to\nthe freezer code.\n\n-v3: oom_kill grew a use of thaw_process() while this patch was\n     pending.  Convert it to use __thaw_task() for now.  In the longer\n     term, this should be handled by allowing tasks to die if killed\n     even if it\u0027s frozen.\n\n-v2: minor style update as suggested by Matt.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\n"
    },
    {
      "commit": "5aecc85abdb9ac2b0e6548d13652a34142e7ae89",
      "tree": "8939325e1ab98bce8caf16d9bdd3e57cd73af846",
      "parents": [
        "001ef5e4554b851cf50fe03bc4c266c28ed8e62d"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Nov 15 14:36:07 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Nov 15 22:41:51 2011 -0200"
      },
      "message": "oom: do not kill tasks with oom_score_adj OOM_SCORE_ADJ_MIN\n\nCommit c9f01245 (\"oom: remove oom_disable_count\") has removed the\noom_disable_count counter which has been used for early break out from\noom_badness so we could never select a task with oom_score_adj set to\nOOM_SCORE_ADJ_MIN (oom disabled).\n\nNow that the counter is gone we are always going through heuristics\ncalculation and we always return a non zero positive value.  This means\nthat we can end up killing a task with OOM disabled because it is\nindistinguishable from regular tasks with 1% resp.  CAP_SYS_ADMIN tasks\nwith 3% usage of memory or tasks with oom_score_adj set but OOM enabled.\n\nLet\u0027s break out early if the task should have OOM disabled.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "32aaeffbd4a7457bf2f7448b33b5946ff2a960eb",
      "tree": "faf7ad871d87176423ff9ed1d1ba4d9c688fc23f",
      "parents": [
        "208bca0860406d16398145ddd950036a737c3c9d",
        "67b84999b1a8b1af5625b1eabe92146c5eb42932"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 19:44:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 19:44:47 2011 -0800"
      },
      "message": "Merge branch \u0027modsplit-Oct31_2011\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux\n\n* \u0027modsplit-Oct31_2011\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)\n  Revert \"tracing: Include module.h in define_trace.h\"\n  irq: don\u0027t put module.h into irq.h for tracking irqgen modules.\n  bluetooth: macroize two small inlines to avoid module.h\n  ip_vs.h: fix implicit use of module_get/module_put from module.h\n  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence\n  include: replace linux/module.h with \"struct module\" wherever possible\n  include: convert various register fcns to macros to avoid include chaining\n  crypto.h: remove unused crypto_tfm_alg_modname() inline\n  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE\n  pm_runtime.h: explicitly requires notifier.h\n  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h\n  miscdevice.h: fix up implicit use of lists and types\n  stop_machine.h: fix implicit use of smp.h for smp_processor_id\n  of: fix implicit use of errno.h in include/linux/of.h\n  of_platform.h: delete needless include \u003clinux/module.h\u003e\n  acpi: remove module.h include from platform/aclinux.h\n  miscdevice.h: delete unnecessary inclusion of module.h\n  device_cgroup.h: delete needless include \u003clinux/module.h\u003e\n  net: sch_generic remove redundant use of \u003clinux/module.h\u003e\n  net: inet_timewait_sock doesnt need \u003clinux/module.h\u003e\n  ...\n\nFix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in\n - drivers/media/dvb/frontends/dibx000_common.c\n - drivers/media/video/{mt9m111.c,ov6650.c}\n - drivers/mfd/ab3550-core.c\n - include/linux/dmaengine.h\n"
    },
    {
      "commit": "43362a4977e37db46f86f7e6ab935f0006956632",
      "tree": "5ab7070237ebd3f40d7fcfc0066586422da8310a",
      "parents": [
        "c9f01245b6a7d77d17deaa71af10f6aca14fa24e"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Oct 31 17:07:18 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:45 2011 -0700"
      },
      "message": "oom: fix race while temporarily setting current\u0027s oom_score_adj\n\ntest_set_oom_score_adj() was introduced in 72788c385604 (\"oom: replace\nPF_OOM_ORIGIN with toggling oom_score_adj\") to temporarily elevate\ncurrent\u0027s oom_score_adj for ksm and swapoff without requiring an\nadditional per-process flag.\n\nUsing that function to both set oom_score_adj to OOM_SCORE_ADJ_MAX and\nthen reinstate the previous value is racy since it\u0027s possible that\nuserspace can set the value to something else itself before the old value\nis reinstated.  That results in userspace setting current\u0027s oom_score_adj\nto a different value and then the kernel immediately setting it back to\nits previous value without notification.\n\nTo fix this, a new compare_swap_oom_score_adj() function is introduced\nwith the same semantics as the compare and swap CAS instruction, or\nCMPXCHG on x86.  It is used to reinstate the previous value of\noom_score_adj if and only if the present value is the same as the old\nvalue.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "c9f01245b6a7d77d17deaa71af10f6aca14fa24e",
      "tree": "13ffde591a5bcefba39cb6393f09b27f1ebc1a30",
      "parents": [
        "7b0d44fa49b1dcfdcf4897f12ddd12ddeab1a9d7"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Oct 31 17:07:15 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:45 2011 -0700"
      },
      "message": "oom: remove oom_disable_count\n\nThis removes mm-\u003eoom_disable_count entirely since it\u0027s unnecessary and\ncurrently buggy.  The counter was intended to be per-process but it\u0027s\ncurrently decremented in the exit path for each thread that exits, causing\nit to underflow.\n\nThe count was originally intended to prevent oom killing threads that\nshare memory with threads that cannot be killed since it doesn\u0027t lead to\nfuture memory freeing.  The counter could be fixed to represent all\nthreads sharing the same mm, but it\u0027s better to remove the count since:\n\n - it is possible that the OOM_DISABLE thread sharing memory with the\n   victim is waiting on that thread to exit and will actually cause\n   future memory freeing, and\n\n - there is no guarantee that a thread is disabled from oom killing just\n   because another thread sharing its mm is oom disabled.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReported-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nReviewed-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "7b0d44fa49b1dcfdcf4897f12ddd12ddeab1a9d7",
      "tree": "c840608f5266e4ba783f4c4405efe89b69ae5754",
      "parents": [
        "f660daac474c6f7c2d710100e29b3276a6f4db0a"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Oct 31 17:07:11 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:45 2011 -0700"
      },
      "message": "oom: avoid killing kthreads if they assume the oom killed thread\u0027s mm\n\nAfter selecting a task to kill, the oom killer iterates all processes and\nkills all other threads that share the same mm_struct in different thread\ngroups.  It would not otherwise be helpful to kill a thread if its memory\nwould not be subsequently freed.\n\nA kernel thread, however, may assume a user thread\u0027s mm by using\nuse_mm().  This is only temporary and should not result in sending a\nSIGKILL to that kthread.\n\nThis patch ensures that only user threads and not kthreads are sent a\nSIGKILL if they share the same mm_struct as the oom killed task.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "f660daac474c6f7c2d710100e29b3276a6f4db0a",
      "tree": "ad142e254a7b804cb158f2c64e9e6a77e8e4388c",
      "parents": [
        "d08c429b06d21bd2add88aea2cd1996f1b9b3bda"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Oct 31 17:07:07 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:45 2011 -0700"
      },
      "message": "oom: thaw threads if oom killed thread is frozen before deferring\n\nIf a thread has been oom killed and is frozen, thaw it before returning to\nthe page allocator.  Otherwise, it can stay frozen indefinitely and no\nmemory will be freed.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReported-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b95f1b31b75588306e32b2afd32166cad48f670b",
      "tree": "b5496144e41b117cfe5ae70b145b5351709ec4d0",
      "parents": [
        "b9e15bafdf1aa20791cdefdcbf1ccf7d7aa03aaa"
      ],
      "author": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Sun Oct 16 02:01:52 2011 -0400"
      },
      "committer": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Mon Oct 31 09:20:12 2011 -0400"
      },
      "message": "mm: Map most files to use export.h instead of module.h\n\nThe files changed within are only using the EXPORT_SYMBOL\nmacro variants.  They are not using core modular infrastructure\nand hence don\u0027t need module.h but only the export.h header.\n\nSigned-off-by: Paul Gortmaker \u003cpaul.gortmaker@windriver.com\u003e\n"
    },
    {
      "commit": "c027a474a68065391c8773f6e83ed5412657e369",
      "tree": "6d3c8caba5ebf736c3f9ef3cacb708cbdb9869c2",
      "parents": [
        "cfe22345ad5ef29e192e157fdc3e17d357e4bc24"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Sat Jul 30 16:35:02 2011 +0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 01 15:24:12 2011 -1000"
      },
      "message": "oom: task-\u003emm \u003d\u003d NULL doesn\u0027t mean the memory was freed\n\nexit_mm() sets -\u003emm \u003d\u003d NULL then it does mmput()-\u003eexit_mmap() which\nfrees the memory.\n\nHowever select_bad_process() checks -\u003emm !\u003d NULL before TIF_MEMDIE,\nso it continues to kill other tasks even if we have the oom-killed\ntask freeing its memory.\n\nChange select_bad_process() to check -\u003emm after TIF_MEMDIE, but skip\nthe tasks which have already passed exit_notify() to ensure a zombie\nwith TIF_MEMDIE set can\u0027t block oom-killer. Alternatively we could\nprobably clear TIF_MEMDIE after exit_mmap().\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "11239836c04b50ba8453ec58ca7a7bd716ef02c1",
      "tree": "358705632aecb348e35f01fcc26281326d5a514a",
      "parents": [
        "6ac47520063b230641a64062b8a229201cd0a3a8"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Jul 25 17:12:17 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jul 25 20:57:09 2011 -0700"
      },
      "message": "oom: remove references to old badness() function\n\nThe badness() function in the oom killer was renamed to oom_badness() in\na63d83f427fb (\"oom: badness heuristic rewrite\") since it is a globally\nexported function for clarity.\n\nThe prototype for the old function still existed in linux/oom.h, so remove\nit.  There are no existing users.\n\nAlso fixes documentation and comment references to badness() and adjusts\nthem accordingly.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "d21142ece414ce1088cfcae760689aa60d6fee80",
      "tree": "9f97b4518cd06fe695476fc6cc4ff9ed8d5bdd58",
      "parents": [
        "544b2c91a9f14f9565af1972203438b7f49afd48"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jun 17 16:50:34 2011 +0200"
      },
      "committer": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Wed Jun 22 19:26:27 2011 +0200"
      },
      "message": "ptrace: kill task_ptrace()\n\ntask_ptrace(task) simply dereferences task-\u003eptrace and isn\u0027t even used\nconsistently only adding confusion.  Kill it and directly access\n-\u003eptrace instead.\n\nThis doesn\u0027t introduce any behavior change.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "72788c385604523422592249c19cba0187021e9b",
      "tree": "3552a4b6ae4adb77e723d8a8d1d2669bfb04a8bb",
      "parents": [
        "c6a140bf164829769499b5e50d380893da39b29e"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue May 24 17:11:40 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 25 08:39:10 2011 -0700"
      },
      "message": "oom: replace PF_OOM_ORIGIN with toggling oom_score_adj\n\nThere\u0027s a kernel-wide shortage of per-process flags, so it\u0027s always\nhelpful to trim one when possible without incurring a significant penalty.\n It\u0027s even more important when you\u0027re planning on adding a per- process\nflag yourself, which I plan to do shortly for transparent hugepages.\n\nPF_OOM_ORIGIN is used by ksm and swapoff to prefer current since it has a\ntendency to allocate large amounts of memory and should be preferred for\nkilling over other tasks.  We\u0027d rather immediately kill the task making\nthe errant syscall rather than penalizing an innocent task.\n\nThis patch removes PF_OOM_ORIGIN since its behavior is equivalent to\nsetting the process\u0027s oom_score_adj to OOM_SCORE_ADJ_MAX.\n\nThe process\u0027s old oom_score_adj is stored and then set to\nOOM_SCORE_ADJ_MAX during the time it used to have PF_OOM_ORIGIN.  The old\nvalue is then reinstated when the process should no longer be considered a\nhigh priority for oom killing.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: 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"
    },
    {
      "commit": "f755a042d82b51b54f3bdd0890e5ea56c0fb6807",
      "tree": "15c51ff44a31c4686dbc7161184ef7f306010e0c",
      "parents": [
        "0dcecae203cd407678e7257efbc9cdd0130967cf"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Apr 27 15:26:50 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 28 11:28:21 2011 -0700"
      },
      "message": "oom: use pte pages in OOM score\n\nPTE pages eat up memory just like anything else, but we do not account for\nthem in any way in the OOM scores.  They are also _guaranteed_ to get\nfreed up when a process is OOM killed, while RSS is not.\n\nReported-by: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.36+]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "341aea2bc48bf652777fb015cc2b3dfa9a451817",
      "tree": "46846e06674fdf45542ed3101c7a55aa31a577af",
      "parents": [
        "929bea7c714220fc76ce3f75bef9056477c28e74"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Apr 14 15:22:13 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 14 16:06:56 2011 -0700"
      },
      "message": "oom-kill: remove boost_dying_task_prio()\n\nThis is an almost-revert of commit 93b43fa (\"oom: give the dying task a\nhigher priority\").\n\nThat commit dramatically improved oom killer logic when a fork-bomb\noccurs.  But I\u0027ve found that it has nasty corner case.  Now cpu cgroup has\nstrange default RT runtime.  It\u0027s 0!  That said, if a process under cpu\ncgroup promote RT scheduling class, the process never run at all.\n\nIf an admin inserts a !RT process into a cpu cgroup by setting\nrtruntime\u003d0, usually it runs perfectly because a !RT task isn\u0027t affected\nby the rtruntime knob.  But if it promotes an RT task via an explicit\nsetscheduler() syscall or an OOM, the task can\u0027t run at all.  In short,\nthe oom killer doesn\u0027t work at all if admins are using cpu cgroup and don\u0027t\ntouch the rtruntime knob.\n\nEventually, kernel may hang up when oom kill occur.  I and the original\nauthor Luis agreed to disable this logic.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Luis Claudio R. Goncalves \u003clclaudio@uudg.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b2b755b5f10eb32fbdc73a9907c07006b17f714b",
      "tree": "444c7a93cc6c3dd109a4b23f1f76cdc38cf5eb10",
      "parents": [
        "e285c1746accb80620e511f9c72e9893beeedc0e"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Thu Mar 24 15:18:15 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 24 17:49:37 2011 -0700"
      },
      "message": "lib, arch: add filter argument to show_mem and fix private implementations\n\nCommit ddd588b5dd55 (\"oom: suppress nodes that are not allowed from\nmeminfo on oom kill\") moved lib/show_mem.o out of lib/lib.a, which\nresulted in build warnings on all architectures that implement their own\nversions of show_mem():\n\n\tlib/lib.a(show_mem.o): In function `show_mem\u0027:\n\tshow_mem.c:(.text+0x1f4): multiple definition of `show_mem\u0027\n\tarch/sparc/mm/built-in.o:(.text+0xd70): first defined here\n\nThe fix is to remove __show_mem() and add its argument to show_mem() in\nall implementations to prevent this breakage.\n\nArchitectures that implement their own show_mem() actually don\u0027t do\nanything with the argument yet, but they could be made to filter nodes\nthat aren\u0027t allowed in the current context in the future just like the\ngeneric implementation.\n\nReported-by: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nReported-by: James Bottomley \u003cJames.Bottomley@hansenpartnership.com\u003e\nSuggested-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f9434ad1552427fab49336e1a6e3ef121895b9d1",
      "tree": "5284bccbf71e601d056d138e894c27726047dc82",
      "parents": [
        "5a6475a4e162200f43855e2d42bbf55bcca1a9f2"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 23 16:42:44 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 23 19:46:33 2011 -0700"
      },
      "message": "memcg: give current access to memory reserves if it\u0027s trying to die\n\nWhen a memcg is oom and current has already received a SIGKILL, then give\nit access to memory reserves with a higher scheduling priority so that it\nmay quickly exit and free its memory.\n\nThis is identical to the global oom killer and is done even before\nchecking for panic_on_oom: a pending SIGKILL here while panic_on_oom is\nselected is guaranteed to have come from userspace; the thread only needs\naccess to memory reserves to exit and thus we don\u0027t unnecessarily panic\nthe machine until the kernel has no last resort to free memory.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-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"
    },
    {
      "commit": "ddd588b5dd55f14320379961e47683db4e4c1d90",
      "tree": "09de73c51c8c5e701e644236890a5d205ec3cdc9",
      "parents": [
        "94dcf29a11b3d20a28790598d701f98484a969da"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Mar 22 16:30:46 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:01 2011 -0700"
      },
      "message": "oom: suppress nodes that are not allowed from meminfo on oom kill\n\nThe oom killer is extremely verbose for machines with a large number of\ncpus and/or nodes.  This verbosity can often be harmful if it causes other\nimportant messages to be scrolled from the kernel log and incurs a\nsignicant time delay, specifically for kernels with CONFIG_NODES_SHIFT \u003e\n8.\n\nThis patch causes only memory information to be displayed for nodes that\nare allowed by current\u0027s cpuset when dumping the VM state.  Information\nfor all other nodes is irrelevant to the oom condition; we don\u0027t care if\nthere\u0027s an abundance of memory elsewhere if we can\u0027t access it.\n\nThis only affects the behavior of dumping memory information when an oom\nis triggered.  Other dumps, such as for sysrq+m, still display the\nunfiltered form when using the existing show_mem() interface.\n\nAdditionally, the per-cpu pageset statistics are extremely verbose in oom\nkiller output, so it is now suppressed.  This removes\n\n\tnodes_weight(current-\u003emems_allowed) * (1 + nr_cpus)\n\nlines from the oom killer output.\n\nCallers may use __show_mem(SHOW_MEM_FILTER_NODES) to filter disallowed\nnodes.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "edd45544c6f09550df0a5491aa8a07af24767e73",
      "tree": "a44ec26701ed430b68ee3b045b6575462d15af71",
      "parents": [
        "30e2b41f20b6238f51e7cffb879c7a0f0073f5fe"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Mar 22 16:30:12 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:43:58 2011 -0700"
      },
      "message": "oom: avoid deferring oom killer if exiting task is being traced\n\nThe oom killer naturally defers killing anything if it finds an eligible\ntask that is already exiting and has yet to detach its -\u003emm.  This avoids\nunnecessarily killing tasks when one is already in the exit path and may\nfree enough memory that the oom killer is no longer needed.  This is\ndetected by PF_EXITING since threads that have already detached its -\u003emm\nare no longer considered at all.\n\nThe problem with always deferring when a thread is PF_EXITING, however, is\nthat it may never actually exit when being traced, specifically if another\ntask is tracing it with PTRACE_O_TRACEEXIT.  The oom killer does not want\nto defer in this case since there is no guarantee that thread will ever\nexit without intervention.\n\nThis patch will now only defer the oom killer when a thread is PF_EXITING\nand no ptracer has stopped its progress in the exit path.  It also ensures\nthat a child is sacrificed for the chosen parent only if it has a\ndifferent -\u003emm as the comment implies: this ensures that the thread group\nleader is always targeted appropriately.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReported-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Andrey Vagin \u003cavagin@openvz.org\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.38.x]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "30e2b41f20b6238f51e7cffb879c7a0f0073f5fe",
      "tree": "fc1bdcfd516bbf67cf6c5c36f903a299c1ac03df",
      "parents": [
        "3a5dda7a17cf3706f79b86293f29db02d61e0d48"
      ],
      "author": {
        "name": "Andrey Vagin",
        "email": "avagin@openvz.org",
        "time": "Tue Mar 22 16:30:11 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:43:58 2011 -0700"
      },
      "message": "oom: skip zombies when iterating tasklist\n\nWe shouldn\u0027t defer oom killing if a thread has already detached its -\u003emm\nand still has TIF_MEMDIE set.  Memory needs to be freed, so find kill\nother threads that pin the same -\u003emm or find another task to kill.\n\nSigned-off-by: Andrey Vagin \u003cavagin@openvz.org\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.38.x]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3a5dda7a17cf3706f79b86293f29db02d61e0d48",
      "tree": "0d173f484968b7e08cf3f75006450b62e1521227",
      "parents": [
        "52c50567d8ab0a0a87f12cceaa4194967854f0bd"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Mar 22 16:30:09 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:43:58 2011 -0700"
      },
      "message": "oom: prevent unnecessary oom kills or kernel panics\n\nThis patch prevents unnecessary oom kills or kernel panics by reverting\ntwo commits:\n\n\t495789a5 (oom: make oom_score to per-process value)\n\tcef1d352 (oom: multi threaded process coredump don\u0027t make deadlock)\n\nFirst, 495789a5 (oom: make oom_score to per-process value) ignores the\nfact that all threads in a thread group do not necessarily exit at the\nsame time.\n\nIt is imperative that select_bad_process() detect threads that are in the\nexit path, specifically those with PF_EXITING set, to prevent needlessly\nkilling additional tasks.  If a process is oom killed and the thread group\nleader exits, select_bad_process() cannot detect the other threads that\nare PF_EXITING by iterating over only processes.  Thus, it currently\nchooses another task unnecessarily for oom kill or panics the machine when\nnothing else is eligible.\n\nBy iterating over threads instead, it is possible to detect threads that\nare exiting and nominate them for oom kill so they get access to memory\nreserves.\n\nSecond, cef1d352 (oom: multi threaded process coredump don\u0027t make\ndeadlock) erroneously avoids making the oom killer a no-op when an\neligible thread other than current isfound to be exiting.  We want to\ndetect this situation so that we may allow that exiting thread time to\nexit and free its memory; if it is able to exit on its own, that should\nfree memory so current is no loner oom.  If it is not able to exit on its\nown, the oom killer will nominate it for oom kill which, in this case,\nonly means it will get access to memory reserves.\n\nWithout this change, it is easy for the oom killer to unnecessarily target\ntasks when all threads of a victim don\u0027t exit before the thread group\nleader or, in the worst case, panic the machine.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Andrey Vagin \u003cavagin@openvz.org\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.38.x]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "52d3c03675fdbe1965b9b1909072b40ad2f80063",
      "tree": "2261f8576d1317c5810edc326be0dfff964c254f",
      "parents": [
        "dc1b83ab08f1954335692cdcd499f78c94f4c42a"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 14 15:17:07 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 14 15:17:07 2011 -0700"
      },
      "message": "Revert \"oom: oom_kill_process: fix the child_points logic\"\n\nThis reverts the parent commit.  I hate doing that, but it\u0027s generating\nsome discussion (\"half of it is right\"), and since I am planning on\ndoing the 2.6.38 release later today we can punt it to stable if\nrequired. Let\u0027s not rock the boat right now.\n\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dc1b83ab08f1954335692cdcd499f78c94f4c42a",
      "tree": "e05f9760a40c2560e500762b13ef81b37f153b9d",
      "parents": [
        "5f40d4209461f23a15d88c6b55993bb8b0fa2670"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Mar 14 20:05:30 2011 +0100"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 14 13:38:35 2011 -0700"
      },
      "message": "oom: oom_kill_process: fix the child_points logic\n\noom_kill_process() starts with victim_points \u003d\u003d 0.  This means that\n(most likely) any child has more points and can be killed erroneously.\n\nAlso, \"children has a different mm\" doesn\u0027t match the reality, we should\ncheck child-\u003emm !\u003d t-\u003emm.  This check is not exactly correct if t-\u003emm \u003d\u003d\nNULL but this doesn\u0027t really matter, oom_kill_task() will kill them\nanyway.\n\nNote: \"Kill all processes sharing p-\u003emm\" in oom_kill_task() is wrong\ntoo.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1e99bad0d9c12a4aaa60cd812c84ef152564bcf5",
      "tree": "af9b070096c2ccc567247ff507eb07d3d817a1b4",
      "parents": [
        "e18641e19a9204f241f04a5ac700168dcd18de4f"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Oct 26 14:21:24 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 26 16:52:05 2010 -0700"
      },
      "message": "oom: kill all threads sharing oom killed task\u0027s mm\n\nIt\u0027s necessary to kill all threads that share an oom killed task\u0027s mm if\nthe goal is to lead to future memory freeing.\n\nThis patch reintroduces the code removed in 8c5cd6f3 (oom: oom_kill\ndoesn\u0027t kill vfork parent (or child)) since it is obsoleted.\n\nIt\u0027s now guaranteed that any task passed to oom_kill_task() does not share\nan mm with any thread that is unkillable.  Thus, we\u0027re safe to issue a\nSIGKILL to any thread sharing the same mm.\n\nThis is especially necessary to solve an mm-\u003emmap_sem livelock issue\nwhereas an oom killed thread must acquire the lock in the exit path while\nanother thread is holding it in the page allocator while trying to\nallocate memory itself (and will preempt the oom killer since a task was\nalready killed).  Since tasks with pending fatal signals are now granted\naccess to memory reserves, the thread holding the lock may quickly\nallocate and release the lock so that the oom killed task may exit.\n\nThis mainly is for threads that are cloned with CLONE_VM but not\nCLONE_THREAD, so they are in a different thread group.  Non-NPTL threads\nexist in the wild and this change is necessary to prevent the livelock in\nsuch cases.  We care more about preventing the livelock than incurring the\nadditional tasklist in the oom killer when a task has been killed.\nSystems that are sufficiently large to not want the tasklist scan in the\noom killer in the first place already have the option of enabling\n/proc/sys/vm/oom_kill_allocating_task, which was designed specifically for\nthat purpose.\n\nThis code had existed in the oom killer for over eight years dating back\nto the 2.4 kernel.\n\n[akpm@linux-foundation.org: add nice comment]\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e18641e19a9204f241f04a5ac700168dcd18de4f",
      "tree": "f1058203588bd31584d217a25fabe4f7085a1f44",
      "parents": [
        "3d5992d2ac7dc09aed8ab537cba074589f0f0a52"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Oct 26 14:21:23 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 26 16:52:05 2010 -0700"
      },
      "message": "oom: avoid killing a task if a thread sharing its mm cannot be killed\n\nThe oom killer\u0027s goal is to kill a memory-hogging task so that it may\nexit, free its memory, and allow the current context to allocate the\nmemory that triggered it in the first place.  Thus, killing a task is\npointless if other threads sharing its mm cannot be killed because of its\n/proc/pid/oom_adj or /proc/pid/oom_score_adj value.\n\nThis patch checks whether any other thread sharing p-\u003emm has an\noom_score_adj of OOM_SCORE_ADJ_MIN.  If so, the thread cannot be killed\nand oom_badness(p) returns 0, meaning it\u0027s unkillable.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e85bfd3aa7a34fa963bb268a676b41694e6dcf96",
      "tree": "6d92d25d390668879fe952e6b6068d774d0471b4",
      "parents": [
        "fd02db9de73faebc51240619c7c7f99bee9f65c7"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Sep 22 13:05:10 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Sep 22 17:22:39 2010 -0700"
      },
      "message": "oom: filter unkillable tasks from tasklist dump\n\n/proc/sys/vm/oom_dump_tasks is enabled by default, so it\u0027s necessary to\nlimit as much information as possible that it should emit.\n\nThe tasklist dump should be filtered to only those tasks that are eligible\nfor oom kill.  This is already done for memcg ooms, but this patch extends\nit to both cpuset and mempolicy ooms as well as init.\n\nIn addition to suppressing irrelevant information, this also reduces\nconfusion since users currently don\u0027t know which tasks in the tasklist\naren\u0027t eligible for kill (such as those attached to cpusets or bound to\nmempolicies with a disjoint set of mems or nodes, respectively) since that\ninformation is not shown.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: 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"
    },
    {
      "commit": "f19e8aa11afa24036c6273428da51949b5acf30c",
      "tree": "e768541c3b83ffe488119f77ef178cdf97f9bece",
      "parents": [
        "767b68e96993e29e3480d7ecdd9c4b84667c5762"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Sep 22 13:04:52 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Sep 22 17:22:38 2010 -0700"
      },
      "message": "oom: always return a badness score of non-zero for eligible tasks\n\nA task\u0027s badness score is roughly a proportion of its rss and swap\ncompared to the system\u0027s capacity.  The scale ranges from 0 to 1000 with\nthe highest score chosen for kill.  Thus, this scale operates on a\nresolution of 0.1% of RAM + swap.  Admin tasks are also given a 3% bonus,\nso the badness score of an admin task using 3% of memory, for example,\nwould still be 0.\n\nIt\u0027s possible that an exceptionally large number of tasks will combine to\nexhaust all resources but never have a single task that uses more than\n0.1% of RAM and swap (or 3.0% for admin tasks).\n\nThis patch ensures that the badness score of any eligible task is never 0\nso the machine doesn\u0027t unnecessarily panic because it cannot find a task\nto kill.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Nitin Gupta \u003cngupta@vflare.org\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "8d6c83f0ba5e1bd1e8bb2e3c7de4c276dc247f99",
      "tree": "58b777adffdaf754b97e6359a325bccdd8919346",
      "parents": [
        "b52723c5607f7684c2c0c075f86f86da0d7fb6d0"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Aug 19 14:13:39 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Aug 20 09:34:55 2010 -0700"
      },
      "message": "oom: __task_cred() need rcu_read_lock()\n\ndump_tasks() needs to hold the RCU read lock around its access of the\ntarget task\u0027s UID.  To this end it should use task_uid() as it only needs\nthat one thing from the creds.\n\nThe fact that dump_tasks() holds tasklist_lock is insufficient to prevent the\ntarget process replacing its credentials on another CPU.\n\nThen, this patch change to call rcu_read_lock() explicitly.\n\n\t\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\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\t[ INFO: suspicious rcu_dereference_check() usage. ]\n\t---------------------------------------------------\n\tmm/oom_kill.c:410 invoked rcu_dereference_check() without protection!\n\n\tother info that might help us debug this:\n\n\trcu_scheduler_active \u003d 1, debug_locks \u003d 1\n\t4 locks held by kworker/1:2/651:\n\t #0:  (events){+.+.+.}, at: [\u003cffffffff8106aae7\u003e]\n\tprocess_one_work+0x137/0x4a0\n\t #1:  (moom_work){+.+...}, at: [\u003cffffffff8106aae7\u003e]\n\tprocess_one_work+0x137/0x4a0\n\t #2:  (tasklist_lock){.+.+..}, at: [\u003cffffffff810fafd4\u003e]\n\tout_of_memory+0x164/0x3f0\n\t #3:  (\u0026(\u0026p-\u003ealloc_lock)-\u003erlock){+.+...}, at: [\u003cffffffff810fa48e\u003e]\n\tfind_lock_task_mm+0x2e/0x70\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Paul E. McKenney \u003cpaulmck@linux.vnet.ibm.com\u003e\nAcked-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"
    },
    {
      "commit": "b52723c5607f7684c2c0c075f86f86da0d7fb6d0",
      "tree": "97db08ef9d74c8fcacff6a96070854a5bc276419",
      "parents": [
        "be71cf2202971e50ce4953d473649c724799eb8a"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Aug 19 14:13:39 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Aug 20 09:34:55 2010 -0700"
      },
      "message": "oom: fix tasklist_lock leak\n\nCommit 0aad4b3124 (\"oom: fold __out_of_memory into out_of_memory\")\nintroduced a tasklist_lock leak.  Then it caused following obvious\ndanger warnings and panic.\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\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n    [ BUG: lock held when returning to user space! ]\n    ------------------------------------------------\n    rsyslogd/1422 is leaving the kernel with locks still held!\n    1 lock held by rsyslogd/1422:\n     #0:  (tasklist_lock){.+.+.+}, at: [\u003cffffffff810faf64\u003e] out_of_memory+0x164/0x3f0\n    BUG: scheduling while atomic: rsyslogd/1422/0x00000002\n    INFO: lockdep is turned off.\n\nThis patch fixes it.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-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"
    },
    {
      "commit": "be71cf2202971e50ce4953d473649c724799eb8a",
      "tree": "4bc4b927c3f55c12128929ab0d52e061c2a257ec",
      "parents": [
        "f522886e202a34a2191dd5d471b3c4d46410a9a0"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Aug 19 14:13:38 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Aug 20 09:34:55 2010 -0700"
      },
      "message": "oom: fix NULL pointer dereference\n\nCommit b940fd7035 (\"oom: remove unnecessary code and cleanup\") added an\nunnecessary NULL pointer dereference.  remove it.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-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"
    },
    {
      "commit": "158e0a2d1b3cffed8b46cbc56393a1394672ef79",
      "tree": "a044d53137609fdfc8c1afdde366b3e205c96eda",
      "parents": [
        "73045c47b6facbdf4656e6763c8cb469de4337e2"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Aug 10 18:03:00 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 11 08:59:19 2010 -0700"
      },
      "message": "memcg: use find_lock_task_mm() in memory cgroups oom\n\nWhen the OOM killer scans task, it check a task is under memcg or\nnot when it\u0027s called via memcg\u0027s context.\n\nBut, as Oleg pointed out, a thread group leader may have NULL -\u003emm\nand task_in_mem_cgroup() may do wrong decision. We have to use\nfind_lock_task_mm() in memcg as generic OOM-Killer does.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a63d83f427fbce97a6cea0db2e64b0eb8435cd10",
      "tree": "8ac229cdf6e2289d97e82e35774057106fe7f4a2",
      "parents": [
        "74bcbf40546bb7500f2a7ba4ff3cc056a6bd004a"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:19:46 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:02 2010 -0700"
      },
      "message": "oom: badness heuristic rewrite\n\nThis a complete rewrite of the oom killer\u0027s badness() heuristic which is\nused to determine which task to kill in oom conditions.  The goal is to\nmake it as simple and predictable as possible so the results are better\nunderstood and we end up killing the task which will lead to the most\nmemory freeing while still respecting the fine-tuning from userspace.\n\nInstead of basing the heuristic on mm-\u003etotal_vm for each task, the task\u0027s\nrss and swap space is used instead.  This is a better indication of the\namount of memory that will be freeable if the oom killed task is chosen\nand subsequently exits.  This helps specifically in cases where KDE or\nGNOME is chosen for oom kill on desktop systems instead of a memory\nhogging task.\n\nThe baseline for the heuristic is a proportion of memory that each task is\ncurrently using in memory plus swap compared to the amount of \"allowable\"\nmemory.  \"Allowable,\" in this sense, means the system-wide resources for\nunconstrained oom conditions, the set of mempolicy nodes, the mems\nattached to current\u0027s cpuset, or a memory controller\u0027s limit.  The\nproportion is given on a scale of 0 (never kill) to 1000 (always kill),\nroughly meaning that if a task has a badness() score of 500 that the task\nconsumes approximately 50% of allowable memory resident in RAM or in swap\nspace.\n\nThe proportion is always relative to the amount of \"allowable\" memory and\nnot the total amount of RAM systemwide so that mempolicies and cpusets may\noperate in isolation; they shall not need to know the true size of the\nmachine on which they are running if they are bound to a specific set of\nnodes or mems, respectively.\n\nRoot tasks are given 3% extra memory just like __vm_enough_memory()\nprovides in LSMs.  In the event of two tasks consuming similar amounts of\nmemory, it is generally better to save root\u0027s task.\n\nBecause of the change in the badness() heuristic\u0027s baseline, it is also\nnecessary to introduce a new user interface to tune it.  It\u0027s not possible\nto redefine the meaning of /proc/pid/oom_adj with a new scale since the\nABI cannot be changed for backward compatability.  Instead, a new tunable,\n/proc/pid/oom_score_adj, is added that ranges from -1000 to +1000.  It may\nbe used to polarize the heuristic such that certain tasks are never\nconsidered for oom kill while others may always be considered.  The value\nis added directly into the badness() score so a value of -500, for\nexample, means to discount 50% of its memory consumption in comparison to\nother tasks either on the system, bound to the mempolicy, in the cpuset,\nor sharing the same memory controller.\n\n/proc/pid/oom_adj is changed so that its meaning is rescaled into the\nunits used by /proc/pid/oom_score_adj, and vice versa.  Changing one of\nthese per-task tunables will rescale the value of the other to an\nequivalent meaning.  Although /proc/pid/oom_adj was originally defined as\na bitshift on the badness score, it now shares the same linear growth as\n/proc/pid/oom_score_adj but with different granularity.  This is required\nso the ABI is not broken with userspace applications and allows oom_adj to\nbe deprecated for future removal.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Nick Piggin \u003cnpiggin@suse.de\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "cef1d3523d33ebc35fc29e454b1f4bab953fabbf",
      "tree": "3688cf9e7c3b1bd4e1d473d79fd1a959bd4306fb",
      "parents": [
        "93b43fa55088fe977503a156d1097cc2055449a2"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:42 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:02 2010 -0700"
      },
      "message": "oom: multi threaded process coredump don\u0027t make deadlock\n\nOleg pointed out current PF_EXITING check is wrong. Because PF_EXITING\nis per-thread flag, not per-process flag. He said,\n\n   Two threads, group-leader L and its sub-thread T. T dumps the code.\n   In this case both threads have -\u003emm !\u003d NULL, L has PF_EXITING.\n\n   The first problem is, select_bad_process() always return -1 in this\n   case (even if the caller is T, this doesn\u0027t matter).\n\n   The second problem is that we should add TIF_MEMDIE to T, not L.\n\nI think we can remove this dubious PF_EXITING check. but as first step,\nThis patch add the protection of multi threaded issue.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: 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"
    },
    {
      "commit": "93b43fa55088fe977503a156d1097cc2055449a2",
      "tree": "32c688e20c3ac9b30edd9c240c98f2f779b20e67",
      "parents": [
        "19b4586cd9c8ed642798902e55c6f61ed576ad93"
      ],
      "author": {
        "name": "Luis Claudio R. Goncalves",
        "email": "lclaudio@uudg.org",
        "time": "Mon Aug 09 17:19:41 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:02 2010 -0700"
      },
      "message": "oom: give the dying task a higher priority\n\nIn a system under heavy load it was observed that even after the\noom-killer selects a task to die, the task may take a long time to die.\n\nRight after sending a SIGKILL to the task selected by the oom-killer this\ntask has its priority increased so that it can exit() soon, freeing\nmemory.  That is accomplished by:\n\n        /*\n         * We give our sacrificial lamb high priority and access to\n         * all the memory it needs. That way it should be able to\n         * exit() and clear out its resources quickly...\n         */\n \tp-\u003ert.time_slice \u003d HZ;\n \tset_tsk_thread_flag(p, TIF_MEMDIE);\n\nIt sounds plausible giving the dying task an even higher priority to be\nsure it will be scheduled sooner and free the desired memory.  It was\nsuggested on LKML using SCHED_FIFO:1, the lowest RT priority so that this\ntask won\u0027t interfere with any running RT task.\n\nIf the dying task is already an RT task, leave it untouched.  Another good\nsuggestion, implemented here, was to avoid boosting the dying task\npriority in case of mem_cgroup OOM.\n\nSigned-off-by: Luis Claudio R. Goncalves \u003clclaudio@uudg.org\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "19b4586cd9c8ed642798902e55c6f61ed576ad93",
      "tree": "9db6c100cbb1337b584e0b7011ee1c736a210cd0",
      "parents": [
        "df1090a8dda40b6e11d8cd09e8fc900cfe913b38"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:39 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:02 2010 -0700"
      },
      "message": "oom: remove child-\u003emm check from oom_kill_process()\n\nThe current \"child-\u003emm \u003d\u003d p-\u003emm\" check prevents selection of vfork()ed\ntask.  But we don\u0027t have any reason to don\u0027t consider vfork().\n\nRemoved.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "df1090a8dda40b6e11d8cd09e8fc900cfe913b38",
      "tree": "9bc8a81f66a0a3a8c29685fba7389378fe9f768c",
      "parents": [
        "a96cfd6e9176ad442233001b7d15e9ed42234320"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:39 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:01 2010 -0700"
      },
      "message": "oom: cleanup has_intersects_mems_allowed()\n\npresently has_intersects_mems_allowed() has own thread iterate logic, but\nit should use while_each_thread().\n\nIt slightly improve the code readability.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "a96cfd6e9176ad442233001b7d15e9ed42234320",
      "tree": "6aa70841f3f2c3ff39a75d0014b9a235810ccd08",
      "parents": [
        "113e27f36dff9895049df324f292474854750d21"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:38 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:01 2010 -0700"
      },
      "message": "oom: move OOM_DISABLE check from oom_kill_task to out_of_memory()\n\nPresently if oom_kill_allocating_task is enabled and current have\nOOM_DISABLED, following printk in oom_kill_process is called twice.\n\n    pr_err(\"%s: Kill process %d (%s) score %lu or sacrifice child\\n\",\n            message, task_pid_nr(p), p-\u003ecomm, points);\n\nSo, OOM_DISABLE check should be more early.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "113e27f36dff9895049df324f292474854750d21",
      "tree": "5e4e0bcee4d26ff15123d10d7d86db1eb1c382c8",
      "parents": [
        "26ebc984913b6a8d86d724b3a79d2ed4ed574612"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:37 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:01 2010 -0700"
      },
      "message": "oom: kill duplicate OOM_DISABLE check\n\nselect_bad_process() and badness() have the same OOM_DISABLE check.  This\npatch kills one.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "26ebc984913b6a8d86d724b3a79d2ed4ed574612",
      "tree": "9d293c6f8b1bc5120beaa173590dcd83cd0e2eb0",
      "parents": [
        "f88ccad5886d5a864b8b0d48c666ee9998dec53f"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:37 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:01 2010 -0700"
      },
      "message": "oom: /proc/\u003cpid\u003e/oom_score treat kernel thread honestly\n\nIf a kernel thread is using use_mm(), badness() returns a positive value.\nThis is not a big issue because caller take care of it correctly.  But\nthere is one exception, /proc/\u003cpid\u003e/oom_score calls badness() directly and\ndoesn\u0027t care that the task is a regular process.\n\nAnother example, /proc/1/oom_score return !0 value.  But it\u0027s unkillable.\nThis incorrectness makes administration a little confusing.\n\nThis patch fixes it.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "f88ccad5886d5a864b8b0d48c666ee9998dec53f",
      "tree": "fc6da2064c660a270cff82bb2f97f21ce537a369",
      "parents": [
        "ab290adbaf8f46770f014ea87968de5baca29c30"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:36 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:01 2010 -0700"
      },
      "message": "oom: oom_kill_process() needs to check that p is unkillable\n\nWhen oom_kill_allocating_task is enabled, an argument task of\noom_kill_process is not selected by select_bad_process(), It\u0027s just\nout_of_memory() caller task.  It mean the task can be unkillable.  check\nit first.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "ab290adbaf8f46770f014ea87968de5baca29c30",
      "tree": "e6d9673a76ed7804d0b3ff858c2ac401971c1560",
      "parents": [
        "2c5ea53ce46ebb232e0d9a475fdd2b166d2a516b"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:35 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:01 2010 -0700"
      },
      "message": "oom: make oom_unkillable_task() helper function\n\nPresently we have the same task check in two places. Unify it.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "2c5ea53ce46ebb232e0d9a475fdd2b166d2a516b",
      "tree": "0dc0883ee29201600ec3950142d69f9860af2527",
      "parents": [
        "7c59aec830c7ed6c745bd513982cee3563ed20c1"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:34 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:01 2010 -0700"
      },
      "message": "oom: oom_kill_process() doesn\u0027t select kthread child\n\nPresently select_bad_process() has a PF_KTHREAD check, but\noom_kill_process doesn\u0027t.  It mean oom_kill_process() may choose wrong\ntask, especially, when the child are using use_mm().\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "7c59aec830c7ed6c745bd513982cee3563ed20c1",
      "tree": "f06d2c626d0ab0ff2f9880d98a50e60be4af7816",
      "parents": [
        "1489fa14cb757b496c8fa2b63097dbcee6690695"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:33 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:00 2010 -0700"
      },
      "message": "oom: don\u0027t try to kill oom_unkillable child\n\nPresently, badness() doesn\u0027t care about either CPUSET nor mempolicy.  Then\nif the victim child process have disjoint nodemask, OOM Killer might kill\ninnocent process.\n\nThis patch fixes it.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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"
    },
    {
      "commit": "0aad4b3124850e85fe54e610802f0917ce46a1ae",
      "tree": "ebba56659dab4e285b87341d7639fda7a2db81e9",
      "parents": [
        "f44200320b10c76003101dee21c5f961e80faf0b"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:59 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:57 2010 -0700"
      },
      "message": "oom: fold __out_of_memory into out_of_memory\n\n__out_of_memory() only has a single caller, so fold it into\nout_of_memory() and add a comment about locking for its call to\noom_kill_process().\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "f44200320b10c76003101dee21c5f961e80faf0b",
      "tree": "4c187867337cee9c02e08d926866669f27e4018c",
      "parents": [
        "ff321feac22313cf53ffceb69224b09ac19ff22b"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:58 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:57 2010 -0700"
      },
      "message": "oom: remove constraint argument from select_bad_process and __out_of_memory\n\nselect_bad_process() and __out_of_memory() doe not need their enum\noom_constraint arguments: it\u0027s possible to pass a NULL nodemask if\nconstraint \u003d\u003d CONSTRAINT_MEMORY_POLICY in the caller, out_of_memory().\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "ff321feac22313cf53ffceb69224b09ac19ff22b",
      "tree": "101400fdee395944c2fa5f1f2b45cac54a5c1088",
      "parents": [
        "b940fd703572f7f9e5f894c682c91c3cbd84c11e"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Mon Aug 09 17:18:57 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:57 2010 -0700"
      },
      "message": "mm: rename try_set_zone_oom() to try_set_zonelist_oom()\n\nWe have been used naming try_set_zone_oom and clear_zonelist_oom.\nThe role of functions is to lock of zonelist for preventing parallel\nOOM. So clear_zonelist_oom makes sense but try_set_zone_oome is rather\nawkward and unmatched with clear_zonelist_oom.\n\nLet\u0027s change it with try_set_zonelist_oom.\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: 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"
    },
    {
      "commit": "b940fd703572f7f9e5f894c682c91c3cbd84c11e",
      "tree": "cbb1f23073373ba1c425762f38f6f0bf9decf278",
      "parents": [
        "8e4228e1edb922afa83366803a1e5b3fa8e987c2"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:57 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:57 2010 -0700"
      },
      "message": "oom: remove unnecessary code and cleanup\n\nRemove the redundancy in __oom_kill_task() since:\n\n - init can never be passed to this function: it will never be PF_EXITING\n   or selectable from select_bad_process(), and\n\n - it will never be passed a task from oom_kill_task() without an -\u003emm\n   and we\u0027re unconcerned about detachment from exiting tasks, there\u0027s no\n   reason to protect them against SIGKILL or access to memory reserves.\n\nAlso moves the kernel log message to a higher level since the verbosity is\nnot always emitted here; we need not print an error message if an exiting\ntask is given a longer timeslice.\n\n__oom_kill_task() only has a single caller, so it can be merged into that\nfunction at the same time.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: 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"
    },
    {
      "commit": "e365893236ca78fa1fe2482ccbdc30e9abde6027",
      "tree": "36caf9177f592f0d3a93593b6a569be239aebf91",
      "parents": [
        "309ed882508cc471320ff79265e7340774d6746c"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:55 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:57 2010 -0700"
      },
      "message": "oom: remove special handling for pagefault ooms\n\nIt is possible to remove the special pagefault oom handler by simply oom\nlocking all system zones and then calling directly into out_of_memory().\n\nAll populated zones must have ZONE_OOM_LOCKED set, otherwise there is a\nparallel oom killing in progress that will lead to eventual memory freeing\nso it\u0027s not necessary to needlessly kill another task.  The context in\nwhich the pagefault is allocating memory is unknown to the oom killer, so\nthis is done on a system-wide level.\n\nIf a task has already been oom killed and hasn\u0027t fully exited yet, this\nwill be a no-op since select_bad_process() recognizes tasks across the\nsystem with TIF_MEMDIE set.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Nick Piggin \u003cnpiggin@suse.de\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: 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"
    },
    {
      "commit": "309ed882508cc471320ff79265e7340774d6746c",
      "tree": "28321b30bc420c62554ef6a705ec4bc70651b473",
      "parents": [
        "03668b3ceb0c7a95e09f1b6169f5270ffc1a19f6"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:54 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:57 2010 -0700"
      },
      "message": "oom: extract panic helper function\n\nThere are various points in the oom killer where the kernel must determine\nwhether to panic or not.  It\u0027s better to extract this to a helper function\nto remove all the confusion as to its semantics.\n\nAlso fix a call to dump_header() where tasklist_lock is not read- locked,\nas required.\n\nThere\u0027s no functional change with this patch.\n\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: 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"
    },
    {
      "commit": "ad915c432eccb482427c1bbd77c74e6f7bfe60b3",
      "tree": "d93b536c48773527c8ae0312d6dcf45d57dd1b89",
      "parents": [
        "6f48d0ebd907ae419387f27b602ee98870cfa7bb"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:53 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: enable oom tasklist dump by default\n\nThe oom killer tasklist dump, enabled with the oom_dump_tasks sysctl, is\nvery helpful information in diagnosing why a user\u0027s task has been killed.\nIt emits useful information such as each eligible thread\u0027s memory usage\nthat can determine why the system is oom, so it should be enabled by\ndefault.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: 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"
    },
    {
      "commit": "6f48d0ebd907ae419387f27b602ee98870cfa7bb",
      "tree": "355bd8b616f5a78d8adabe5b9631d7aad970dbaa",
      "parents": [
        "5e9d834a0e0c0485dfa487281ab9650fc37a3bb5"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:52 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: select task from tasklist for mempolicy ooms\n\nThe oom killer presently kills current whenever there is no more memory\nfree or reclaimable on its mempolicy\u0027s nodes.  There is no guarantee that\ncurrent is a memory-hogging task or that killing it will free any\nsubstantial amount of memory, however.\n\nIn such situations, it is better to scan the tasklist for nodes that are\nallowed to allocate on current\u0027s set of nodes and kill the task with the\nhighest badness() score.  This ensures that the most memory-hogging task,\nor the one configured by the user with /proc/pid/oom_adj, is always\nselected in such scenarios.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: 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"
    },
    {
      "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"
    },
    {
      "commit": "6cf86ac6f36b638459a9a6c2576d5e655d41d451",
      "tree": "177ae58393bfbc5a87eb64178d426e2ba4c95871",
      "parents": [
        "4358997ae38a1901498d128d6508119d9f318b36"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:50 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: filter tasks not sharing the same cpuset\n\nTasks that do not share the same set of allowed nodes with the task that\ntriggered the oom should not be considered as candidates for oom kill.\n\nTasks in other cpusets with a disjoint set of mems would be unfairly\npenalized otherwise because of oom conditions elsewhere; an extreme\nexample could unfairly kill all other applications on the system if a\nsingle task in a user\u0027s cpuset sets itself to OOM_DISABLE and then uses\nmore memory than allowed.\n\nKilling tasks outside of current\u0027s cpuset rarely would free memory for\ncurrent anyway.  To use a sane heuristic, we must ensure that killing a\ntask would likely free memory for current and avoid needlessly killing\nothers at all costs just because their potential memory freeing is\nunknown.  It is better to kill current than another task needlessly.\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"
    },
    {
      "commit": "4358997ae38a1901498d128d6508119d9f318b36",
      "tree": "0c5a47808790e80a754b44aebe82c5c683811788",
      "parents": [
        "7b98c2e402eaa1f2beec18b1bde17f74948a19db"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:49 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: avoid sending exiting tasks a SIGKILL\n\nIt\u0027s unnecessary to SIGKILL a task that is already PF_EXITING and can\nactually cause a NULL pointer dereference of the sighand if it has already\nbeen detached.  Instead, simply set TIF_MEMDIE so it has access to memory\nreserves and can quickly exit as the comment implies.\n\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "7b98c2e402eaa1f2beec18b1bde17f74948a19db",
      "tree": "a0d3920f84e981cca5be386e2cc5a6320c4d8bdc",
      "parents": [
        "c81fac5cb8c92b8b4795ac250a46c7514d1fce06"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:48 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: give current access to memory reserves if it has been killed\n\nIt\u0027s possible to livelock the page allocator if a thread has mm-\u003emmap_sem\nand fails to make forward progress because the oom killer selects another\nthread sharing the same -\u003emm to kill that cannot exit until the semaphore\nis dropped.\n\nThe oom killer will not kill multiple tasks at the same time; each oom\nkilled task must exit before another task may be killed.  Thus, if one\nthread is holding mm-\u003emmap_sem and cannot allocate memory, all threads\nsharing the same -\u003emm are blocked from exiting as well.  In the oom kill\ncase, that means the thread holding mm-\u003emmap_sem will never free\nadditional memory since it cannot get access to memory reserves and the\nthread that depends on it with access to memory reserves cannot exit\nbecause it cannot acquire the semaphore.  Thus, the page allocators\nlivelocks.\n\nWhen the oom killer is called and current happens to have a pending\nSIGKILL, this patch automatically gives it access to memory reserves and\nreturns.  Upon returning to the page allocator, its allocation will\nhopefully succeed so it can quickly exit and free its memory.  If not, the\npage allocator will fail the allocation if it is not __GFP_NOFAIL.\n\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "c81fac5cb8c92b8b4795ac250a46c7514d1fce06",
      "tree": "2f2577d6813d0472b23359bcda8223edf0d7b396",
      "parents": [
        "74ab7f1d3f22ccb02f8b14f1f2375416b1ab0adb"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:47 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: dump_tasks use find_lock_task_mm too fix\n\nWhen find_lock_task_mm() returns a thread other than p in dump_tasks(),\nits name should be displayed instead.  This is the thread that will be\ntargeted by the oom killer, not its mm-less parent.\n\nThis also allows us to safely dereference task-\u003ecomm without needing\nget_task_comm().\n\nWhile we\u0027re here, remove the cast on task_cpu(task) as Andrew suggested.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.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"
    },
    {
      "commit": "74ab7f1d3f22ccb02f8b14f1f2375416b1ab0adb",
      "tree": "94f7e6b0e77fe11f200941f97d1fc895dc950fde",
      "parents": [
        "c55db95788a2a55a77f5a3ced1e59578710440b2"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Aug 09 17:18:46 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: improve commentary in dump_tasks()\n\nThe comments in dump_tasks() should be updated to be more clear about why\ntasks are filtered and how they are filtered by its argument.\n\nAn unnecessary comment concerning a check for is_global_init() is removed\nsince it isn\u0027t of importance.\n\nSuggested-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.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"
    },
    {
      "commit": "c55db95788a2a55a77f5a3ced1e59578710440b2",
      "tree": "275a0c97bfe408ea926dfe14864e476d719859e9",
      "parents": [
        "dd8e8f405ca386c7ce7cbb996ccd985d283b0e03"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:18:46 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:56 2010 -0700"
      },
      "message": "oom: dump_tasks use find_lock_task_mm too\n\ndump_task() should use find_lock_task_mm() too. It is necessary for\nprotecting task-exiting race.\n\ndump_tasks() currently filters any task that does not have an attached\n-\u003emm since it incorrectly assumes that it must either be in the process of\nexiting and has detached its memory or that it\u0027s a kernel thread;\nmultithreaded tasks may actually have subthreads that have a valid -\u003emm\npointer and thus those threads should actually be displayed.  This change\nfinds those threads, if they exist, and emit their information along with\nthe rest of the candidate tasks for kill.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.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"
    },
    {
      "commit": "dd8e8f405ca386c7ce7cbb996ccd985d283b0e03",
      "tree": "7863585871d44c0272eb0b93ee909392ee85eb99",
      "parents": [
        "b52279406e77be711c068f9a8e970ea6471e089c"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Aug 09 17:18:45 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:55 2010 -0700"
      },
      "message": "oom: introduce find_lock_task_mm() to fix !mm false positives\n\nAlmost all -\u003emm \u003d\u003d NULL checks in oom_kill.c are wrong.\n\nThe current code assumes that the task without -\u003emm has already released\nits memory and ignores the process.  However this is not necessarily true\nwhen this process is multithreaded, other live sub-threads can use this\n-\u003emm.\n\n- Remove the \"if (!p-\u003emm)\" check in select_bad_process(), it is\n  just wrong.\n\n- Add the new helper, find_lock_task_mm(), which finds the live\n  thread which uses the memory and takes task_lock() to pin -\u003emm\n\n- change oom_badness() to use this helper instead of just checking\n  -\u003emm !\u003d NULL.\n\n- As David pointed out, select_bad_process() must never choose the\n  task without -\u003emm, but no matter what oom_badness() returns the\n  task can be chosen if nothing else has been found yet.\n\n  Change oom_badness() to return int, change it to return -1 if\n  find_lock_task_mm() fails, and change select_bad_process() to\n  check points \u003e\u003d 0.\n\nNote! This patch is not enough, we need more changes.\n\n\t- oom_badness() was fixed, but oom_kill_task() still ignores\n\t  the task without -\u003emm\n\n\t- oom_forkbomb_penalty() should use find_lock_task_mm() too,\n\t  and it also needs other changes to actually find the first\n\t  first-descendant children\n\nThis will be addressed later.\n\n[kosaki.motohiro@jp.fujitsu.com: use in badness(), __oom_kill_task()]\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "b52279406e77be711c068f9a8e970ea6471e089c",
      "tree": "5f44a8af51ccc30847b1d969e0bd36205902d3fb",
      "parents": [
        "455c0e5fb03b67fa62bd12e3abe3fa484b9960c5"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Aug 09 17:18:44 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:55 2010 -0700"
      },
      "message": "oom: PF_EXITING check should take mm into account\n\nselect_bad_process() checks PF_EXITING to detect the task which is going\nto release its memory, but the logic is very wrong.\n\n\t- a single process P with the dead group leader disables\n\t  select_bad_process() completely, it will always return\n\t  ERR_PTR() while P can live forever\n\n\t- if the PF_EXITING task has already released its -\u003emm\n\t  it doesn\u0027t make sense to expect it is goiing to free\n\t  more memory (except task_struct/etc)\n\nChange the code to ignore the PF_EXITING tasks without -\u003emm.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "455c0e5fb03b67fa62bd12e3abe3fa484b9960c5",
      "tree": "082cbecb8927e1c8e0c2cea5d5639e9c8f62eafe",
      "parents": [
        "a9877cc2937889e5669114f28612b494384152a4"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Mon Aug 09 17:18:43 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:55 2010 -0700"
      },
      "message": "oom: check PF_KTHREAD instead of !mm to skip kthreads\n\nselect_bad_process() thinks a kernel thread can\u0027t have -\u003emm !\u003d NULL, this\nis not true due to use_mm().\n\nChange the code to check PF_KTHREAD.\n\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "df64f81bb1e01cbef967a96642dacf208acb7e72",
      "tree": "accb54ac130b2ac52b3d8644cb6585cf9730975c",
      "parents": [
        "dc10e281f5fc42e288ab979294d1d5dc9743ae1b"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed May 26 14:42:41 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 27 09:12:43 2010 -0700"
      },
      "message": "memcg: make oom killer a no-op when no killable task can be found\n\nIt\u0027s pointless to try to kill current if select_bad_process() did not find\nan eligible task to kill in mem_cgroup_out_of_memory() since it\u0027s\nguaranteed that current is a member of the memcg that is oom and it is, by\ndefinition, unkillable.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5a0e3ad6af8660be21ca98a971cd00f331318c05",
      "tree": "5bfb7be11a03176a87296a43ac6647975c00a1d1",
      "parents": [
        "ed391f4ebf8f701d3566423ce8f17e614cde9806"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 24 17:04:11 2010 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 30 22:02:32 2010 +0900"
      },
      "message": "include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h\n\npercpu.h is included by sched.h and module.h and thus ends up being\nincluded when building most .c files.  percpu.h includes slab.h which\nin turn includes gfp.h making everything defined by the two files\nuniversally available and complicating inclusion dependencies.\n\npercpu.h -\u003e slab.h dependency is about to be removed.  Prepare for\nthis change by updating users of gfp and slab facilities include those\nheaders directly instead of assuming availability.  As this conversion\nneeds to touch large number of source files, the following script is\nused as the basis of conversion.\n\n  http://userweb.kernel.org/~tj/misc/slabh-sweep.py\n\nThe script does the followings.\n\n* Scan files for gfp and slab usages and update includes such that\n  only the necessary includes are there.  ie. if only gfp is used,\n  gfp.h, if slab is used, slab.h.\n\n* When the script inserts a new include, it looks at the include\n  blocks and try to put the new include such that its order conforms\n  to its surrounding.  It\u0027s put in the include block which contains\n  core kernel includes, in the same order that the rest are ordered -\n  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there\n  doesn\u0027t seem to be any matching order.\n\n* If the script can\u0027t find a place to put a new include (mostly\n  because the file doesn\u0027t have fitting include block), it prints out\n  an error message indicating which .h file needs to be added to the\n  file.\n\nThe conversion was done in the following steps.\n\n1. The initial automatic conversion of all .c files updated slightly\n   over 4000 files, deleting around 700 includes and adding ~480 gfp.h\n   and ~3000 slab.h inclusions.  The script emitted errors for ~400\n   files.\n\n2. Each error was manually checked.  Some didn\u0027t need the inclusion,\n   some needed manual addition while adding it to implementation .h or\n   embedding .c file was more appropriate for others.  This step added\n   inclusions to around 150 files.\n\n3. The script was run again and the output was compared to the edits\n   from #2 to make sure no file was left behind.\n\n4. Several build tests were done and a couple of problems were fixed.\n   e.g. lib/decompress_*.c used malloc/free() wrappers around slab\n   APIs requiring slab.h to be added manually.\n\n5. The script was run on all .h files but without automatically\n   editing them as sprinkling gfp.h and slab.h inclusions around .h\n   files could easily lead to inclusion dependency hell.  Most gfp.h\n   inclusion directives were ignored as stuff from gfp.h was usually\n   wildly available and often used in preprocessor macros.  Each\n   slab.h inclusion directive was examined and added manually as\n   necessary.\n\n6. percpu.h was updated not to include slab.h.\n\n7. Build test were done on the following configurations and failures\n   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my\n   distributed build env didn\u0027t work with gcov compiles) and a few\n   more options had to be turned off depending on archs to make things\n   build (like ipr on powerpc/64 which failed due to missing writeq).\n\n   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.\n   * powerpc and powerpc64 SMP allmodconfig\n   * sparc and sparc64 SMP allmodconfig\n   * ia64 SMP allmodconfig\n   * s390 SMP allmodconfig\n   * alpha SMP allmodconfig\n   * um on x86_64 SMP allmodconfig\n\n8. percpu.h modifications were reverted so that it could be applied as\n   a separate patch and serve as bisection point.\n\nGiven the fact that I had only a couple of failures from tests on step\n6, I\u0027m fairly confident about the coverage of this conversion patch.\nIf there is a breakage, it\u0027s likely to be something in one of the arch\nheaders which should be easily discoverable easily on most builds of\nthe specific arch.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nGuess-its-ok-by: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Lee Schermerhorn \u003cLee.Schermerhorn@hp.com\u003e\n"
    },
    {
      "commit": "867578cbccb0893cc14fc29c670f7185809c90d6",
      "tree": "e4d0cefac265fc64399223bc82ed714a88ebe20c",
      "parents": [
        "0263c12c12ccc90edc9d856fa839f8936183e6d1"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 10 15:22:39 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 12 15:52:38 2010 -0800"
      },
      "message": "memcg: fix oom kill behavior\n\nIn current page-fault code,\n\n\thandle_mm_fault()\n\t\t-\u003e ...\n\t\t-\u003e mem_cgroup_charge()\n\t\t-\u003e map page or handle error.\n\t-\u003e check return code.\n\nIf page fault\u0027s return code is VM_FAULT_OOM, page_fault_out_of_memory() is\ncalled.  But if it\u0027s caused by memcg, OOM should have been already\ninvoked.\n\nThen, I added a patch: a636b327f731143ccc544b966cfd8de6cb6d72c6.  That\npatch records last_oom_jiffies for memcg\u0027s sub-hierarchy and prevents\npage_fault_out_of_memory from being invoked in near future.\n\nBut Nishimura-san reported that check by jiffies is not enough when the\nsystem is terribly heavy.\n\nThis patch changes memcg\u0027s oom logic as.\n * If memcg causes OOM-kill, continue to retry.\n * remove jiffies check which is used now.\n * add memcg-oom-lock which works like perzone oom lock.\n * If current is killed(as a process), bypass charge.\n\nSomething more sophisticated can be added but this pactch does\nfundamental things.\nTODO:\n - add oom notifier\n - add permemcg disable-oom-kill flag and freezer at oom.\n - more chances for wake up oom waiter (when changing memory limit etc..)\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nTested-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "daaf1e68874c078a15ae6ae827751839c4d81739",
      "tree": "22ed2e28b1c4f0b714df680ffff6407e519c5c60",
      "parents": [
        "1080d7a30304d03b1d9fd530aacd8aece2d702a2"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 10 15:22:32 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 12 15:52:37 2010 -0800"
      },
      "message": "memcg: handle panic_on_oom\u003dalways case\n\nPresently, if panic_on_oom\u003d2, the whole system panics even if the oom\nhappend in some special situation (as cpuset, mempolicy....).  Then,\npanic_on_oom\u003d2 means painc_on_oom_always.\n\nNow, memcg doesn\u0027t check panic_on_oom flag. This patch adds a check.\n\nBTW, how it\u0027s useful ?\n\nkdump+panic_on_oom\u003d2 is the last tool to investigate what happens in\noom-ed system.  When a task is killed, the sysytem recovers and there will\nbe few hint to know what happnes.  In mission critical system, oom should\nnever happen.  Then, panic_on_oom\u003d2+kdump is useful to avoid next OOM by\nknowing precise information via snapshot.\n\nTODO:\n - For memcg, it\u0027s for isolate system\u0027s memory usage, oom-notiifer and\n   freeze_at_oom (or rest_at_oom) should be implemented. Then, management\n   daemon can do similar jobs (as kdump) or taking snapshot per cgroup.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Nick Piggin \u003cnpiggin@suse.de\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d559db086ff5be9bcc259e5aa50bf3d881eaf1d1",
      "tree": "aa968c8a4093234e4623a34c0415bf9d8683671c",
      "parents": [
        "19b629f581320999ddb9f6597051b79cdb53459c"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Fri Mar 05 13:41:39 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Mar 06 11:26:23 2010 -0800"
      },
      "message": "mm: clean up mm_counter\n\nPresently, per-mm statistics counter is defined by macro in sched.h\n\nThis patch modifies it to\n  - defined in mm.h as inlinf functions\n  - use array instead of macro\u0027s name creation.\n\nThis patch is for reducing patch size in future patch to modify\nimplementation of per-mm counter.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nCc: 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"
    },
    {
      "commit": "5a2d41961dd6815b874b5c0afec0ac96cd90eea4",
      "tree": "af3d153f9615d9c11feb378f7821c0f280012b52",
      "parents": [
        "bee415ce427d1eab6cfb30221461c7d20cbf1903"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Mon Feb 22 12:44:14 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Feb 22 19:50:34 2010 -0800"
      },
      "message": "memcg: fix oom killing a child process in an other cgroup\n\nPresently the oom-killer is memcg aware and it finds the worst process\nfrom processes under memcg(s) in oom.  Then, it kills victim\u0027s child\nfirst.\n\nIt may kill a child in another cgroup and may not be any help for\nrecovery.  And it will break the assumption users have.\n\nThis patch fixes it.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d31f56dbf8bafaacb0c617f9a6f137498d5c7aed",
      "tree": "88d095c2208d27362e58ff7431407040ead9d848",
      "parents": [
        "57f9fd7d25ac9a0d7e3a4ced580e780ab4524e3b"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Tue Dec 15 16:47:12 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: avoid oom-killing innocent task in case of use_hierarchy\n\ntask_in_mem_cgroup(), which is called by select_bad_process() to check\nwhether a task can be a candidate for being oom-killed from memcg\u0027s limit,\nchecks \"curr-\u003euse_hierarchy\"(\"curr\" is the mem_cgroup the task belongs\nto).\n\nBut this check return true(it\u0027s false positive) when:\n\n\t\u003csome path\u003e/aa\t\tuse_hierarchy \u003d\u003d 0\t\u003c- hitting limit\n\t  \u003csome path\u003e/aa/00\tuse_hierarchy \u003d\u003d 1\t\u003c- the task belongs to\n\nThis leads to killing an innocent task in aa/00.  This patch is a fix for\nthis bug.  And this patch also fixes the arg for\nmem_cgroup_print_oom_info().  We should print information of mem_cgroup\nwhich the task being killed, not current, belongs to.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4365a5676fa3aa1d5ae6c90c22a0044f09ba584e",
      "tree": "5b9914ccbdcf2aa695473421e71f6299fbe78cef",
      "parents": [
        "3b4798cbc13dd8d1150aa6377f97f0e11450a67d"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hioryu@jp.fujitsu.com",
        "time": "Tue Dec 15 16:45:33 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:19:57 2009 -0800"
      },
      "message": "oom-kill: fix NUMA constraint check with nodemask\n\nFix node-oriented allocation handling in oom-kill.c I myself think of this\nas a bugfix not as an ehnancement.\n\nIn these days, things are changed as\n  - alloc_pages() eats nodemask as its arguments, __alloc_pages_nodemask().\n  - mempolicy don\u0027t maintain its own private zonelists.\n  (And cpuset doesn\u0027t use nodemask for __alloc_pages_nodemask())\n\nSo, current oom-killer\u0027s check function is wrong.\n\nThis patch does\n  - check nodemask, if nodemask \u0026\u0026 nodemask doesn\u0027t cover all\n    node_states[N_HIGH_MEMORY], this is CONSTRAINT_MEMORY_POLICY.\n  - Scan all zonelist under nodemask, if it hits cpuset\u0027s wall\n    this faiulre is from cpuset.\nAnd\n  - modifies the caller of out_of_memory not to call oom if __GFP_THISNODE.\n    This doesn\u0027t change \"current\" behavior. If callers use __GFP_THISNODE\n    it should handle \"page allocation failure\" by itself.\n\n  - handle __GFP_NOFAIL+__GFP_THISNODE path.\n    This is something like a FIXME but this gfpmask is not used now.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hioryu@jp.fujitsu.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3b4798cbc13dd8d1150aa6377f97f0e11450a67d",
      "tree": "3a805cae1557098ddd4386fd6117f4f0fde5123f",
      "parents": [
        "8bea8672edfca7ec5f661cafb218f1205863b343"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Tue Dec 15 16:45:32 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:19:57 2009 -0800"
      },
      "message": "oom-kill: show virtual size and rss information of the killed process\n\nIn a typical oom analysis scenario, we frequently want to know whether the\nkilled process has a memory leak or not at the first step.  This patch\nadds vsz and rss information to the oom log to help this analysis.  To\nsave time for the debugging.\n\nexample:\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\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\u003d\nrsyslogd invoked oom-killer: gfp_mask\u003d0x201da, order\u003d0, oom_adj\u003d0\nPid: 1308, comm: rsyslogd Not tainted 2.6.32-rc6 #24\nCall Trace:\n[\u003cffffffff8132e35b\u003e] ?_spin_unlock+0x2b/0x40\n[\u003cffffffff810f186e\u003e] oom_kill_process+0xbe/0x2b0\n\n(snip)\n\n492283 pages non-shared\nOut of memory: kill process 2341 (memhog) score 527276 or a child\nKilled process 2341 (memhog) vsz:1054552kB, anon-rss:970588kB, file-rss:4kB\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\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\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n                             ^\n                             |\n                            here\n\n[rientjes@google.com: fix race, add pid \u0026 comm to message]\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\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"
    },
    {
      "commit": "1b604d75bbb6e28628c5a95a433432973c33d581",
      "tree": "f5022972180a0dab66744eb6278ea57b869447e4",
      "parents": [
        "5ce45962b26ae867e98e60177f62f9695b49a936"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Dec 14 17:57:47 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 15 08:53:10 2009 -0800"
      },
      "message": "oom: dump stack and VM state when oom killer panics\n\nThe oom killer header, including information such as the allocation order\nand gfp mask, current\u0027s cpuset and memory controller, call trace, and VM\nstate information is currently only shown when the oom killer has selected\na task to kill.\n\nThis information is omitted, however, when the oom killer panics either\nbecause of panic_on_oom sysctl settings or when no killable task was\nfound.  It is still relevant to know crucial pieces of information such as\nthe allocation order and VM state when diagnosing such issues, especially\nat boot.\n\nThis patch displays the oom killer header whenever it panics so that bug\nreports can include pertinent information to debug the issue, if possible.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "8c5cd6f3a1721085652da204d454af4f8b92eda2",
      "tree": "3fcb6f4cd7e5981c2713f05340ec931574768cff",
      "parents": [
        "495789a51a91cb8c015d8d77fecbac1caf20b186"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Sep 21 17:03:15 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:39 2009 -0700"
      },
      "message": "oom: oom_kill doesn\u0027t kill vfork parent (or child)\n\nCurrent oom_kill doesn\u0027t only kill the victim process, but also kill all\nthas shread the same mm.  it mean vfork parent will be killed.\n\nThis is definitely incorrect.  another process have another oom_adj.  we\nshouldn\u0027t ignore their oom_adj (it might have OOM_DISABLE).\n\nfollowing caller hit the minefield.\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\n        switch (constraint) {\n        case CONSTRAINT_MEMORY_POLICY:\n                oom_kill_process(current, gfp_mask, order, 0, NULL,\n                                \"No available memory (MPOL_BIND)\");\n                break;\n\nNote: force_sig(SIGKILL) send SIGKILL to all thread in the process.\nWe don\u0027t need to care multi thread in here.\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: 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"
    },
    {
      "commit": "495789a51a91cb8c015d8d77fecbac1caf20b186",
      "tree": "ac2a71ed40ed84f5673326aa6bf7f278b54d989a",
      "parents": [
        "28b83c5193e7ab951e402252278f2cc79dc4d298"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Sep 21 17:03:14 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:39 2009 -0700"
      },
      "message": "oom: make oom_score to per-process value\n\noom-killer kills a process, not task.  Then oom_score should be calculated\nas per-process too.  it makes consistency more and makes speed up\nselect_bad_process().\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: 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"
    },
    {
      "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"
    },
    {
      "commit": "35451beecbd7c86ce3249d543594517a5fe9a0cd",
      "tree": "e72759e6e6fcd142ab85c607a9b3dd3e1c016eed",
      "parents": [
        "a913e182ab9484308e870af37a14d372742d53b0"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Sep 21 17:02:27 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:33 2009 -0700"
      },
      "message": "ksm: unmerge is an origin of OOMs\n\nJust as the swapoff system call allocates many pages of RAM to various\nprocesses, perhaps triggering OOM, so \"echo 2 \u003e/sys/kernel/mm/ksm/run\"\n(unmerge) is liable to allocate many pages of RAM to various processes,\nperhaps triggering OOM; and each is normally run from a modest admin\nprocess (swapoff or shell), easily repeated until it succeeds.\n\nSo treat unmerge_and_remove_all_rmap_items() in the same way that we treat\ntry_to_unuse(): generalize PF_SWAPOFF to PF_OOM_ORIGIN, and bracket both\nwith that, to ask the OOM killer to kill them first, to prevent them from\nspawning more and more OOM kills.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nAcked-by: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0753ba01e126020bf0f8150934903b48935b697d",
      "tree": "fbfd7e2d0abbe724a8c5e0e17fb9af522ed2e097",
      "parents": [
        "89a4eb4b66e8f4d395e14a14d262dac4d6ca52f0"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Tue Aug 18 14:11:10 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Aug 18 16:31:13 2009 -0700"
      },
      "message": "mm: revert \"oom: move oom_adj value\"\n\nThe commit 2ff05b2b (oom: move oom_adj value) moveed the oom_adj value to\nthe mm_struct.  It was a very good first step for sanitize OOM.\n\nHowever Paul Menage reported the commit makes regression to his job\nscheduler.  Current OOM logic can kill OOM_DISABLED process.\n\nWhy? His program has the code of similar to the following.\n\n\t...\n\tset_oom_adj(OOM_DISABLE); /* The job scheduler never killed by oom */\n\t...\n\tif (vfork() \u003d\u003d 0) {\n\t\tset_oom_adj(0); /* Invoked child can be killed */\n\t\texecve(\"foo-bar-cmd\");\n\t}\n\t....\n\nvfork() parent and child are shared the same mm_struct.  then above\nset_oom_adj(0) doesn\u0027t only change oom_adj for vfork() child, it\u0027s also\nchange oom_adj for vfork() parent.  Then, vfork() parent (job scheduler)\nlost OOM immune and it was killed.\n\nActually, fork-setting-exec idiom is very frequently used in userland program.\nWe must not break this assumption.\n\nThen, this patch revert commit 2ff05b2b and related commit.\n\nReverted commit list\n---------------------\n- commit 2ff05b2b4e (oom: move oom_adj value from task_struct to mm_struct)\n- commit 4d8b9135c3 (oom: avoid unnecessary mm locking and scanning for OOM_DISABLE)\n- commit 8123681022 (oom: only oom kill exiting tasks with attached memory)\n- commit 933b787b57 (mm: copy over oom_adj value at fork time)\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: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Nick Piggin \u003cnpiggin@suse.de\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "81236810226f71bd9ff77321c8e8276dae7efc61",
      "tree": "8194006c780be40bfac49a2c557ab037186a57e9",
      "parents": [
        "9198e96c06744517e3b18fce8be6db61e96a3227"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Jun 16 15:33:16 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jun 16 19:47:45 2009 -0700"
      },
      "message": "oom: only oom kill exiting tasks with attached memory\n\nWhen a task is chosen for oom kill and is found to be PF_EXITING,\n__oom_kill_task() is called to elevate the task\u0027s timeslice and give it\naccess to memory reserves so that it may quickly exit.\n\nThis privilege is unnecessary, however, if the task has already detached\nits mm.  Although its possible for the mm to become detached later since\ntask_lock() is not held, __oom_kill_task() will simply be a no-op in such\ncircumstances.\n\nSubsequently, it is no longer necessary to warn about killing mm-less\ntasks since it is a no-op.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@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"
    },
    {
      "commit": "4d8b9135c30ccbe46e621fefd862969819003fd6",
      "tree": "47674640c8a65b3ba440b2dc224efbab7571c638",
      "parents": [
        "2ff05b2b4eac2e63d345fc731ea151a060247f53"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Jun 16 15:32:57 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jun 16 19:47:43 2009 -0700"
      },
      "message": "oom: avoid unnecessary mm locking and scanning for OOM_DISABLE\n\nThis moves the check for OOM_DISABLE to the badness heuristic so it is\nonly necessary to hold task_lock() once.  If the mm is OOM_DISABLE, the\nscore is 0, which is also correctly exported via /proc/pid/oom_score.\nThis requires that tasks with badness scores of 0 are prohibited from\nbeing oom killed, which makes sense since they would not allow for future\nmemory freeing anyway.\n\nSince the oom_adj value is a characteristic of an mm and not a task, it is\nno longer necessary to check the oom_adj value for threads sharing the\nsame memory (except when simply issuing SIGKILLs for threads in other\nthread groups).\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"
    },
    {
      "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"
    },
    {
      "commit": "6d2661ede5f20f968422e790af3334908c3bc857",
      "tree": "2e002d883eee9be5c52d844a7b0c3354338d8995",
      "parents": [
        "681a1b4032d72f4ad6d4beed751bc65574572746"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Thu May 28 14:34:19 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri May 29 08:40:01 2009 -0700"
      },
      "message": "oom: fix possible oom_dump_tasks NULL pointer\n\nWhen /proc/sys/vm/oom_dump_tasks is enabled, it is possible to get a NULL\npointer for tasks that have detached mm\u0027s since task_lock() is not held\nduring the tasklist scan.  Add the task_lock().\n\nAcked-by: Nick Piggin \u003cnpiggin@suse.de\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@redhat.com\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"
    },
    {
      "commit": "184101bf143ac96d62b3dcc17e7b3550f98d3350",
      "tree": "c16b7d56d5603ae9d120a99cbf814195d750a380",
      "parents": [
        "df3935ffd6166fdd00702cf548fb5bb55737758b"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed May 06 16:02:55 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 06 16:36:09 2009 -0700"
      },
      "message": "oom: prevent livelock when oom_kill_allocating_task is set\n\nWhen /proc/sys/vm/oom_kill_allocating_task is set for large systems that\nwant to avoid the lengthy tasklist scan, it\u0027s possible to livelock if\ncurrent is ineligible for oom kill.  This normally happens when it is set\nto OOM_DISABLE, but is also possible if any threads are sharing the same\n-\u003emm with a different tgid.\n\nSo change __out_of_memory() to fall back to the full task-list scan if it\nwas unable to kill `current\u0027.\n\nCc: Nick Piggin \u003cnpiggin@suse.de\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"
    },
    {
      "commit": "e222432bfa7dcf6ec008622a978c9f284ed5e3a9",
      "tree": "b006f569cb66523a5644ad0ef1669b051ccda907",
      "parents": [
        "0b7f569e45bb6be142d87017030669a6a7d327a1"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Thu Apr 02 16:57:39 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: show memcg information during OOM\n\nAdd RSS and swap to OOM output from memcg\n\nDisplay memcg values like failcnt, usage and limit when an OOM occurs due\nto memcg.\n\nThanks to Johannes Weiner, Li Zefan, David Rientjes, Kamezawa Hiroyuki,\nDaisuke Nishimura and KOSAKI Motohiro for review.\n\nSample output\n-------------\n\nTask in /a/x killed as a result of limit of /a\nmemory: usage 1048576kB, limit 1048576kB, failcnt 4183\nmemory+swap: usage 1400964kB, limit 9007199254740991kB, failcnt 0\n\n[akpm@linux-foundation.org: compilation fix]\n[akpm@linux-foundation.org: fix kerneldoc and whitespace]\n[akpm@linux-foundation.org: add printk facility level]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: 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"
    },
    {
      "commit": "a12888f772dab4bf5e6f73668dc4f5f6026a7014",
      "tree": "6a6113899ff39e58993280bb831a813a43a8e1e1",
      "parents": [
        "d086817dc0d42f1be8db4138233d33e1dd16a956"
      ],
      "author": {
        "name": "Cyrill Gorcunov",
        "email": "gorcunov@gmail.com",
        "time": "Tue Mar 31 15:19:27 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 01 08:59:11 2009 -0700"
      },
      "message": "oom_kill: don\u0027t call for int_sqrt(0)\n\nThere is no need to call for int_sqrt if argument is 0.\n\nSigned-off-by: Cyrill Gorcunov \u003cgorcunov@openvz.org\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nAcked-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"
    },
    {
      "commit": "7f4d454dee2e0bdd21bafd413d1c53e443a26540",
      "tree": "abf54c2bd7c91fe09685e42b3a92d84679403058",
      "parents": [
        "a5e924f5f8abf97944e625d74967cc9452cfbce8"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:29 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: avoid deadlock caused by race between oom and cpuset_attach\n\nmpol_rebind_mm(), which can be called from cpuset_attach(), does\ndown_write(mm-\u003emmap_sem).  This means down_write(mm-\u003emmap_sem) can be\ncalled under cgroup_mutex.\n\nOTOH, page fault path does down_read(mm-\u003emmap_sem) and calls\nmem_cgroup_try_charge_xxx(), which may eventually calls\nmem_cgroup_out_of_memory().  And mem_cgroup_out_of_memory() calls\ncgroup_lock().  This means cgroup_lock() can be called under\ndown_read(mm-\u003emmap_sem).\n\nIf those two paths race, deadlock can happen.\n\nThis patch avoid this deadlock by:\n  - remove cgroup_lock() from mem_cgroup_out_of_memory().\n  - define new mutex (memcg_tasklist) and serialize mem_cgroup_move_task()\n    (-\u003eattach handler of memory cgroup) and mem_cgroup_out_of_memory.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a636b327f731143ccc544b966cfd8de6cb6d72c6",
      "tree": "e53b03b64e8ebca20649c2d877bc4c3ef54ec34c",
      "parents": [
        "2e4d40915fb85207fe48cfc31201824ec6d7426e"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:08 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:06 2009 -0800"
      },
      "message": "memcg: avoid unnecessary system-wide-oom-killer\n\nCurrent mmtom has new oom function as pagefault_out_of_memory().  It\u0027s\nadded for select bad process rathar than killing current.\n\nWhen memcg hit limit and calls OOM at page_fault, this handler called and\nsystem-wide-oom handling happens.  (means kernel panics if panic_on_oom is\ntrue....)\n\nTo avoid overkill, check memcg\u0027s recent behavior before starting\nsystem-wide-oom.\n\nAnd this patch also fixes to guarantee \"don\u0027t accnout against process with\nTIF_MEMDIE\".  This is necessary for smooth OOM.\n\n[akpm@linux-foundation.org: build fix]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Badari Pulavarty \u003cpbadari@us.ibm.com\u003e\nCc: Jan Blunck \u003cjblunck@suse.de\u003e\nCc: Hirokazu Takahashi \u003ctaka@valinux.co.jp\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "75aa199410359dc5fbcf9025ff7af98a9d20f0d5",
      "tree": "569bffa181ccba56d884ec7e826ae61384297f56",
      "parents": [
        "c7d4caeb1d68d07f77cc09fc20b7759d6d7aa3b1"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Jan 06 14:39:01 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jan 06 15:58:59 2009 -0800"
      },
      "message": "oom: print triggering task\u0027s cpuset and mems allowed\n\nWhen cpusets are enabled, it\u0027s necessary to print the triggering task\u0027s\nset of allowable nodes so the subsequently printed meminfo can be\ninterpreted correctly.\n\nWe also print the task\u0027s cpuset name for informational purposes.\n\n[rientjes@google.com: task lock current before dereferencing cpuset]\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ],
  "next": "c7d4caeb1d68d07f77cc09fc20b7759d6d7aa3b1"
}
