)]}'
{
  "log": [
    {
      "commit": "073219e995b4a3f8cf1ce8228b7ef440b6994ac0",
      "tree": "d140fc2e94bd8fd09270286b7267fb087a79f288",
      "parents": [
        "3ed80a62bf959d34ebd4d553b026fbe7e6fbcc54"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Sat Feb 08 10:36:58 2014 -0500"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Sat Feb 08 10:36:58 2014 -0500"
      },
      "message": "cgroup: clean up cgroup_subsys names and initialization\n\ncgroup_subsys is a bit messier than it needs to be.\n\n* The name of a subsys can be different from its internal identifier\n  defined in cgroup_subsys.h.  Most subsystems use the matching name\n  but three - cpu, memory and perf_event - use different ones.\n\n* cgroup_subsys_id enums are postfixed with _subsys_id and each\n  cgroup_subsys is postfixed with _subsys.  cgroup.h is widely\n  included throughout various subsystems, it doesn\u0027t and shouldn\u0027t\n  have claim on such generic names which don\u0027t have any qualifier\n  indicating that they belong to cgroup.\n\n* cgroup_subsys-\u003esubsys_id should always equal the matching\n  cgroup_subsys_id enum; however, we require each controller to\n  initialize it and then BUG if they don\u0027t match, which is a bit\n  silly.\n\nThis patch cleans up cgroup_subsys names and initialization by doing\nthe followings.\n\n* cgroup_subsys_id enums are now postfixed with _cgrp_id, and each\n  cgroup_subsys with _cgrp_subsys.\n\n* With the above, renaming subsys identifiers to match the userland\n  visible names doesn\u0027t cause any naming conflicts.  All non-matching\n  identifiers are renamed to match the official names.\n\n  cpu_cgroup -\u003e cpu\n  mem_cgroup -\u003e memory\n  perf -\u003e perf_event\n\n* controllers no longer need to initialize -\u003esubsys_id and -\u003ename.\n  They\u0027re generated in cgroup core and set automatically during boot.\n\n* Redundant cgroup_subsys declarations removed.\n\n* While updating BUG_ON()s in cgroup_init_early(), convert them to\n  WARN()s.  BUGging that early during boot is stupid - the kernel\n  can\u0027t print anything, even through serial console and the trap\n  handler doesn\u0027t even link stack frame properly for back-tracing.\n\nThis patch doesn\u0027t introduce any behavior changes.\n\nv2: Rebased on top of fe1217c4f3f7 (\"net: net_cls: move cgroupfs\n    classid handling into core\").\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Neil Horman \u003cnhorman@tuxdriver.com\u003e\nAcked-by: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@rjwysocki.net\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nAcked-by: Aristeu Rozanski \u003caris@redhat.com\u003e\nAcked-by: Ingo Molnar \u003cmingo@redhat.com\u003e\nAcked-by: Li Zefan \u003clizefan@huawei.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Serge E. Hallyn \u003cserue@us.ibm.com\u003e\nCc: Vivek Goyal \u003cvgoyal@redhat.com\u003e\nCc: Thomas Graf \u003ctgraf@suug.ch\u003e\n"
    },
    {
      "commit": "1aa13254259bdef0bca723849ab3bab308d2f0c3",
      "tree": "4d2207788bf99f908ffed696f9d58c96eaf0b8b0",
      "parents": [
        "363a044f739b0f07a8c063b838c5528d10720e02"
      ],
      "author": {
        "name": "Vladimir Davydov",
        "email": "vdavydov@parallels.com",
        "time": "Thu Jan 23 15:52:58 2014 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 23 16:36:51 2014 -0800"
      },
      "message": "memcg, slab: clean up memcg cache initialization/destruction\n\nCurrently, we have rather a messy function set relating to per-memcg\nkmem cache initialization/destruction.\n\nPer-memcg caches are created in memcg_create_kmem_cache().  This\nfunction calls kmem_cache_create_memcg() to allocate and initialize a\nkmem cache and then \"registers\" the new cache in the\nmemcg_params::memcg_caches array of the parent cache.\n\nDuring its work-flow, kmem_cache_create_memcg() executes the following\nmemcg-related functions:\n\n - memcg_alloc_cache_params(), to initialize memcg_params of the newly\n   created cache;\n - memcg_cache_list_add(), to add the new cache to the memcg_slab_caches\n   list.\n\nOn the other hand, kmem_cache_destroy() called on a cache destruction\nonly calls memcg_release_cache(), which does all the work: it cleans the\nreference to the cache in its parent\u0027s memcg_params::memcg_caches,\nremoves the cache from the memcg_slab_caches list, and frees\nmemcg_params.\n\nSuch an inconsistency between destruction and initialization paths make\nthe code difficult to read, so let\u0027s clean this up a bit.\n\nThis patch moves all the code relating to registration of per-memcg\ncaches (adding to memcg list, setting the pointer to a cache from its\nparent) to the newly created memcg_register_cache() and\nmemcg_unregister_cache() functions making the initialization and\ndestruction paths look symmetrical.\n\nSigned-off-by: Vladimir Davydov \u003cvdavydov@parallels.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Glauber Costa \u003cglommer@gmail.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Pekka Enberg \u003cpenberg@kernel.org\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "363a044f739b0f07a8c063b838c5528d10720e02",
      "tree": "94ed7eda83ddb72ffe775bfe7540890c409f3ec3",
      "parents": [
        "3965fc3652244651006ebb31c8c45318ce84818f"
      ],
      "author": {
        "name": "Vladimir Davydov",
        "email": "vdavydov@parallels.com",
        "time": "Thu Jan 23 15:52:56 2014 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 23 16:36:51 2014 -0800"
      },
      "message": "memcg, slab: kmem_cache_create_memcg(): fix memleak on fail path\n\nWe do not free the cache\u0027s memcg_params if __kmem_cache_create fails.\nFix this.\n\nPlus, rename memcg_register_cache() to memcg_alloc_cache_params(),\nbecause it actually does not register the cache anywhere, but simply\ninitialize kmem_cache::memcg_params.\n\n[akpm@linux-foundation.org: fix build]\nSigned-off-by: Vladimir Davydov \u003cvdavydov@parallels.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Glauber Costa \u003cglommer@gmail.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Pekka Enberg \u003cpenberg@kernel.org\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4942642080ea82d99ab5b653abb9a12b7ba31f4a",
      "tree": "7ec12b61f0bfdd1f1466e5233b67432828b25c33",
      "parents": [
        "c88b05b2cd07221cdefd56f7f7422c1459eb60c9"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Wed Oct 16 13:46:59 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Oct 16 21:35:53 2013 -0700"
      },
      "message": "mm: memcg: handle non-error OOM situations more gracefully\n\nCommit 3812c8c8f395 (\"mm: memcg: do not trap chargers with full\ncallstack on OOM\") assumed that only a few places that can trigger a\nmemcg OOM situation do not return VM_FAULT_OOM, like optional page cache\nreadahead.  But there are many more and it\u0027s impractical to annotate\nthem all.\n\nFirst of all, we don\u0027t want to invoke the OOM killer when the failed\nallocation is gracefully handled, so defer the actual kill to the end of\nthe fault handling as well.  This simplifies the code quite a bit for\nadded bonus.\n\nSecond, since a failed allocation might not be the abrupt end of the\nfault, the memcg OOM handler needs to be re-entrant until the fault\nfinishes for subsequent allocation attempts.  If an allocation is\nattempted after the task already OOMed, allow it to bypass the limit so\nthat it can quickly finish the fault and invoke the OOM killer.\n\nReported-by: azurIt \u003cazurit@pobox.sk\u003e\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\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": "0608f43da64a1f1c42507304b5f25bc8b1227aa4",
      "tree": "3138a251439bee1f12bd176f41f3fc63e194f455",
      "parents": [
        "bb4cc1a8b5eaf3b9e5707d7c270400b05d11a2b7"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Tue Sep 24 15:27:41 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 24 17:00:26 2013 -0700"
      },
      "message": "revert \"memcg, vmscan: integrate soft reclaim tighter with zone shrinking code\"\n\nRevert commit 3b38722efd9f (\"memcg, vmscan: integrate soft reclaim\ntighter with zone shrinking code\")\n\nI merged this prematurely - Michal and Johannes still disagree about the\noverall design direction and the future remains unclear.\n\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b1aff7fcf86c88472b0a70f15d89d7a4adba07bb",
      "tree": "00a1b6194f6abe8a93a1bfb180365800a2873b65",
      "parents": [
        "694fbc0fe78518d06efa63910bf4ecee660e7852"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Tue Sep 24 15:27:38 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 24 17:00:26 2013 -0700"
      },
      "message": "revert \"vmscan, memcg: do softlimit reclaim also for targeted reclaim\"\n\nRevert commit a5b7c87f9207 (\"vmscan, memcg: do softlimit reclaim also\nfor targeted reclaim\")\n\nI merged this prematurely - Michal and Johannes still disagree about the\noverall design direction and the future remains unclear.\n\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "694fbc0fe78518d06efa63910bf4ecee660e7852",
      "tree": "895244c4cc010759ce5c29333bee3cddc8c852d2",
      "parents": [
        "30361e51cae7a4df3fec89f935a450a6fe6f16fa"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Tue Sep 24 15:27:37 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 24 17:00:26 2013 -0700"
      },
      "message": "revert \"memcg: enhance memcg iterator to support predicates\"\n\nRevert commit de57780dc659 (\"memcg: enhance memcg iterator to support\npredicates\")\n\nI merged this prematurely - Michal and Johannes still disagree about the\noverall design direction and the future remains unclear.\n\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3ea67d06e4679a16f69f66f43a8d6ee4778985fc",
      "tree": "0ec35a312de85ce91bf0bf6e4c5b88440f3d0f1d",
      "parents": [
        "658b72c5a7a033f0dde61b15dff86bf423ce425e"
      ],
      "author": {
        "name": "Sha Zhengju",
        "email": "handai.szj@taobao.com",
        "time": "Thu Sep 12 15:13:53 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 12 15:38:02 2013 -0700"
      },
      "message": "memcg: add per cgroup writeback pages accounting\n\nAdd memcg routines to count writeback pages, later dirty pages will also\nbe accounted.\n\nAfter Kame\u0027s commit 89c06bd52fb9 (\"memcg: use new logic for page stat\naccounting\"), we can use \u0027struct page\u0027 flag to test page state instead\nof per page_cgroup flag.  But memcg has a feature to move a page from a\ncgroup to another one and may have race between \"move\" and \"page stat\naccounting\".  So in order to avoid the race we have designed a new lock:\n\n         mem_cgroup_begin_update_page_stat()\n         modify page information        --\u003e(a)\n         mem_cgroup_update_page_stat()  --\u003e(b)\n         mem_cgroup_end_update_page_stat()\n\nIt requires both (a) and (b)(writeback pages accounting) to be pretected\nin mem_cgroup_{begin/end}_update_page_stat().  It\u0027s full no-op for\n!CONFIG_MEMCG, almost no-op if memcg is disabled (but compiled in), rcu\nread lock in the most cases (no task is moving), and spin_lock_irqsave\non top in the slow path.\n\nThere\u0027re two writeback interfaces to modify: test_{clear/set}_page_writeback().\nAnd the lock order is:\n\t--\u003e memcg-\u003emove_lock\n\t  --\u003e mapping-\u003etree_lock\n\nSigned-off-by: Sha Zhengju \u003chandai.szj@taobao.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "68b4876d996e8749142b2895bc2e251448996363",
      "tree": "bd21b2e160d48dc38b11869c1bef5d38100ddd98",
      "parents": [
        "1a36e59d4833de19120dc7482c61ef69e228c73c"
      ],
      "author": {
        "name": "Sha Zhengju",
        "email": "handai.szj@taobao.com",
        "time": "Thu Sep 12 15:13:50 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 12 15:38:02 2013 -0700"
      },
      "message": "memcg: remove MEMCG_NR_FILE_MAPPED\n\nWhile accounting memcg page stat, it\u0027s not worth to use\nMEMCG_NR_FILE_MAPPED as an extra layer of indirection because of the\ncomplexity and presumed performance overhead.  We can use\nMEM_CGROUP_STAT_FILE_MAPPED directly.\n\nSigned-off-by: Sha Zhengju \u003chandai.szj@taobao.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nReviewed-by: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3812c8c8f3953921ef18544110dafc3505c1ac62",
      "tree": "8e5efc15fec4700644774df5fb5302f5c82f4a31",
      "parents": [
        "fb2a6fc56be66c169f8b80e07ed999ba453a2db2"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Sep 12 15:13:44 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 12 15:38:02 2013 -0700"
      },
      "message": "mm: memcg: do not trap chargers with full callstack on OOM\n\nThe memcg OOM handling is incredibly fragile and can deadlock.  When a\ntask fails to charge memory, it invokes the OOM killer and loops right\nthere in the charge code until it succeeds.  Comparably, any other task\nthat enters the charge path at this point will go to a waitqueue right\nthen and there and sleep until the OOM situation is resolved.  The problem\nis that these tasks may hold filesystem locks and the mmap_sem; locks that\nthe selected OOM victim may need to exit.\n\nFor example, in one reported case, the task invoking the OOM killer was\nabout to charge a page cache page during a write(), which holds the\ni_mutex.  The OOM killer selected a task that was just entering truncate()\nand trying to acquire the i_mutex:\n\nOOM invoking task:\n  mem_cgroup_handle_oom+0x241/0x3b0\n  mem_cgroup_cache_charge+0xbe/0xe0\n  add_to_page_cache_locked+0x4c/0x140\n  add_to_page_cache_lru+0x22/0x50\n  grab_cache_page_write_begin+0x8b/0xe0\n  ext3_write_begin+0x88/0x270\n  generic_file_buffered_write+0x116/0x290\n  __generic_file_aio_write+0x27c/0x480\n  generic_file_aio_write+0x76/0xf0           # takes -\u003ei_mutex\n  do_sync_write+0xea/0x130\n  vfs_write+0xf3/0x1f0\n  sys_write+0x51/0x90\n  system_call_fastpath+0x18/0x1d\n\nOOM kill victim:\n  do_truncate+0x58/0xa0              # takes i_mutex\n  do_last+0x250/0xa30\n  path_openat+0xd7/0x440\n  do_filp_open+0x49/0xa0\n  do_sys_open+0x106/0x240\n  sys_open+0x20/0x30\n  system_call_fastpath+0x18/0x1d\n\nThe OOM handling task will retry the charge indefinitely while the OOM\nkilled task is not releasing any resources.\n\nA similar scenario can happen when the kernel OOM killer for a memcg is\ndisabled and a userspace task is in charge of resolving OOM situations.\nIn this case, ALL tasks that enter the OOM path will be made to sleep on\nthe OOM waitqueue and wait for userspace to free resources or increase\nthe group\u0027s limit.  But a userspace OOM handler is prone to deadlock\nitself on the locks held by the waiting tasks.  For example one of the\nsleeping tasks may be stuck in a brk() call with the mmap_sem held for\nwriting but the userspace handler, in order to pick an optimal victim,\nmay need to read files from /proc/\u003cpid\u003e, which tries to acquire the same\nmmap_sem for reading and deadlocks.\n\nThis patch changes the way tasks behave after detecting a memcg OOM and\nmakes sure nobody loops or sleeps with locks held:\n\n1. When OOMing in a user fault, invoke the OOM killer and restart the\n   fault instead of looping on the charge attempt.  This way, the OOM\n   victim can not get stuck on locks the looping task may hold.\n\n2. When OOMing in a user fault but somebody else is handling it\n   (either the kernel OOM killer or a userspace handler), don\u0027t go to\n   sleep in the charge context.  Instead, remember the OOMing memcg in\n   the task struct and then fully unwind the page fault stack with\n   -ENOMEM.  pagefault_out_of_memory() will then call back into the\n   memcg code to check if the -ENOMEM came from the memcg, and then\n   either put the task to sleep on the memcg\u0027s OOM waitqueue or just\n   restart the fault.  The OOM victim can no longer get stuck on any\n   lock a sleeping task may hold.\n\nDebugged by Michal Hocko.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReported-by: azurIt \u003cazurit@pobox.sk\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: David Rientjes \u003crientjes@google.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": "519e52473ebe9db5cdef44670d5a97f1fd53d721",
      "tree": "635fce64ff3658250745b9c8dfebd47e981a5b16",
      "parents": [
        "3a13c4d761b4b979ba8767f42345fed3274991b0"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Sep 12 15:13:42 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 12 15:38:01 2013 -0700"
      },
      "message": "mm: memcg: enable memcg OOM killer only for user faults\n\nSystem calls and kernel faults (uaccess, gup) can handle an out of memory\nsituation gracefully and just return -ENOMEM.\n\nEnable the memcg OOM killer only for user faults, where it\u0027s really the\nonly option available.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: azurIt \u003cazurit@pobox.sk\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": "de57780dc659f95b17ccb649f003278dde0b5b86",
      "tree": "d2493cc412c16946f3ead9158a61b26dd1f0c45a",
      "parents": [
        "a5b7c87f92076352dbff2fe0423ec255e1c9a71b"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Thu Sep 12 15:13:26 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 12 15:38:00 2013 -0700"
      },
      "message": "memcg: enhance memcg iterator to support predicates\n\nThe caller of the iterator might know that some nodes or even subtrees\nshould be skipped but there is no way to tell iterators about that so the\nonly choice left is to let iterators to visit each node and do the\nselection outside of the iterating code.  This, however, doesn\u0027t scale\nwell with hierarchies with many groups where only few groups are\ninteresting.\n\nThis patch adds mem_cgroup_iter_cond variant of the iterator with a\ncallback which gets called for every visited node.  There are three\npossible ways how the callback can influence the walk.  Either the node is\nvisited, it is skipped but the tree walk continues down the tree or the\nwhole subtree of the current group is skipped.\n\n[hughd@google.com: fix memcg-less page reclaim]\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Glauber Costa \u003cglommer@openvz.org\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: 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": "a5b7c87f92076352dbff2fe0423ec255e1c9a71b",
      "tree": "fbc14b98d1412a078fc570914b050cd618e359f2",
      "parents": [
        "e883110aad718b65de658db77387aaa69cce996d"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Thu Sep 12 15:13:25 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 12 15:38:00 2013 -0700"
      },
      "message": "vmscan, memcg: do softlimit reclaim also for targeted reclaim\n\nSoft reclaim has been done only for the global reclaim (both background\nand direct).  Since \"memcg: integrate soft reclaim tighter with zone\nshrinking code\" there is no reason for this limitation anymore as the soft\nlimit reclaim doesn\u0027t use any special code paths and it is a part of the\nzone shrinking code which is used by both global and targeted reclaims.\n\nFrom the semantic point of view it is natural to consider soft limit\nbefore touching all groups in the hierarchy tree which is touching the\nhard limit because soft limit tells us where to push back when there is a\nmemory pressure.  It is not important whether the pressure comes from the\nlimit or imbalanced zones.\n\nThis patch simply enables soft reclaim unconditionally in\nmem_cgroup_should_soft_reclaim so it is enabled for both global and\ntargeted reclaim paths.  mem_cgroup_soft_reclaim_eligible needs to learn\nabout the root of the reclaim to know where to stop checking soft limit\nstate of parents up the hierarchy.  Say we have\n\nA (over soft limit)\n \\\n  B (below s.l., hit the hard limit)\n / \\\nC   D (below s.l.)\n\nB is the source of the outside memory pressure now for D but we shouldn\u0027t\nsoft reclaim it because it is behaving well under B subtree and we can\nstill reclaim from C (pressumably it is over the limit).\nmem_cgroup_soft_reclaim_eligible should therefore stop climbing up the\nhierarchy at B (root of the memory pressure).\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Glauber Costa \u003cglommer@openvz.org\u003e\nReviewed-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Michel Lespinasse \u003cwalken@google.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": "3b38722efd9f66da63bbbd41520c2e6fa9db3d68",
      "tree": "aeec255d0358051b8ffe83f6744a2054b383c62e",
      "parents": [
        "c33bd8354f3a3bb26a98d2b6bf600b7b35657328"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Thu Sep 12 15:13:21 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 12 15:38:00 2013 -0700"
      },
      "message": "memcg, vmscan: integrate soft reclaim tighter with zone shrinking code\n\nThis patchset is sitting out of tree for quite some time without any\nobjections.  I would be really happy if it made it into 3.12.  I do not\nwant to push it too hard but I think this work is basically ready and\nwaiting more doesn\u0027t help.\n\nThe basic idea is quite simple.  Pull soft reclaim into shrink_zone in the\nfirst step and get rid of the previous soft reclaim infrastructure.\nshrink_zone is done in two passes now.  First it tries to do the soft\nlimit reclaim and it falls back to reclaim-all mode if no group is over\nthe limit or no pages have been scanned.  The second pass happens at the\nsame priority so the only time we waste is the memcg tree walk which has\nbeen updated in the third step to have only negligible overhead.\n\nAs a bonus we will get rid of a _lot_ of code by this and soft reclaim\nwill not stand out like before when it wasn\u0027t integrated into the zone\nshrinking code and it reclaimed at priority 0 (the testing results show\nthat some workloads suffers from such an aggressive reclaim).  The clean\nup is in a separate patch because I felt it would be easier to review that\nway.\n\nThe second step is soft limit reclaim integration into targeted reclaim.\nIt should be rather straight forward.  Soft limit has been used only for\nthe global reclaim so far but it makes sense for any kind of pressure\ncoming from up-the-hierarchy, including targeted reclaim.\n\nThe third step (patches 4-8) addresses the tree walk overhead by enhancing\nmemcg iterators to enable skipping whole subtrees and tracking number of\nover soft limit children at each level of the hierarchy.  This information\nis updated same way the old soft limit tree was updated (from\nmemcg_check_events) so we shouldn\u0027t see an additional overhead.  In fact\nmem_cgroup_update_soft_limit is much simpler than tree manipulation done\npreviously.\n\n__shrink_zone uses mem_cgroup_soft_reclaim_eligible as a predicate for\nmem_cgroup_iter so the decision whether a particular group should be\nvisited is done at the iterator level which allows us to decide to skip\nthe whole subtree as well (if there is no child in excess).  This reduces\nthe tree walk overhead considerably.\n\n* TEST 1\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nMy primary test case was a parallel kernel build with 2 groups (make is\nrunning with -j8 with a distribution .config in a separate cgroup without\nany hard limit) on a 32 CPU machine booted with 1GB memory and both builds\nrun taskset to Node 0 cpus.\n\nI was mostly interested in 2 setups.  Default - no soft limit set and -\nand 0 soft limit set to both groups.  The first one should tell us whether\nthe rework regresses the default behavior while the second one should show\nus improvements in an extreme case where both workloads are always over\nthe soft limit.\n\n/usr/bin/time -v has been used to collect the statistics and each\nconfiguration had 3 runs after fresh boot without any other load on the\nsystem.\n\nbase is mmotm-2013-07-18-16-40\nrework all 8 patches applied on top of base\n\n* No-limit\nUser\nno-limit/base: min: 651.92 max: 672.65 avg: 664.33 std: 8.01 runs: 6\nno-limit/rework: min: 657.34 [100.8%] max: 668.39 [99.4%] avg: 663.13 [99.8%] std: 3.61 runs: 6\nSystem\nno-limit/base: min: 69.33 max: 71.39 avg: 70.32 std: 0.79 runs: 6\nno-limit/rework: min: 69.12 [99.7%] max: 71.05 [99.5%] avg: 70.04 [99.6%] std: 0.59 runs: 6\nElapsed\nno-limit/base: min: 398.27 max: 422.36 avg: 408.85 std: 7.74 runs: 6\nno-limit/rework: min: 386.36 [97.0%] max: 438.40 [103.8%] avg: 416.34 [101.8%] std: 18.85 runs: 6\n\nThe results are within noise. Elapsed time has a bigger variance but the\naverage looks good.\n\n* 0-limit\nUser\n0-limit/base: min: 573.76 max: 605.63 avg: 585.73 std: 12.21 runs: 6\n0-limit/rework: min: 645.77 [112.6%] max: 666.25 [110.0%] avg: 656.97 [112.2%] std: 7.77 runs: 6\nSystem\n0-limit/base: min: 69.57 max: 71.13 avg: 70.29 std: 0.54 runs: 6\n0-limit/rework: min: 68.68 [98.7%] max: 71.40 [100.4%] avg: 69.91 [99.5%] std: 0.87 runs: 6\nElapsed\n0-limit/base: min: 1306.14 max: 1550.17 avg: 1430.35 std: 90.86 runs: 6\n0-limit/rework: min: 404.06 [30.9%] max: 465.94 [30.1%] avg: 434.81 [30.4%] std: 22.68 runs: 6\n\nThe improvement is really huge here (even bigger than with my previous\ntesting and I suspect that this highly depends on the storage).  Page\nfault statistics tell us at least part of the story:\n\nMinor\n0-limit/base: min: 37180461.00 max: 37319986.00 avg: 37247470.00 std: 54772.71 runs: 6\n0-limit/rework: min: 36751685.00 [98.8%] max: 36805379.00 [98.6%] avg: 36774506.33 [98.7%] std: 17109.03 runs: 6\nMajor\n0-limit/base: min: 170604.00 max: 221141.00 avg: 196081.83 std: 18217.01 runs: 6\n0-limit/rework: min: 2864.00 [1.7%] max: 10029.00 [4.5%] avg: 5627.33 [2.9%] std: 2252.71 runs: 6\n\nSame as with my previous testing Minor faults are more or less within\nnoise but Major fault count is way bellow the base kernel.\n\nWhile this looks as a nice win it is fair to say that 0-limit\nconfiguration is quite artificial. So I was playing with 0-no-limit\nloads as well.\n\n* TEST 2\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nThe following results are from 2 groups configuration on a 16GB machine\n(single NUMA node).\n\n- A running stream IO (dd if\u003d/dev/zero of\u003dlocal.file bs\u003d1024) with\n  2*TotalMem with 0 soft limit.\n- B running a mem_eater which consumes TotalMem-1G without any limit. The\n  mem_eater consumes the memory in 100 chunks with 1s nap after each\n  mmap+poppulate so that both loads have chance to fight for the memory.\n\nThe expected result is that B shouldn\u0027t be reclaimed and A shouldn\u0027t see\na big dropdown in elapsed time.\n\nUser\nbase: min: 2.68 max: 2.89 avg: 2.76 std: 0.09 runs: 3\nrework: min: 3.27 [122.0%] max: 3.74 [129.4%] avg: 3.44 [124.6%] std: 0.21 runs: 3\nSystem\nbase: min: 86.26 max: 88.29 avg: 87.28 std: 0.83 runs: 3\nrework: min: 81.05 [94.0%] max: 84.96 [96.2%] avg: 83.14 [95.3%] std: 1.61 runs: 3\nElapsed\nbase: min: 317.28 max: 332.39 avg: 325.84 std: 6.33 runs: 3\nrework: min: 281.53 [88.7%] max: 298.16 [89.7%] avg: 290.99 [89.3%] std: 6.98 runs: 3\n\nSystem time improved slightly as well as Elapsed. My previous testing\nhas shown worse numbers but this again seem to depend on the storage\nspeed.\n\nMy theory is that the writeback doesn\u0027t catch up and prio-0 soft reclaim\nfalls into wait on writeback page too often in the base kernel. The\npatched kernel doesn\u0027t do that because the soft reclaim is done from the\nkswapd/direct reclaim context. This can be seen on the following graph\nnicely. The A\u0027s group usage_in_bytes regurarly drops really low very often.\n\nAll 3 runs\nhttp://labs.suse.cz/mhocko/soft_limit_rework/stream_io-vs-mem_eater/stream.png\nresp. a detail of the single run\nhttp://labs.suse.cz/mhocko/soft_limit_rework/stream_io-vs-mem_eater/stream-one-run.png\n\nmem_eater seems to be doing better as well. It gets to the full\nallocation size faster as can be seen on the following graph:\nhttp://labs.suse.cz/mhocko/soft_limit_rework/stream_io-vs-mem_eater/mem_eater-one-run.png\n\n/proc/meminfo collected during the test also shows that rework kernel\nhasn\u0027t swapped that much (well almost not at all):\nbase: max: 123900 K avg: 56388.29 K\nrework: max: 300 K avg: 128.68 K\n\nkswapd and direct reclaim statistics are of no use unfortunatelly because\nsoft reclaim is not accounted properly as the counters are hidden by\nglobal_reclaim() checks in the base kernel.\n\n* TEST 3\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nAnother test was the same configuration as TEST2 except the stream IO was\nreplaced by a single kbuild (16 parallel jobs bound to Node0 cpus same as\nin TEST1) and mem_eater allocated TotalMem-200M so kbuild had only 200MB\nleft.\n\nKbuild did better with the rework kernel here as well:\nUser\nbase: min: 860.28 max: 872.86 avg: 868.03 std: 5.54 runs: 3\nrework: min: 880.81 [102.4%] max: 887.45 [101.7%] avg: 883.56 [101.8%] std: 2.83 runs: 3\nSystem\nbase: min: 84.35 max: 85.06 avg: 84.79 std: 0.31 runs: 3\nrework: min: 85.62 [101.5%] max: 86.09 [101.2%] avg: 85.79 [101.2%] std: 0.21 runs: 3\nElapsed\nbase: min: 135.36 max: 243.30 avg: 182.47 std: 45.12 runs: 3\nrework: min: 110.46 [81.6%] max: 116.20 [47.8%] avg: 114.15 [62.6%] std: 2.61 runs: 3\nMinor\nbase: min: 36635476.00 max: 36673365.00 avg: 36654812.00 std: 15478.03 runs: 3\nrework: min: 36639301.00 [100.0%] max: 36695541.00 [100.1%] avg: 36665511.00 [100.0%] std: 23118.23 runs: 3\nMajor\nbase: min: 14708.00 max: 53328.00 avg: 31379.00 std: 16202.24 runs: 3\nrework: min: 302.00 [2.1%] max: 414.00 [0.8%] avg: 366.33 [1.2%] std: 47.22 runs: 3\n\nAgain we can see a significant improvement in Elapsed (it also seems to\nbe more stable), there is a huge dropdown for the Major page faults and\nmuch more swapping:\nbase: max: 583736 K avg: 112547.43 K\nrework: max: 4012 K avg: 124.36 K\n\nGraphs from all three runs show the variability of the kbuild quite\nnicely.  It even seems that it took longer after every run with the base\nkernel which would be quite surprising as the source tree for the build is\nremoved and caches are dropped after each run so the build operates on a\nfreshly extracted sources everytime.\nhttp://labs.suse.cz/mhocko/soft_limit_rework/stream_io-vs-mem_eater/kbuild-mem_eater.png\n\nMy other testing shows that this is just a matter of timing and other runs\nbehave differently the std for Elapsed time is similar ~50.  Example of\nother three runs:\nhttp://labs.suse.cz/mhocko/soft_limit_rework/stream_io-vs-mem_eater/kbuild-mem_eater2.png\n\nSo to wrap this up.  The series is still doing good and improves the soft\nlimit.\n\nThe testing results for bunch of cgroups with both stream IO and kbuild\nloads can be found in \"memcg: track children in soft limit excess to\nimprove soft limit\".\n\nThis patch:\n\nMemcg soft reclaim has been traditionally triggered from the global\nreclaim paths before calling shrink_zone.  mem_cgroup_soft_limit_reclaim\nthen picked up a group which exceeds the soft limit the most and reclaimed\nit with 0 priority to reclaim at least SWAP_CLUSTER_MAX pages.\n\nThe infrastructure requires per-node-zone trees which hold over-limit\ngroups and keep them up-to-date (via memcg_check_events) which is not cost\nfree.  Although this overhead hasn\u0027t turned out to be a bottle neck the\nimplementation is suboptimal because mem_cgroup_update_tree has no idea\nwhich zones consumed memory over the limit so we could easily end up\nhaving a group on a node-zone tree having only few pages from that\nnode-zone.\n\nThis patch doesn\u0027t try to fix node-zone trees management because it seems\nthat integrating soft reclaim into zone shrinking sounds much easier and\nmore appropriate for several reasons.  First of all 0 priority reclaim was\na crude hack which might lead to big stalls if the group\u0027s LRUs are big\nand hard to reclaim (e.g.  a lot of dirty/writeback pages).  Soft reclaim\nshould be applicable also to the targeted reclaim which is awkward right\nnow without additional hacks.  Last but not least the whole infrastructure\neats quite some code.\n\nAfter this patch shrink_zone is done in 2 passes.  First it tries to do\nthe soft reclaim if appropriate (only for global reclaim for now to keep\ncompatible with the original state) and fall back to ignoring soft limit\nif no group is eligible to soft reclaim or nothing has been scanned during\nthe first pass.  Only groups which are over their soft limit or any of\ntheir parents up the hierarchy is over the limit are considered eligible\nduring the first pass.\n\nSoft limit tree which is not necessary anymore will be removed in the\nfollow up patch to make this patch smaller and easier to review.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Glauber Costa \u003cglommer@openvz.org\u003e\nReviewed-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Glauber Costa \u003cglommer@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": "182446d087906de40e514573a92a97b203695f71",
      "tree": "6aee96219c82d0a64b9d389c50666c1ce0ec27ee",
      "parents": [
        "67f4c36f83455b253445b2cb28ac9a2c4f85d99a"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 08 20:11:24 2013 -0400"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 08 20:11:24 2013 -0400"
      },
      "message": "cgroup: pass around cgroup_subsys_state instead of cgroup in file methods\n\ncgroup is currently in the process of transitioning to using struct\ncgroup_subsys_state * as the primary handle instead of struct cgroup.\nPlease see the previous commit which converts the subsystem methods\nfor rationale.\n\nThis patch converts all cftype file operations to take @css instead of\n@cgroup.  cftypes for the cgroup core files don\u0027t have their subsytem\npointer set.  These will automatically use the dummy_css added by the\nprevious patch and can be converted the same way.\n\nMost subsystem conversions are straight forwards but there are some\ninteresting ones.\n\n* freezer: update_if_frozen() is also converted to take @css instead\n  of @cgroup for consistency.  This will make the code look simpler\n  too once iterators are converted to use css.\n\n* memory/vmpressure: mem_cgroup_from_css() needs to be exported to\n  vmpressure while mem_cgroup_from_cont() can be made static.\n  Updated accordingly.\n\n* cpu: cgroup_tg() doesn\u0027t have any user left.  Removed.\n\n* cpuacct: cgroup_ca() doesn\u0027t have any user left.  Removed.\n\n* hugetlb: hugetlb_cgroup_form_cgroup() doesn\u0027t have any user left.\n  Removed.\n\n* net_cls: cgrp_cls_state() doesn\u0027t have any user left.  Removed.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Li Zefan \u003clizefan@huawei.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Vivek Goyal \u003cvgoyal@redhat.com\u003e\nAcked-by: Aristeu Rozanski \u003caris@redhat.com\u003e\nAcked-by: Daniel Wagner \u003cdaniel.wagner@bmw-carit.de\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\n"
    },
    {
      "commit": "ffbdccf5e1facd18b54429a749667fb185c10f20",
      "tree": "b3c8cf7399bb6493568d02bce307dce45b4ea9d7",
      "parents": [
        "541c237c0923f567c9c4cabb8a81635baadc713f"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Jul 03 15:01:23 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jul 03 16:07:26 2013 -0700"
      },
      "message": "mm, memcg: don\u0027t take task_lock in task_in_mem_cgroup\n\nFor processes that have detached their mm\u0027s, task_in_mem_cgroup()\nunnecessarily takes task_lock() when rcu_read_lock() is all that is\nnecessary to call mem_cgroup_from_task().\n\nWhile we\u0027re here, switch task_in_mem_cgroup() to return bool.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\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": "e3790144c9091631a18564aa64db8a971da02c41",
      "tree": "5bdfc979f120d647ed617893ab9e300c2b4913c5",
      "parents": [
        "860f2759d94bf9db637d85d75d074de88af54688"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Fri Feb 22 16:35:19 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:20 2013 -0800"
      },
      "message": "mm: refactor inactive_file_is_low() to use get_lru_size()\n\nAn inactive file list is considered low when its active counterpart is\nbigger, regardless of whether it is a global zone LRU list or a memcg\nzone LRU list.  The only difference is in how the LRU size is assessed.\n\nget_lru_size() does the right thing for both global and memcg reclaim\nsituations.\n\nGet rid of inactive_file_is_low_global() and\nmem_cgroup_inactive_file_is_low() by using get_lru_size() and compare\nthe numbers in common code.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\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": "91c777d86752b00bb3a1d8efa3d8f7e1264f38a9",
      "tree": "bb9f3340c8109da5c29e57608f205e97a5f0e03d",
      "parents": [
        "631b0cfdbd801ceae8762e8d287f15da26792ebe"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Mon Feb 04 14:28:49 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Feb 05 20:38:48 2013 +1100"
      },
      "message": "memcg: fix typo in kmemcg cache walk macro\n\nThe macro for_each_memcg_cache_index contains a silly yet potentially\ndeadly mistake.  Although the macro parameter is _idx, the loop tests\nare done over i, not _idx.\n\nThis hasn\u0027t generated any problems so far, because all users use i as a\nloop index.  However, while playing with an extension of the code I\nended using another loop index and the compiler was quick to complain.\n\nUnfortunately, this is not the kind of thing that testing reveals \u003d(\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Kamezawa Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\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": "ebe945c27628fca03723582eba138acc2e2f3d15",
      "tree": "5998e8dd874aedf3b8873d0ffeaf658d10505655",
      "parents": [
        "92e793495597af4135d94314113bf13eafb0e663"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:23:10 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:15 2012 -0800"
      },
      "message": "memcg: add comments clarifying aspects of cache attribute propagation\n\nThis patch clarifies two aspects of cache attribute propagation.\n\nFirst, the expected context for the for_each_memcg_cache macro in\nmemcontrol.h.  The usages already in the codebase are safe.  In mm/slub.c,\nit is trivially safe because the lock is acquired right before the loop.\nIn mm/slab.c, it is less so: the lock is acquired by an outer function a\nfew steps back in the stack, so a VM_BUG_ON() is added to make sure it is\nindeed safe.\n\nA comment is also added to detail why we are returning the value of the\nparent cache and ignoring the children\u0027s when we propagate the attributes.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Kamezawa Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.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": "943a451a87d229ca564a27274b58eaeae35fde5d",
      "tree": "607a0bc1aba3911602dec1448be2ace190b5c1eb",
      "parents": [
        "749c54151a6e5b229e4ae067dbc651e54b161fbc"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:23:03 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:14 2012 -0800"
      },
      "message": "slab: propagate tunable values\n\nSLAB allows us to tune a particular cache behavior with tunables.  When\ncreating a new memcg cache copy, we\u0027d like to preserve any tunables the\nparent cache already had.\n\nThis could be done by an explicit call to do_tune_cpucache() after the\ncache is created.  But this is not very convenient now that the caches are\ncreated from common code, since this function is SLAB-specific.\n\nAnother method of doing that is taking advantage of the fact that\ndo_tune_cpucache() is always called from enable_cpucache(), which is\ncalled at cache initialization.  We can just preset the values, and then\nthings work as expected.\n\nIt can also happen that a root cache has its tunables updated during\nnormal system operation.  In this case, we will propagate the change to\nall caches that are already active.\n\nThis change will require us to move the assignment of root_cache in\nmemcg_params a bit earlier.  We need this to be already set - which\nmemcg_kmem_register_cache will do - when we reach __kmem_cache_create()\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@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": "749c54151a6e5b229e4ae067dbc651e54b161fbc",
      "tree": "8d2d858e76e44d1bbf64439c189a57c18c8e60ae",
      "parents": [
        "22933152934f30de6f05b600c03f8a08f853a8d2"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:23:01 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:14 2012 -0800"
      },
      "message": "memcg: aggregate memcg cache values in slabinfo\n\nWhen we create caches in memcgs, we need to display their usage\ninformation somewhere.  We\u0027ll adopt a scheme similar to /proc/meminfo,\nwith aggregate totals shown in the global file, and per-group information\nstored in the group itself.\n\nFor the time being, only reads are allowed in the per-group cache.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@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": "7cf2798240a2a2230cb16a391beef98d8a7ad362",
      "tree": "989f28b74d08bf91938cc5a7fe632faa32e7542f",
      "parents": [
        "1f458cbf122288b23620ee822e19bcbb76c8d6ec"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:22:55 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:14 2012 -0800"
      },
      "message": "memcg/sl[au]b: track all the memcg children of a kmem_cache\n\nThis enables us to remove all the children of a kmem_cache being\ndestroyed, if for example the kernel module it\u0027s being used in gets\nunloaded.  Otherwise, the children will still point to the destroyed\nparent.\n\nSigned-off-by: Suleiman Souhlal \u003csuleiman@google.com\u003e\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Tejun Heo \u003ctj@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": "1f458cbf122288b23620ee822e19bcbb76c8d6ec",
      "tree": "fa434b9ff6d6bdfd2daaf24fd7812cc975cba7b7",
      "parents": [
        "d79923fad95b0cdf7770e024677180c734cb7148"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:22:50 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:14 2012 -0800"
      },
      "message": "memcg: destroy memcg caches\n\nImplement destruction of memcg caches.  Right now, only caches where our\nreference counter is the last remaining are deleted.  If there are any\nother reference counters around, we just leave the caches lying around\nuntil they go away.\n\nWhen that happens, a destruction function is called from the cache code.\nCaches are only destroyed in process context, so we queue them up for\nlater processing in the general case.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@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": "b9ce5ef49f00daf2254c6953c8d31f79aabccd34",
      "tree": "1da6afdbb3dc2e2d31f588dbfbf502e984af48a6",
      "parents": [
        "0e9d92f2d02d8c8320f0502307c688d07bdac2b3"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:22:46 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:14 2012 -0800"
      },
      "message": "sl[au]b: always get the cache from its page in kmem_cache_free()\n\nstruct page already has this information.  If we start chaining caches,\nthis information will always be more trustworthy than whatever is passed\ninto the function.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@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": "d7f25f8a2f81252d1ac134470ba1d0a287cf8fcd",
      "tree": "ecde8b5d98762e15a6fa1984d098ddf86646942b",
      "parents": [
        "55007d849759252ddd573aeb36143b947202d509"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:22:40 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:14 2012 -0800"
      },
      "message": "memcg: infrastructure to match an allocation to the right cache\n\nThe page allocator is able to bind a page to a memcg when it is\nallocated.  But for the caches, we\u0027d like to have as many objects as\npossible in a page belonging to the same cache.\n\nThis is done in this patch by calling memcg_kmem_get_cache in the\nbeginning of every allocation function.  This function is patched out by\nstatic branches when kernel memory controller is not being used.\n\nIt assumes that the task allocating, which determines the memcg in the\npage allocator, belongs to the same cgroup throughout the whole process.\nMisaccounting can happen if the task calls memcg_kmem_get_cache() while\nbelonging to a cgroup, and later on changes.  This is considered\nacceptable, and should only happen upon task migration.\n\nBefore the cache is created by the memcg core, there is also a possible\nimbalance: the task belongs to a memcg, but the cache being allocated from\nis the global cache, since the child cache is not yet guaranteed to be\nready.  This case is also fine, since in this case the GFP_KMEMCG will not\nbe passed and the page allocator will not attempt any cgroup accounting.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@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": "55007d849759252ddd573aeb36143b947202d509",
      "tree": "d042bc2f717922fb73f9d526592eeb331c2f0f70",
      "parents": [
        "2633d7a028239a738b793be5ca8fa6ac312f5793"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:22:38 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:13 2012 -0800"
      },
      "message": "memcg: allocate memory for memcg caches whenever a new memcg appears\n\nEvery cache that is considered a root cache (basically the \"original\"\ncaches, tied to the root memcg/no-memcg) will have an array that should be\nlarge enough to store a cache pointer per each memcg in the system.\n\nTheoreticaly, this is as high as 1 \u003c\u003c sizeof(css_id), which is currently\nin the 64k pointers range.  Most of the time, we won\u0027t be using that much.\n\nWhat goes in this patch, is a simple scheme to dynamically allocate such\nan array, in order to minimize memory usage for memcg caches.  Because we\nwould also like to avoid allocations all the time, at least for now, the\narray will only grow.  It will tend to be big enough to hold the maximum\nnumber of kmem-limited memcgs ever achieved.\n\nWe\u0027ll allocate it to be a minimum of 64 kmem-limited memcgs.  When we have\nmore than that, we\u0027ll start doubling the size of this array every time the\nlimit is reached.\n\nBecause we are only considering kmem limited memcgs, a natural point for\nthis to happen is when we write to the limit.  At that point, we already\nhave set_limit_mutex held, so that will become our natural synchronization\nmechanism.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@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": "2633d7a028239a738b793be5ca8fa6ac312f5793",
      "tree": "48a9f157b2c2a8218611aaade9667cacc2e018ec",
      "parents": [
        "6ccfb5bcf52bcf100fa085946f044fdbba015048"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:22:34 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:13 2012 -0800"
      },
      "message": "slab/slub: consider a memcg parameter in kmem_create_cache\n\nAllow a memcg parameter to be passed during cache creation.  When the slub\nallocator is being used, it will only merge caches that belong to the same\nmemcg.  We\u0027ll do this by scanning the global list, and then translating\nthe cache to a memcg-specific cache\n\nDefault function is created as a wrapper, passing NULL to the memcg\nversion.  We only merge caches that belong to the same memcg.\n\nA helper is provided, memcg_css_id: because slub needs a unique cache name\nfor sysfs.  Since this is visible, but not the canonical location for slab\ndata, the cache name is not used, the css_id should suffice.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@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": "a8964b9b84f99c0b1b5d7c09520f89f0700e742e",
      "tree": "468c57a6cd3bd03c91152ede7fdbcacc238341d2",
      "parents": [
        "7de37682bec35bbe0cd69b8112ef257bc5fb1c3e"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:22:09 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:13 2012 -0800"
      },
      "message": "memcg: use static branches when code not in use\n\nWe can use static branches to patch the code in or out when not used.\n\nBecause the _ACTIVE bit on kmem_accounted is only set after the increment\nis done, we guarantee that the root memcg will always be selected for kmem\ncharges until all call sites are patched (see memcg_kmem_enabled).  This\nguarantees that no mischarges are applied.\n\nStatic branch decrement happens when the last reference count from the\nkmem accounting in memcg dies.  This will only happen when the charges\ndrop down to 0.\n\nWhen that happens, we need to disable the static branch only on those\nmemcgs that enabled it.  To achieve this, we would be forced to complicate\nthe code by keeping track of which memcgs were the ones that actually\nenabled limits, and which ones got it from its parents.\n\nIt is a lot simpler just to do static_key_slow_inc() on every child\nthat is accounted.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Kamezawa Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@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": "7ae1e1d0f8ac2927ed7e3ca6d15e42d485903459",
      "tree": "6b95f008400510bee9a7742ee21bf5316a59f851",
      "parents": [
        "7a64bf05b2a6fe3703062d13d389e3eb904741c6"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Tue Dec 18 14:21:56 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 18 15:02:12 2012 -0800"
      },
      "message": "memcg: kmem controller infrastructure\n\nIntroduce infrastructure for tracking kernel memory pages to a given\nmemcg.  This will happen whenever the caller includes the flag\n__GFP_KMEMCG flag, and the task belong to a memcg other than the root.\n\nIn memcontrol.h those functions are wrapped in inline acessors.  The idea\nis to later on, patch those with static branches, so we don\u0027t incur any\noverhead when no mem cgroups with limited kmem are being used.\n\nUsers of this functionality shall interact with the memcg core code\nthrough the following functions:\n\nmemcg_kmem_newpage_charge: will return true if the group can handle the\n                           allocation. At this point, struct page is not\n                           yet allocated.\n\nmemcg_kmem_commit_charge: will either revert the charge, if struct page\n                          allocation failed, or embed memcg information\n                          into page_cgroup.\n\nmemcg_kmem_uncharge_page: called at free time, will revert the charge.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Kamezawa Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Frederic Weisbecker \u003cfweisbec@redhat.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: JoonSoo Kim \u003cjs1304@gmail.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@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": "68ae564bbac8eb9ed54ddd2529b0e29ee190b355",
      "tree": "5cef83b5fa072f62091552457e7d0319ce170b98",
      "parents": [
        "05b0afd73d04109d87f00ccd39f099e217c37263"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Dec 12 13:51:57 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 12 17:38:34 2012 -0800"
      },
      "message": "mm, memcg: avoid unnecessary function call when memcg is disabled\n\nWhile profiling numa/core v16 with cgroup_disable\u003dmemory on the command\nline, I noticed mem_cgroup_count_vm_event() still showed up as high as\n0.60% in perftop.\n\nThis occurs because the function is called extremely often even when memcg\nis disabled.\n\nTo fix this, inline the check for mem_cgroup_disabled() so we avoid the\nunnecessary function call if memcg is disabled.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Glauber Costa \u003cglommer@parallels.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "cd59085a9b89585f20b4765f74c04e8c527f09f2",
      "tree": "bc3c7f4b4343d1e74a1f54b17d25069bf62ca3e9",
      "parents": [
        "8dc0839510ed4a7c594386ef58446b014fb4c27a"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Oct 10 15:54:08 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Oct 11 08:50:16 2012 +0900"
      },
      "message": "memcg, kmem: fix build error when CONFIG_INET is disabled\n\nCommit e1aab161e013 (\"socket: initial cgroup code.\") causes a build\nerror when CONFIG_INET is disabled in Linus\u0027 tree:\n\n  net/built-in.o: In function `sk_update_clone\u0027:\n  net/core/sock.c:1336: undefined reference to `sock_update_memcg\u0027\n\nsock_update_memcg() is only defined when CONFIG_INET is enabled, so fix\nit by defining the dummy function without this option.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nReported-by: Randy Dunlap \u003crdunlap@xenotime.net\u003e\nCc: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "587af308cc30ec6b94bde9aeb322e85fe4363e32",
      "tree": "422989897e68a3d914b9487c49467dbaa4dd7865",
      "parents": [
        "7795912c257bc068445f1db429c94d6b4b6ee604"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Mon Oct 08 16:34:12 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:23:04 2012 +0900"
      },
      "message": "mm: memcg: clean up mm_match_cgroup() signature\n\nIt really should return a boolean for match/no match.  And since it takes\na memcg, not a cgroup, fix that parameter name as well.\n\n[akpm@linux-foundation.org: mm_match_cgroup() is not a macro]\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\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": "0030f535a5cf9b1841d2088c10a0b2f8f2987460",
      "tree": "5a71a5057fb0d3e1b5f22c550c4374ea709ac3bc",
      "parents": [
        "737449236240e30a7bbe99f4d5586b8ed1416763"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Tue Jul 31 16:45:25 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:48 2012 -0700"
      },
      "message": "mm: memcg: fix compaction/migration failing due to memcg limits\n\nCompaction (and page migration in general) can currently be hindered\nthrough pages being owned by memory cgroups that are at their limits and\nunreclaimable.\n\nThe reason is that the replacement page is being charged against the limit\nwhile the page being replaced is also still charged.  But this seems\nunnecessary, given that only one of the two pages will still be in use\nafter migration finishes.\n\nThis patch changes the memcg migration sequence so that the replacement\npage is not charged.  Whatever page is still in use after successful or\nfailed migration gets to keep the charge of the page that was going to be\nreplaced.\n\nThe replacement page will still show up temporarily in the rss/cache\nstatistics, this can be fixed in a later patch as it\u0027s less urgent.\n\nReported-by: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Wanpeng Li \u003cliwp.linux@gmail.com\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": "876aafbfd9ba5bb352f1b14622c27f3fe9a99013",
      "tree": "fdd18b6caa0c9baa56b76feb9b05339919f283dd",
      "parents": [
        "6b0c81b3be114a93f79bd4c5639ade5107d77c21"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Jul 31 16:43:48 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:45 2012 -0700"
      },
      "message": "mm, memcg: move all oom handling to memcontrol.c\n\nBy globally defining check_panic_on_oom(), the memcg oom handler can be\nmoved entirely to mm/memcontrol.c.  This removes the ugly #ifdef in the\noom killer and cleans up the code.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Oleg Nesterov \u003coleg@redhat.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": "9cbb78bb314360a860a8b23723971cb6fcb54176",
      "tree": "7983de03845b5914e0188ce119f9374711ffcce7",
      "parents": [
        "462607ecc519b197f7b5cc6b024a1c26fa6fc0ac"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Jul 31 16:43:44 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:44 2012 -0700"
      },
      "message": "mm, memcg: introduce own oom handler to iterate only over its own threads\n\nThe global oom killer is serialized by the per-zonelist\ntry_set_zonelist_oom() which is used in the page allocator.  Concurrent\noom kills are thus a rare event and only occur in systems using\nmempolicies and with a large number of nodes.\n\nMemory controller oom kills, however, can frequently be concurrent since\nthere is no serialization once the oom killer is called for oom conditions\nin several different memcgs in parallel.\n\nThis creates a massive contention on tasklist_lock since the oom killer\nrequires the readside for the tasklist iteration.  If several memcgs are\ncalling the oom killer, this lock can be held for a substantial amount of\ntime, especially if threads continue to enter it as other threads are\nexiting.\n\nSince the exit path grabs the writeside of the lock with irqs disabled in\na few different places, this can cause a soft lockup on cpus as a result\nof tasklist_lock starvation.\n\nThe kernel lacks unfair writelocks, and successful calls to the oom killer\nusually result in at least one thread entering the exit path, so an\nalternative solution is needed.\n\nThis patch introduces a seperate oom handler for memcgs so that they do\nnot require tasklist_lock for as much time.  Instead, it iterates only\nover the threads attached to the oom memcg and grabs a reference to the\nselected thread before calling oom_kill_process() to ensure it doesn\u0027t\nprematurely exit.\n\nThis still requires tasklist_lock for the tasklist dump, iterating\nchildren of the selected process, and killing all other threads on the\nsystem sharing the same memory as the selected victim.  So while this\nisn\u0027t a complete solution to tasklist_lock starvation, it significantly\nreduces the amount of time that it is held.\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Sha Zhengju \u003chandai.szj@taobao.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "62ce1c706f817cb9defef3ac2dfdd815149f2968",
      "tree": "2e8db1011c2a8ee97aa91f640e49f6f34f40ba9c",
      "parents": [
        "4ed7e02222aba062bd0ed3ab12dfc8e9fc0467b5"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue Jul 31 16:43:39 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:44 2012 -0700"
      },
      "message": "mm, oom: move declaration for mem_cgroup_out_of_memory to oom.h\n\nmem_cgroup_out_of_memory() is defined in mm/oom_kill.c, so declare it in\nlinux/oom.h rather than linux/memcontrol.h.\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.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": "c255a458055e459f65eb7b7f51dc5dbdd0caf1d8",
      "tree": "b143b1914eeb6f27f53e30f9f0275d0f1ca5480b",
      "parents": [
        "80934513b230bfcf70265f2ef0fdae89fb391633"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Tue Jul 31 16:43:02 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:43 2012 -0700"
      },
      "message": "memcg: rename config variables\n\nSanity:\n\nCONFIG_CGROUP_MEM_RES_CTLR -\u003e CONFIG_MEMCG\nCONFIG_CGROUP_MEM_RES_CTLR_SWAP -\u003e CONFIG_MEMCG_SWAP\nCONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED -\u003e CONFIG_MEMCG_SWAP_ENABLED\nCONFIG_CGROUP_MEM_RES_CTLR_KMEM -\u003e CONFIG_MEMCG_KMEM\n\n[mhocko@suse.cz: fix missed bits]\nCc: Glauber Costa \u003cglommer@parallels.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Aneesh Kumar K.V \u003caneesh.kumar@linux.vnet.ibm.com\u003e\nCc: 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": "fa9add641b1b1c564db916accac1db346e7a2759",
      "tree": "875e74ec4d7fed0018fdbc134ad899949c5e3384",
      "parents": [
        "75b00af77ed5b5a3d55549f9e0c33f3969b9330c"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Tue May 29 15:07:09 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:28 2012 -0700"
      },
      "message": "mm/memcg: apply add/del_page to lruvec\n\nTake lruvec further: pass it instead of zone to add_page_to_lru_list() and\ndel_page_from_lru_list(); and pagevec_lru_move_fn() pass lruvec down to\nits target functions.\n\nThis cleanup eliminates a swathe of cruft in memcontrol.c, including\nmem_cgroup_lru_add_list(), mem_cgroup_lru_del_list() and\nmem_cgroup_lru_move_lists() - which never actually touched the lists.\n\nIn their place, mem_cgroup_page_lruvec() to decide the lruvec, previously\na side-effect of add, and mem_cgroup_update_lru_size() to maintain the\nlru_size stats.\n\nWhilst these are simplifications in their own right, the goal is to bring\nthe evaluation of lruvec next to the spin_locking of the lrus, in\npreparation for a future patch.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4d7dcca213921fbaf08ee05359d28e4aaf2245f1",
      "tree": "1c31ea8e8f9f88ca60864fbdaf9dfa74b09be96f",
      "parents": [
        "af7c4b0ec257ea9abb9c6749dd5a5ba0b8fae1fd"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Tue May 29 15:07:08 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:28 2012 -0700"
      },
      "message": "mm/memcg: get_lru_size not get_lruvec_size\n\nKonstantin just introduced mem_cgroup_get_lruvec_size() and\nget_lruvec_size(), I\u0027m about to add mem_cgroup_update_lru_size(): but\nwe\u0027re dealing with the same thing, lru_size[lru].  We ought to agree on\nthe naming, and I do think lru_size is the more correct: so rename his\nones to get_lru_size().\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c56d5c7dfeb5cc754e17fa3d423086a3c551c219",
      "tree": "4c89ad9692dbd3a2e0eaf96de0162a5d3066925e",
      "parents": [
        "074291fea8bcedeabf295360e2ddd9bbb5830b4a"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Tue May 29 15:07:00 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:26 2012 -0700"
      },
      "message": "mm/vmscan: push lruvec pointer into inactive_list_is_low()\n\nSwitch mem_cgroup_inactive_anon_is_low() to lruvec pointers,\nmem_cgroup_get_lruvec_size() is more effective than\nmem_cgroup_zone_nr_lru_pages()\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: 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": "074291fea8bcedeabf295360e2ddd9bbb5830b4a",
      "tree": "01531a2ca7e9b648a4d8cd9bc772aa484ed2190d",
      "parents": [
        "27ac81d85e5cfcc755dd5fa3f04dc883ab5d821b"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Tue May 29 15:07:00 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:26 2012 -0700"
      },
      "message": "mm/vmscan: replace zone_nr_lru_pages() with get_lruvec_size()\n\nIf memory cgroup is enabled we always use lruvecs which are embedded into\nstruct mem_cgroup_per_zone, so we can reach lru_size counters via\ncontainer_of().\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: 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": "bbf808ed7de68fdf626fd4f9718d88cf03ce13a9",
      "tree": "91f3dc3eb619f2b809cdd9c1239a6db0e62c97ed",
      "parents": [
        "f3fd4a61928a5edf5b033a417e761b488b43e203"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Tue May 29 15:06:54 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:25 2012 -0700"
      },
      "message": "mm/memcg: kill mem_cgroup_lru_del()\n\nThis patch kills mem_cgroup_lru_del(), we can use\nmem_cgroup_lru_del_list() instead.  On 0-order isolation we already have\nright lru list id.\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Minchan Kim \u003cminchan@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": "89abfab133ef1f5902abafb744df72793213ac19",
      "tree": "29df29e2a34a0af3649417d2e430480c7e7e5fa1",
      "parents": [
        "c3c787e8c38557ccf44c670d73aebe630a2b1479"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Tue May 29 15:06:53 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:25 2012 -0700"
      },
      "message": "mm/memcg: move reclaim_stat into lruvec\n\nWith mem_cgroup_disabled() now explicit, it becomes clear that the\nzone_reclaim_stat structure actually belongs in lruvec, per-zone when\nmemcg is disabled but per-memcg per-zone when it\u0027s enabled.\n\nWe can delete mem_cgroup_get_reclaim_stat(), and change\nupdate_page_reclaim_stat() to update just the one set of stats, the one\nwhich get_scan_count() will actually use.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Minchan Kim \u003cminchan@kernel.org\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c3ac9a8ade65ccbfd145fbff895ae8d8d62d09b0",
      "tree": "4df684151388ffa6407d714dd39d1fe94f72d424",
      "parents": [
        "91c63734f6908425903aed69c04035592f18d398"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Tue May 29 15:06:25 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:20 2012 -0700"
      },
      "message": "mm: memcg: count pte references from every member of the reclaimed hierarchy\n\nThe rmap walker checking page table references has historically ignored\nreferences from VMAs that were not part of the memcg that was being\nreclaimed during memcg hard limit reclaim.\n\nWhen transitioning global reclaim to memcg hierarchy reclaim, I missed\nthat bit and now references from outside a memcg are ignored even during\nglobal reclaim.\n\nReverting back to traditional behaviour - count all references during\nglobal reclaim and only mind references of the memcg being reclaimed\nduring limit reclaim would be one option.\n\nHowever, the more generic idea is to ignore references exactly then when\nthey are outside the hierarchy that is currently under reclaim; because\nonly then will their reclamation be of any use to help the pressure\nsituation.  It makes no sense to ignore references from a sibling memcg\nand then evict a page that will be immediately refaulted by that sibling\nwhich contributes to the same usage of the common ancestor under\nreclaim.\n\nThe solution: make the rmap walker ignore references from VMAs that are\nnot part of the hierarchy that is being reclaimed.\n\nFlat limit reclaim will stay the same, hierarchical limit reclaim will\nmind the references only to pages that the hierarchy owns.  Global\nreclaim, since it reclaims from all memcgs, will be fixed to regard all\nreferences.\n\n[akpm@linux-foundation.org: name the args in the declaration]\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReported-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nAcked-by: Konstantin Khlebnikov\u003ckhlebnikov@openvz.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Tejun Heo \u003ctj@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": "4331f7d339ee0b54603344b9d13662a9c022540c",
      "tree": "ea67ad19a4dff0f8bf7d335bb7ab148ecfb4d329",
      "parents": [
        "2ff76f1193f8481f7e6c29304eea4006e8e51569"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 21 16:34:26 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:02 2012 -0700"
      },
      "message": "memcg: fix performance of mem_cgroup_begin_update_page_stat()\n\nmem_cgroup_begin_update_page_stat() should be very fast because it\u0027s\ncalled very frequently.  Now, it needs to look up page_cgroup and its\nmemcg....this is slow.\n\nThis patch adds a global variable to check \"any memcg is moving or not\".\nWith this, the caller doesn\u0027t need to visit page_cgroup and memcg.\n\nHere is a test result.  A test program makes page faults onto a file,\nMAP_SHARED and makes each page\u0027s page_mapcount(page) \u003e 1, and free the\nrange by madvise() and page fault again.  This program causes 26214400\ntimes of page fault onto a file(size was 1G.) and shows shows the cost of\nmem_cgroup_begin_update_page_stat().\n\nBefore this patch for mem_cgroup_begin_update_page_stat()\n\n    [kamezawa@bluextal test]$ time ./mmap 1G\n\n    real    0m21.765s\n    user    0m5.999s\n    sys     0m15.434s\n\n    27.46%     mmap  mmap               [.] reader\n    21.15%     mmap  [kernel.kallsyms]  [k] page_fault\n     9.17%     mmap  [kernel.kallsyms]  [k] filemap_fault\n     2.96%     mmap  [kernel.kallsyms]  [k] __do_fault\n     2.83%     mmap  [kernel.kallsyms]  [k] __mem_cgroup_begin_update_page_stat\n\nAfter this patch\n\n    [root@bluextal test]# time ./mmap 1G\n\n    real    0m21.373s\n    user    0m6.113s\n    sys     0m15.016s\n\nIn usual path, calls to __mem_cgroup_begin_update_page_stat() goes away.\n\nNote: we may be able to remove this optimization in future if\n      we can get pointer to memcg directly from struct page.\n\n[akpm@linux-foundation.org: don\u0027t return a void]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Greg Thelen \u003cgthelen@google.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.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": "89c06bd52fb9ffceddf84f7309d2e8c9f1666216",
      "tree": "43ec3d97a89988bc143bed5796bcd7bef64212dc",
      "parents": [
        "312734c04e2fecc58429aec98194e4ff12d8f7d6"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 21 16:34:25 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:01 2012 -0700"
      },
      "message": "memcg: use new logic for page stat accounting\n\nNow, page-stat-per-memcg is recorded into per page_cgroup flag by\nduplicating page\u0027s status into the flag.  The reason is that memcg has a\nfeature to move a page from a group to another group and we have race\nbetween \"move\" and \"page stat accounting\",\n\nUnder current logic, assume CPU-A and CPU-B.  CPU-A does \"move\" and CPU-B\ndoes \"page stat accounting\".\n\nWhen CPU-A goes 1st,\n\n            CPU-A                           CPU-B\n                                    update \"struct page\" info.\n    move_lock_mem_cgroup(memcg)\n    see pc-\u003eflags\n    copy page stat to new group\n    overwrite pc-\u003emem_cgroup.\n    move_unlock_mem_cgroup(memcg)\n                                    move_lock_mem_cgroup(mem)\n                                    set pc-\u003eflags\n                                    update page stat accounting\n                                    move_unlock_mem_cgroup(mem)\n\nstat accounting is guarded by move_lock_mem_cgroup() and \"move\" logic\n(CPU-A) doesn\u0027t see changes in \"struct page\" information.\n\nBut it\u0027s costly to have the same information both in \u0027struct page\u0027 and\n\u0027struct page_cgroup\u0027.  And, there is a potential problem.\n\nFor example, assume we have PG_dirty accounting in memcg.\nPG_..is a flag for struct page.\nPCG_ is a flag for struct page_cgroup.\n(This is just an example. The same problem can be found in any\n kind of page stat accounting.)\n\n\t  CPU-A                               CPU-B\n      TestSet PG_dirty\n      (delay)                        TestClear PG_dirty\n                                     if (TestClear(PCG_dirty))\n                                          memcg-\u003enr_dirty--\n      if (TestSet(PCG_dirty))\n          memcg-\u003enr_dirty++\n\nHere, memcg-\u003enr_dirty \u003d +1, this is wrong.  This race was reported by Greg\nThelen \u003cgthelen@google.com\u003e.  Now, only FILE_MAPPED is supported but\nfortunately, it\u0027s serialized by page table lock and this is not real bug,\n_now_,\n\nIf this potential problem is caused by having duplicated information in\nstruct page and struct page_cgroup, we may be able to fix this by using\noriginal \u0027struct page\u0027 information.  But we\u0027ll have a problem in \"move\naccount\"\n\nAssume we use only PG_dirty.\n\n         CPU-A                   CPU-B\n    TestSet PG_dirty\n    (delay)                    move_lock_mem_cgroup()\n                               if (PageDirty(page))\n                                      new_memcg-\u003enr_dirty++\n                               pc-\u003emem_cgroup \u003d new_memcg;\n                               move_unlock_mem_cgroup()\n    move_lock_mem_cgroup()\n    memcg \u003d pc-\u003emem_cgroup\n    new_memcg-\u003enr_dirty++\n\naccounting information may be double-counted.  This was original reason to\nhave PCG_xxx flags but it seems PCG_xxx has another problem.\n\nI think we need a bigger lock as\n\n     move_lock_mem_cgroup(page)\n     TestSetPageDirty(page)\n     update page stats (without any checks)\n     move_unlock_mem_cgroup(page)\n\nThis fixes both of problems and we don\u0027t have to duplicate page flag into\npage_cgroup.  Please note: move_lock_mem_cgroup() is held only when there\nare possibility of \"account move\" under the system.  So, in most path,\nstatus update will go without atomic locks.\n\nThis patch introduces mem_cgroup_begin_update_page_stat() and\nmem_cgroup_end_update_page_stat() both should be called at modifying\n\u0027struct page\u0027 information if memcg takes care of it.  as\n\n     mem_cgroup_begin_update_page_stat()\n     modify page information\n     mem_cgroup_update_page_stat()\n     \u003d\u003e never check any \u0027struct page\u0027 info, just update counters.\n     mem_cgroup_end_update_page_stat().\n\nThis patch is slow because we need to call begin_update_page_stat()/\nend_update_page_stat() regardless of accounted will be changed or not.  A\nfollowing patch adds an easy optimization and reduces the cost.\n\n[akpm@linux-foundation.org: s/lock/locked/]\n[hughd@google.com: fix deadlock by avoiding stat lock when anon]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: 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": "a710920caedfcf56543136bfea300a6c593f9838",
      "tree": "47546c076b45b8b6b82c4f6b47906a480a00b24f",
      "parents": [
        "b24028572fb69e9dd6de8c359eba2b2c66baa889"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Wed Mar 21 16:34:22 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:01 2012 -0700"
      },
      "message": "memcg: kill dead prev_priority stubs\n\nThis code was removed in 25edde033291 (\"vmscan: kill prev_priority\ncompletely\")\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\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": "31a79235fc75b506e282e43723107a40f3bc5c07",
      "tree": "de0d3264015e174f4182e04faed29c98c1f006f5",
      "parents": [
        "052b1987faca3606109d88d96bce124851f7c4c2"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Wed Mar 21 16:34:18 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:00 2012 -0700"
      },
      "message": "memcg: replace MEM_CONT by MEM_RES_CTLR\n\nCorrect an #endif comment in memcontrol.h from MEM_CONT to MEM_RES_CTLR.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\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": "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": "7512102cf64d36e3c7444480273623c7aab3563f",
      "tree": "4c5b589455ed0d343384d7eeaedfab5057648a0d",
      "parents": [
        "9f78ff005a6b6313728247113948450b2adddde8"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Mar 05 14:59:18 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 05 15:49:43 2012 -0800"
      },
      "message": "memcg: fix GPF when cgroup removal races with last exit\n\nWhen moving tasks from old memcg (with move_charge_at_immigrate on new\nmemcg), followed by removal of old memcg, hit General Protection Fault in\nmem_cgroup_lru_del_list() (called from release_pages called from\nfree_pages_and_swap_cache from tlb_flush_mmu from tlb_finish_mmu from\nexit_mmap from mmput from exit_mm from do_exit).\n\nSomewhat reproducible, takes a few hours: the old struct mem_cgroup has\nbeen freed and poisoned by SLAB_DEBUG, but mem_cgroup_lru_del_list() is\nstill trying to update its stats, and take page off lru before freeing.\n\nA task, or a charge, or a page on lru: each secures a memcg against\nremoval.  In this case, the last task has been moved out of the old memcg,\nand it is exiting: anonymous pages are uncharged one by one from the\nmemcg, as they are zapped from its pagetables, so the charge gets down to\n0; but the pages themselves are queued in an mmu_gather for freeing.\n\nMost of those pages will be on lru (and force_empty is careful to\nlru_add_drain_all, to add pages from pagevec to lru first), but not\nnecessarily all: perhaps some have been isolated for page reclaim, perhaps\nsome isolated for other reasons.  So, force_empty may find no task, no\ncharge and no page on lru, and let the removal proceed.\n\nThere would still be no problem if these pages were immediately freed; but\ntypically (and the put_page_testzero protocol demands it) they have to be\nadded back to lru before they are found freeable, then removed from lru\nand freed.  We don\u0027t see the issue when adding, because the\nmem_cgroup_iter() loops keep their own reference to the memcg being\nscanned; but when it comes to mem_cgroup_lru_del_list().\n\nI believe this was not an issue in v3.2: there, PageCgroupAcctLRU and\nPageCgroupUsed flags were used (like a trick with mirrors) to deflect view\nof pc-\u003emem_cgroup to the stable root_mem_cgroup when neither set.\n38c5d72f3ebe (\"memcg: simplify LRU handling by new rule\") mercifully\nremoved those convolutions, but left this General Protection Fault.\n\nBut it\u0027s surprisingly easy to restore the old behaviour: just check\nPageCgroupUsed in mem_cgroup_lru_add_list() (which decides on which lruvec\nto add), and reset pc to root_mem_cgroup if page is uncharged.  A risky\nchange?  just going back to how it worked before; testing, and an audit of\nuses of pc-\u003emem_cgroup, show no problem.\n\nAnd there\u0027s a nice bonus: with mem_cgroup_lru_add_list() itself making\nsure that an uncharged page goes to root lru, mem_cgroup_reset_owner() no\nlonger has any purpose, and we can safely revert 4e5f01c2b9b9 (\"memcg:\nclear pc-\u003emem_cgroup if necessary\").\n\nCalling update_page_reclaim_stat() after add_page_to_lru_list() in swap.c\nis not strictly necessary: the lru_lock there, with RCU before memcg\nstructures are freed, makes mem_cgroup_get_reclaim_stat_from_page safe\nwithout that; but it seems cleaner to rely on one dependency less.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4e5f01c2b9b94321992acb09c35d34f5ee5bb274",
      "tree": "4e6ac9d29539dc26468fe2630d0e64cd022b1155",
      "parents": [
        "36b62ad539498d00c2d280a151abad5f7630fa73"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 12 17:18:58 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "memcg: clear pc-\u003emem_cgroup if necessary.\n\nThis is a preparation before removing a flag PCG_ACCT_LRU in page_cgroup\nand reducing atomic ops/complexity in memcg LRU handling.\n\nIn some cases, pages are added to lru before charge to memcg and pages\nare not classfied to memory cgroup at lru addtion.  Now, the lru where\nthe page should be added is determined a bit in page_cgroup-\u003eflags and\npc-\u003emem_cgroup.  I\u0027d like to remove the check of flag.\n\nTo handle the case pc-\u003emem_cgroup may contain stale pointers if pages\nare added to LRU before classification.  This patch resets\npc-\u003emem_cgroup to root_mem_cgroup before lru additions.\n\n[akpm@linux-foundation.org: fix CONFIG_CGROUP_MEM_CONT\u003dn build]\n[hughd@google.com: fix CONFIG_CGROUP_MEM_RES_CTLR\u003dy CONFIG_CGROUP_MEM_RES_CTLR_SWAP\u003dn build]\n[akpm@linux-foundation.org: ksm.c needs memcontrol.h, per Michal]\n[hughd@google.com: stop oops in mem_cgroup_reset_owner()]\n[hughd@google.com: fix page migration to reset_owner]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Miklos Szeredi \u003cmszeredi@suse.cz\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: 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": "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": "e94c8a9cbce1aee4af9e1285802785481b7f93c5",
      "tree": "14d496e62c2e8d59a8954ff10368d59d8dfaea03",
      "parents": [
        "6b208e3f6e35aa76d254c395bdcd984b17c6b626"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 12 17:18:20 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:05 2012 -0800"
      },
      "message": "memcg: make mem_cgroup_split_huge_fixup() more efficient\n\nIn split_huge_page(), mem_cgroup_split_huge_fixup() is called to handle\npage_cgroup modifcations.  It takes move_lock_page_cgroup() and modifies\npage_cgroup and LRU accounting jobs and called HPAGE_PMD_SIZE - 1 times.\n\nBut thinking again,\n  - compound_lock() is held at move_accout...then, it\u0027s not necessary\n    to take move_lock_page_cgroup().\n  - LRU is locked and all tail pages will go into the same LRU as\n    head is now on.\n  - page_cgroup is contiguous in huge page range.\n\nThis patch fixes mem_cgroup_split_huge_fixup() as to be called once per\nhugepage and reduce costs for spliting.\n\n[akpm@linux-foundation.org: fix typo, per Michal]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Balbir Singh \u003cbsingharora@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": "925b7673cce39116ce61e7a06683a4a0dad1e72a",
      "tree": "66c134db836e531e196ee3dfc23c124ff74ac827",
      "parents": [
        "6290df545814990ca2663baf6e894669132d5f73"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:15 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:05 2012 -0800"
      },
      "message": "mm: make per-memcg LRU lists exclusive\n\nNow that all code that operated on global per-zone LRU lists is\nconverted to operate on per-memory cgroup LRU lists instead, there is no\nreason to keep the double-LRU scheme around any longer.\n\nThe pc-\u003elru member is removed and page-\u003elru is linked directly to the\nper-memory cgroup LRU lists, which removes two pointers from a\ndescriptor that exists for every page frame in the system.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Ying Han \u003cyinghan@google.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5660048ccac8735d9bc0a46325a02e6a6518b5b2",
      "tree": "4b2269ddd6ca001843187a89fb91278192028d87",
      "parents": [
        "527a5ec9a53471d855291ba9f1fdf1dd4e12a184"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:17:59 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:05 2012 -0800"
      },
      "message": "mm: move memcg hierarchy reclaim to generic reclaim code\n\nMemory cgroup limit reclaim and traditional global pressure reclaim will\nsoon share the same code to reclaim from a hierarchical tree of memory\ncgroups.\n\nIn preparation of this, move the two right next to each other in\nshrink_zone().\n\nThe mem_cgroup_hierarchical_reclaim() polymath is split into a soft\nlimit reclaim function, which still does hierarchy walking on its own,\nand a limit (shrinking) reclaim function, which relies on generic\nreclaim code to walk the hierarchy.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\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": "ab936cbcd02072a34b60d268f94440fd5cf1970b",
      "tree": "d37e3e3c54cc4cc691a428b6ceb71b4b40e4f42b",
      "parents": [
        "28d82dc1c4edbc352129f97f4ca22624d1fe61de"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 12 17:17:44 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:04 2012 -0800"
      },
      "message": "memcg: add mem_cgroup_replace_page_cache() to fix LRU issue\n\nCommit ef6a3c6311 (\"mm: add replace_page_cache_page() function\") added a\nfunction replace_page_cache_page().  This function replaces a page in the\nradix-tree with a new page.  WHen doing this, memory cgroup needs to fix\nup the accounting information.  memcg need to check PCG_USED bit etc.\n\nIn some(many?) cases, \u0027newpage\u0027 is on LRU before calling\nreplace_page_cache().  So, memcg\u0027s LRU accounting information should be\nfixed, too.\n\nThis patch adds mem_cgroup_replace_page_cache() and removes the old hooks.\n In that function, old pages will be unaccounted without touching\nres_counter and new page will be accounted to the memcg (of old page).\nWHen overwriting pc-\u003emem_cgroup of newpage, take zone-\u003elru_lock and avoid\nraces with LRU handling.\n\nBackground:\n  replace_page_cache_page() is called by FUSE code in its splice() handling.\n  Here, \u0027newpage\u0027 is replacing oldpage but this newpage is not a newly allocated\n  page and may be on LRU. LRU mis-accounting will be critical for memory cgroup\n  because rmdir() checks the whole LRU is empty and there is no account leak.\n  If a page is on the other LRU than it should be, rmdir() will fail.\n\nThis bug was added in March 2011, but no bug report yet.  I guess there\nare not many people who use memcg and FUSE at the same time with upstream\nkernels.\n\nThe result of this bug is that admin cannot destroy a memcg because of\naccount leak.  So, no panic, no deadlock.  And, even if an active cgroup\nexist, umount can succseed.  So no problem at shutdown.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Miklos Szeredi \u003cmszeredi@suse.cz\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3969eb3859e4fad4b32ca8f96d4ec8551c20704a",
      "tree": "06620d8c94d92ab187f6ce8e72f2d0453d734314",
      "parents": [
        "2429f7ac2ef429378536d87fcbbf6f424aa5b47f"
      ],
      "author": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Mon Jan 09 13:44:23 2012 -0800"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Mon Jan 09 13:44:23 2012 -0800"
      },
      "message": "net: Fix build with INET disabled.\n\n\u003e net/core/sock.c: In function \u0027sk_update_clone\u0027:\n\u003e net/core/sock.c:1278:3: error: implicit declaration of function \u0027sock_update_memcg\u0027\n\nReported-by: Randy Dunlap \u003crdunlap@xenotime.net\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "888bdaa9b2c426dcca214e6efd388080938082cb",
      "tree": "4f9d9ae8e99318effaaf4e12391cddecd4c9e9da",
      "parents": [
        "f943cbe6fb71d1389dd8684b9b4181e49f8e870c"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Wed Dec 14 23:34:31 2011 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Thu Dec 15 11:59:44 2011 -0500"
      },
      "message": "Move limit definitions outside CONFIG_INET\n\nThey need to be available for other protocols as well, since\nthey are used in sock.c openly\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCC: Hiroyouki Kamezawa \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCC: David S. Miller \u003cdavem@davemloft.net\u003e\nCC: Eric Dumazet \u003ceric.dumazet@gmail.com\u003e\nCC: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "d1a4c0b37c296e600ffe08edb0db2dc1b8f550d7",
      "tree": "5c3675582cbbdc99f720aa1dcc1821e26c2be1ab",
      "parents": [
        "e1aab161e0135aafcd439be20b4f35e4b0922d95"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Sun Dec 11 21:47:04 2011 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Mon Dec 12 19:04:10 2011 -0500"
      },
      "message": "tcp memory pressure controls\n\nThis patch introduces memory pressure controls for the tcp\nprotocol. It uses the generic socket memory pressure code\nintroduced in earlier patches, and fills in the\nnecessary data in cg_proto struct.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujtisu.com\u003e\nCC: Eric W. Biederman \u003cebiederm@xmission.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "e1aab161e0135aafcd439be20b4f35e4b0922d95",
      "tree": "d0bcdf7a34a34020079238027b431ffc6dece307",
      "parents": [
        "180d8cd942ce336b2c869d324855c40c5db478ad"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Sun Dec 11 21:47:03 2011 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Mon Dec 12 19:04:10 2011 -0500"
      },
      "message": "socket: initial cgroup code.\n\nThe goal of this work is to move the memory pressure tcp\ncontrols to a cgroup, instead of just relying on global\nconditions.\n\nTo avoid excessive overhead in the network fast paths,\nthe code that accounts allocated memory to a cgroup is\nhidden inside a static_branch(). This branch is patched out\nuntil the first non-root cgroup is created. So when nobody\nis using cgroups, even if it is mounted, no significant performance\npenalty should be seen.\n\nThis patch handles the generic part of the code, and has nothing\ntcp-specific.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujtsu.com\u003e\nCC: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCC: David S. Miller \u003cdavem@davemloft.net\u003e\nCC: Eric W. Biederman \u003cebiederm@xmission.com\u003e\nCC: Eric Dumazet \u003ceric.dumazet@gmail.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "9b272977e3b99a8699361d214b51f98c8a9e0e7b",
      "tree": "2113cee95a42ea893aa6eddb01b14e563153fabb",
      "parents": [
        "0a619e58703b86d53d07e938eade9a91a4a863c6"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Wed Nov 02 13:38:23 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 02 16:07:00 2011 -0700"
      },
      "message": "memcg: skip scanning active lists based on individual size\n\nReclaim decides to skip scanning an active list when the corresponding\ninactive list is above a certain size in comparison to leave the assumed\nworking set alone while there are still enough reclaim candidates around.\n\nThe memcg implementation of comparing those lists instead reports whether\nthe whole memcg is low on the requested type of inactive pages,\nconsidering all nodes and zones.\n\nThis can lead to an oversized active list not being scanned because of the\nstate of the other lists in the memcg, as well as an active list being\nscanned while its corresponding inactive list has enough pages.\n\nNot only is this wrong, it\u0027s also a scalability hazard, because the global\nmemory state over all nodes and zones has to be gathered for each memcg\nand zone scanned.\n\nMake these calculations purely based on the size of the two LRU lists\nthat are actually affected by the outcome of the decision.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: 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": "c0ff4b8540a5c158b8e5bafb7d767298b67b0b92",
      "tree": "a47a2bcd0b7b80056cde7ba6b1263aae78f77212",
      "parents": [
        "ff7ee93f47151e23601856e7eb5510babf956571"
      ],
      "author": {
        "name": "Raghavendra K T",
        "email": "raghavendra.kt@linux.vnet.ibm.com",
        "time": "Wed Nov 02 13:38:15 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 02 16:06:59 2011 -0700"
      },
      "message": "memcg: rename mem variable to memcg\n\nThe memcg code sometimes uses \"struct mem_cgroup *mem\" and sometimes uses\n\"struct mem_cgroup *memcg\".  Rename all mem variables to memcg in source\nfile.\n\nSigned-off-by: Raghavendra K T \u003craghavendra.kt@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@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": "4356f21d09283dc6d39a6f7287a65ddab61e2808",
      "tree": "34822a1662ea83291455834556a4fb5bf98ecd72",
      "parents": [
        "b9e84ac1536d35aee03b2601f19694949f0bd506"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Mon Oct 31 17:06:47 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:44 2011 -0700"
      },
      "message": "mm: change isolate mode from #define to bitwise type\n\nChange ISOLATE_XXX macro with bitwise isolate_mode_t type.  Normally,\nmacro isn\u0027t recommended as it\u0027s type-unsafe and making debugging harder as\nsymbol cannot be passed throught to the debugger.\n\nQuote from Johannes\n\" Hmm, it would probably be cleaner to fully convert the isolation mode\ninto independent flags.  INACTIVE, ACTIVE, BOTH is currently a\ntri-state among flags, which is a bit ugly.\"\n\nThis patch moves isolate mode from swap.h to mmzone.h by memcontrol.h\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\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": "185efc0f9a1f2d6ad6d4782c5d9e529f3290567f",
      "tree": "9330dac6b7f17fad7d99e444b3544210109e2d99",
      "parents": [
        "a4d3e9e76337059406fcf3ead288c0df22a790e9"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Wed Sep 14 16:21:58 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Sep 14 18:09:38 2011 -0700"
      },
      "message": "memcg: Revert \"memcg: add memory.vmscan_stat\"\n\nRevert the post-3.0 commit 82f9d486e59f5 (\"memcg: add\nmemory.vmscan_stat\").\n\nThe implementation of per-memcg reclaim statistics violates how memcg\nhierarchies usually behave: hierarchically.\n\nThe reclaim statistics are accounted to child memcgs and the parent\nhitting the limit, but not to hierarchy levels in between.  Usually,\nhierarchical statistics are perfectly recursive, with each level\nrepresenting the sum of itself and all its children.\n\nSince this exports statistics to userspace, this may lead to confusion\nand problems with changing things after the release, so revert it now,\nwe can try again later.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Balbir Singh \u003cbsingharora@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": "aa3b189551ad8e5cc1d9c663735c131650238278",
      "tree": "c789ab5c7f890a6065811d8bba15a784caf9e859",
      "parents": [
        "54af60421822bb9cb664dd5cd7aac46c01ccfcf8"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Wed Aug 03 16:21:24 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 03 14:25:24 2011 -1000"
      },
      "message": "tmpfs: convert mem_cgroup shmem to radix-swap\n\nRemove mem_cgroup_shmem_charge_fallback(): it was only required when we\nhad to move swappage to filecache with GFP_NOWAIT.\n\nRemove the GFP_NOWAIT special case from mem_cgroup_cache_charge(), by\nmoving its call out from shmem_add_to_page_cache() to two of thats three\ncallers.  But leave it doing mem_cgroup_uncharge_cache_page() on error:\nalthough asymmetrical, it\u0027s easier for all 3 callers to handle.\n\nThese two changes would also be appropriate if anyone were to start\nusing shmem_read_mapping_page_gfp() with GFP_NOWAIT.\n\nRemove mem_cgroup_get_shmem_target(): mc_handle_file_pte() can test\nradix_tree_exceptional_entry() to get what it needs for itself.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "82f9d486e59f588c7d100865c36510644abda356",
      "tree": "266f3dcf4f57538196bddd77a129adfb2752335b",
      "parents": [
        "108b6a78463bb8c7163e4f9779f36ad8bbade334"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Jul 26 16:08:26 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: add memory.vmscan_stat\n\nThe commit log of 0ae5e89c60c9 (\"memcg: count the soft_limit reclaim\nin...\") says it adds scanning stats to memory.stat file.  But it doesn\u0027t\nbecause we considered we needed to make a concensus for such new APIs.\n\nThis patch is a trial to add memory.scan_stat. This shows\n  - the number of scanned pages(total, anon, file)\n  - the number of rotated pages(total, anon, file)\n  - the number of freed pages(total, anon, file)\n  - the number of elaplsed time (including sleep/pause time)\n\n  for both of direct/soft reclaim.\n\nThe biggest difference with oringinal Ying\u0027s one is that this file\ncan be reset by some write, as\n\n  # echo 0 ...../memory.scan_stat\n\nExample of output is here. This is a result after make -j 6 kernel\nunder 300M limit.\n\n  [kamezawa@bluextal ~]$ cat /cgroup/memory/A/memory.scan_stat\n  [kamezawa@bluextal ~]$ cat /cgroup/memory/A/memory.vmscan_stat\n  scanned_pages_by_limit 9471864\n  scanned_anon_pages_by_limit 6640629\n  scanned_file_pages_by_limit 2831235\n  rotated_pages_by_limit 4243974\n  rotated_anon_pages_by_limit 3971968\n  rotated_file_pages_by_limit 272006\n  freed_pages_by_limit 2318492\n  freed_anon_pages_by_limit 962052\n  freed_file_pages_by_limit 1356440\n  elapsed_ns_by_limit 351386416101\n  scanned_pages_by_system 0\n  scanned_anon_pages_by_system 0\n  scanned_file_pages_by_system 0\n  rotated_pages_by_system 0\n  rotated_anon_pages_by_system 0\n  rotated_file_pages_by_system 0\n  freed_pages_by_system 0\n  freed_anon_pages_by_system 0\n  freed_file_pages_by_system 0\n  elapsed_ns_by_system 0\n  scanned_pages_by_limit_under_hierarchy 9471864\n  scanned_anon_pages_by_limit_under_hierarchy 6640629\n  scanned_file_pages_by_limit_under_hierarchy 2831235\n  rotated_pages_by_limit_under_hierarchy 4243974\n  rotated_anon_pages_by_limit_under_hierarchy 3971968\n  rotated_file_pages_by_limit_under_hierarchy 272006\n  freed_pages_by_limit_under_hierarchy 2318492\n  freed_anon_pages_by_limit_under_hierarchy 962052\n  freed_file_pages_by_limit_under_hierarchy 1356440\n  elapsed_ns_by_limit_under_hierarchy 351386416101\n  scanned_pages_by_system_under_hierarchy 0\n  scanned_anon_pages_by_system_under_hierarchy 0\n  scanned_file_pages_by_system_under_hierarchy 0\n  rotated_pages_by_system_under_hierarchy 0\n  rotated_anon_pages_by_system_under_hierarchy 0\n  rotated_file_pages_by_system_under_hierarchy 0\n  freed_pages_by_system_under_hierarchy 0\n  freed_anon_pages_by_system_under_hierarchy 0\n  freed_file_pages_by_system_under_hierarchy 0\n  elapsed_ns_by_system_under_hierarchy 0\n\ntotal_xxxx is for hierarchy management.\n\nThis will be useful for further memcg developments and need to be\ndevelopped before we do some complicated rework on LRU/softlimit\nmanagement.\n\nThis patch adds a new struct memcg_scanrecord into scan_control struct.\nsc-\u003enr_scanned at el is not designed for exporting information.  For\nexample, nr_scanned is reset frequentrly and incremented +2 at scanning\nmapped pages.\n\nTo avoid complexity, I added a new param in scan_control which is for\nexporting scanning score.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Andrew Bresticker \u003cabrestic@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": "bb2a0de92c891b8feeedc0178acb3ae009d899a8",
      "tree": "c2c0b3ad66c8da0e48c021927b2d747fb08b7ef3",
      "parents": [
        "1f4c025b5a5520fd2571244196b1b01ad96d18f6"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Jul 26 16:08:22 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: consolidate memory cgroup lru stat functions\n\nIn mm/memcontrol.c, there are many lru stat functions as..\n\n  mem_cgroup_zone_nr_lru_pages\n  mem_cgroup_node_nr_file_lru_pages\n  mem_cgroup_nr_file_lru_pages\n  mem_cgroup_node_nr_anon_lru_pages\n  mem_cgroup_nr_anon_lru_pages\n  mem_cgroup_node_nr_unevictable_lru_pages\n  mem_cgroup_nr_unevictable_lru_pages\n  mem_cgroup_node_nr_lru_pages\n  mem_cgroup_nr_lru_pages\n  mem_cgroup_get_local_zonestat\n\nSome of them are under #ifdef MAX_NUMNODES \u003e1 and others are not.\nThis seems bad. This patch consolidates all functions into\n\n  mem_cgroup_zone_nr_lru_pages()\n  mem_cgroup_node_nr_lru_pages()\n  mem_cgroup_nr_lru_pages()\n\nFor these functions, \"which LRU?\" information is passed by a mask.\n\nexample:\n  mem_cgroup_nr_lru_pages(mem, BIT(LRU_ACTIVE_ANON))\n\nAnd I added some macro as ALL_LRU, ALL_LRU_FILE, ALL_LRU_ANON.\n\nexample:\n  mem_cgroup_nr_lru_pages(mem, ALL_LRU)\n\nBTW, considering layout of NUMA memory placement of counters, this patch seems\nto be better.\n\nNow, when we gather all LRU information, we scan in following orer\n    for_each_lru -\u003e for_each_node -\u003e for_each_zone.\n\nThis means we\u0027ll touch cache lines in different node in turn.\n\nAfter patch, we\u0027ll scan\n    for_each_node -\u003e for_each_zone -\u003e for_each_lru(mask)\n\nThen, we\u0027ll gather information in the same cacheline at once.\n\n[akpm@linux-foundation.org: fix warnigns, build error]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\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": "a433658c30974fc87ba3ff52d7e4e6299762aa3d",
      "tree": "8df65e22af520ca5c020281763e6874d0bb51bc5",
      "parents": [
        "e1bbd19bc4afef7adb80cca163800391c4f5773d"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jun 15 15:08:13 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:03:59 2011 -0700"
      },
      "message": "vmscan,memcg: memcg aware swap token\n\nCurrently, memcg reclaim can disable swap token even if the swap token mm\ndoesn\u0027t belong in its memory cgroup.  It\u0027s slightly risky.  If an admin\ncreates very small mem-cgroup and silly guy runs contentious heavy memory\npressure workload, every tasks are going to lose swap token and then\nsystem may become unresponsive.  That\u0027s bad.\n\nThis patch adds \u0027memcg\u0027 parameter into disable_swap_token().  and if the\nparameter doesn\u0027t match swap token, VM doesn\u0027t disable it.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Rik van Riel\u003criel@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": "456f998ec817ebfa254464be4f089542fa390645",
      "tree": "5976aa500638f0bbade1a672233cad71765b89b8",
      "parents": [
        "406eb0c9ba765eb066406fd5ce9d5e2b169a4d5a"
      ],
      "author": {
        "name": "Ying Han",
        "email": "yinghan@google.com",
        "time": "Thu May 26 16:25:38 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 26 17:12:36 2011 -0700"
      },
      "message": "memcg: add the pagefault count into memcg stats\n\nTwo new stats in per-memcg memory.stat which tracks the number of page\nfaults and number of major page faults.\n\n  \"pgfault\"\n  \"pgmajfault\"\n\nThey are different from \"pgpgin\"/\"pgpgout\" stat which count number of\npages charged/discharged to the cgroup and have no meaning of reading/\nwriting page to disk.\n\nIt is valuable to track the two stats for both measuring application\u0027s\nperformance as well as the efficiency of the kernel page reclaim path.\nCounting pagefaults per process is useful, but we also need the aggregated\nvalue since processes are monitored and controlled in cgroup basis in\nmemcg.\n\nFunctional test: check the total number of pgfault/pgmajfault of all\nmemcgs and compare with global vmstat value:\n\n  $ cat /proc/vmstat | grep fault\n  pgfault 1070751\n  pgmajfault 553\n\n  $ cat /dev/cgroup/memory.stat | grep fault\n  pgfault 1071138\n  pgmajfault 553\n  total_pgfault 1071142\n  total_pgmajfault 553\n\n  $ cat /dev/cgroup/A/memory.stat | grep fault\n  pgfault 199\n  pgmajfault 0\n  total_pgfault 199\n  total_pgmajfault 0\n\nPerformance test: run page fault test(pft) wit 16 thread on faulting in\n15G anon pages in 16G container.  There is no regression noticed on the\n\"flt/cpu/s\"\n\nSample output from pft:\n\n  TAG pft:anon-sys-default:\n    Gb  Thr CLine   User     System     Wall    flt/cpu/s fault/wsec\n    15   16   1     0.67s   233.41s    14.76s   16798.546 266356.260\n\n  +-------------------------------------------------------------------------+\n      N           Min           Max        Median           Avg        Stddev\n  x  10     16682.962     17344.027     16913.524     16928.812      166.5362\n  +  10     16695.568     16923.896     16820.604     16824.652     84.816568\n  No difference proven at 95.0% confidence\n\n[akpm@linux-foundation.org: fix build]\n[hughd@google.com: shmem fix]\nSigned-off-by: Ying Han \u003cyinghan@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: 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": "1bac180bd29e03989f50054af97b53b8d37a364a",
      "tree": "6797cb73a27c1e8b7d1ea79764356dc69486dad4",
      "parents": [
        "4fd14ebf6e3b66423dfac2bc9defda7b83ee07b3"
      ],
      "author": {
        "name": "Ying Han",
        "email": "yinghan@google.com",
        "time": "Thu May 26 16:25:36 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 26 17:12:35 2011 -0700"
      },
      "message": "memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages()\n\nThe caller of the function has been renamed to zone_nr_lru_pages(), and\nthis is just fixing up in the memcg code.  The current name is easily to\nbe mis-read as zone\u0027s total number of pages.\n\nSigned-off-by: Ying Han \u003cyinghan@google.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.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": "889976dbcb1218119fdd950fb7819084e37d7d37",
      "tree": "7508706ddb6bcbe0f673aca3744f30f281b17734",
      "parents": [
        "4e4c941c108eff10844d2b441d96dab44f32f424"
      ],
      "author": {
        "name": "Ying Han",
        "email": "yinghan@google.com",
        "time": "Thu May 26 16:25:33 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 26 17:12:35 2011 -0700"
      },
      "message": "memcg: reclaim memory from nodes in round-robin order\n\nPresently, memory cgroup\u0027s direct reclaim frees memory from the current\nnode.  But this has some troubles.  Usually when a set of threads works in\na cooperative way, they tend to operate on the same node.  So if they hit\nlimits under memcg they will reclaim memory from themselves, damaging the\nactive working set.\n\nFor example, assume 2 node system which has Node 0 and Node 1 and a memcg\nwhich has 1G limit.  After some work, file cache remains and the usages\nare\n\n   Node 0:  1M\n   Node 1:  998M.\n\nand run an application on Node 0, it will eat its foot before freeing\nunnecessary file caches.\n\nThis patch adds round-robin for NUMA and adds equal pressure to each node.\nWhen using cpuset\u0027s spread memory feature, this will work very well.\n\nBut yes, a better algorithm is needed.\n\n[akpm@linux-foundation.org: comment editing]\n[kamezawa.hiroyu@jp.fujitsu.com: fix time comparisons]\nSigned-off-by: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\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": "0ae5e89c60c9eb87da36a2614836bc434b0ec2ad",
      "tree": "0d509fd83ac7e7d2f52dfcbba769c43aeeb68b5f",
      "parents": [
        "f042e707ee671e4beb5389abeb9a1819a2cf5532"
      ],
      "author": {
        "name": "Ying Han",
        "email": "yinghan@google.com",
        "time": "Thu May 26 16:25:25 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 26 17:12:35 2011 -0700"
      },
      "message": "memcg: count the soft_limit reclaim in global background reclaim\n\nThe global kswapd scans per-zone LRU and reclaims pages regardless of the\ncgroup. It breaks memory isolation since one cgroup can end up reclaiming\npages from another cgroup. Instead we should rely on memcg-aware target\nreclaim including per-memcg kswapd and soft_limit hierarchical reclaim under\nmemory pressure.\n\nIn the global background reclaim, we do soft reclaim before scanning the\nper-zone LRU. However, the return value is ignored. This patch is the first\nstep to skip shrink_zone() if soft_limit reclaim does enough work.\n\nThis is part of the effort which tries to reduce reclaiming pages in global\nLRU in memcg. The per-memcg background reclaim patchset further enhances the\nper-cgroup targetting reclaim, which I should have V4 posted shortly.\n\nTry running multiple memory intensive workloads within seperate memcgs. Watch\nthe counters of soft_steal in memory.stat.\n\n  $ cat /dev/cgroup/A/memory.stat | grep \u0027soft\u0027\n  soft_steal 240000\n  soft_scan 240000\n  total_soft_steal 240000\n  total_soft_scan 240000\n\nThis patch:\n\nIn the global background reclaim, we do soft reclaim before scanning the\nper-zone LRU.  However, the return value is ignored.\n\nWe would like to skip shrink_zone() if soft_limit reclaim does enough\nwork.  Also, we need to make the memory pressure balanced across per-memcg\nzones, like the logic vm-core.  This patch is the first step where we\nstart with counting the nr_scanned and nr_reclaimed from soft_limit\nreclaim into the global scan_control.\n\nSigned-off-by: Ying Han \u003cyinghan@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nAcked-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": "67954fe95705a8ff80335964bd7e621d13fbc499",
      "tree": "07b2071264200953cedeb1ba63c18e000afad445",
      "parents": [
        "85f2e689a5c8fb6ed8fdbee00109e7f6e5fefcb6"
      ],
      "author": {
        "name": "Eric Dumazet",
        "email": "eric.dumazet@gmail.com",
        "time": "Thu Apr 14 15:21:52 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 14 16:06:54 2011 -0700"
      },
      "message": "memcg: fix mem_cgroup_rotate_reclaimable_page()\n\ncommit 3f58a8294333 (\"move memcg reclaimable page into tail of inactive\nlist\") added inline keyword twice in its prototype.\n\n    CC      arch/x86/kernel/asm-offsets.s\n  In file included from include/linux/swap.h:8,\n                   from include/linux/suspend.h:4,\n                   from arch/x86/kernel/asm-offsets.c:12:\n  include/linux/memcontrol.h:220: error: duplicate `inline\u0027\n\nSigned-off-by: Eric Dumazet \u003ceric.dumazet@gmail.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f212ad7cf9c73f8a7fa160e223dcb3f074441a72",
      "tree": "95789ef7ce662e86a3e4aded5dfb97c51dc7b0a0",
      "parents": [
        "af4a662144884a7dbb19acbef70878b3b955f928"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Mar 23 16:42:25 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 23 19:46:25 2011 -0700"
      },
      "message": "memcg: add memcg sanity checks at allocating and freeing pages\n\nAdd checks at allocating or freeing a page whether the page is used (iow,\ncharged) from the view point of memcg.\n\nThis check may be useful in debugging a problem and we did similar checks\nbefore the commit 52d4b9ac(memcg: allocate all page_cgroup at boot).\n\nThis patch adds some overheads at allocating or freeing memory, so it\u0027s\nenabled only when CONFIG_DEBUG_VM is enabled.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: 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": "3f58a82943337fb6e79acfa5346719a97d3c0b98",
      "tree": "667441ac13c845edac93c937d0baba03a2021ea8",
      "parents": [
        "315601809d124d046abd6c3ffa346d0dbd7aa29d"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Tue Mar 22 16:32:53 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:03 2011 -0700"
      },
      "message": "memcg: move memcg reclaimable page into tail of inactive list\n\nThe rotate_reclaimable_page function moves just written out pages, which\nthe VM wanted to reclaim, to the end of the inactive list.  That way the\nVM will find those pages first next time it needs to free memory.\n\nThis patch applies the rule in memcg.  It can help to prevent unnecessary\nworking page eviction of memcg.\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\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": "ef6a3c63112e865d632ff7c478ba7c7160cad0d1",
      "tree": "d0bd3ee2b79674e22b8dd3f318814cd4789697b8",
      "parents": [
        "318b275fbca1ab9ec0862de71420e0e92c3d1aa7"
      ],
      "author": {
        "name": "Miklos Szeredi",
        "email": "mszeredi@suse.cz",
        "time": "Tue Mar 22 16:30:52 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:02 2011 -0700"
      },
      "message": "mm: add replace_page_cache_page() function\n\nThis function basically does:\n\n     remove_from_page_cache(old);\n     page_cache_release(old);\n     add_to_page_cache_locked(new);\n\nExcept it does this atomically, so there\u0027s no possibility for the \"add\" to\nfail because of a race.\n\nIf memory cgroups are enabled, then the memory cgroup charge is also moved\nfrom the old page to the new.\n\nThis function is currently used by fuse to move pages into the page cache\non read, instead of copying the page contents.\n\n[minchan.kim@gmail.com: add freepage() hook to replace_page_cache_page()]\nSigned-off-by: Miklos Szeredi \u003cmszeredi@suse.cz\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-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": "ca3e021417eed30ec2b64ce88eb0acf64aa9bc29",
      "tree": "710590e51764d56c12d00744c402ab15c0d14a6b",
      "parents": [
        "e401f1761c0b01966e36e41e2c385d455a7b44ee"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 20 14:44:24 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 20 17:02:06 2011 -0800"
      },
      "message": "memcg: fix USED bit handling at uncharge in THP\n\nNow, under THP:\n\nat charge:\n  - PageCgroupUsed bit is set to all page_cgroup on a hugepage.\n    ....set to 512 pages.\nat uncharge\n  - PageCgroupUsed bit is unset on the head page.\n\nSo, some pages will remain with \"Used\" bit.\n\nThis patch fixes that Used bit is set only to the head page.\nUsed bits for tail pages will be set at splitting if necessary.\n\nThis patch adds this lock order:\n   compound_lock() -\u003e page_cgroup_move_lock().\n\n[akpm@linux-foundation.org: fix warning]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "50de1dd967d4ba3b8a90ebe7a4f5feca24191317",
      "tree": "ed2aa4352ae3c2887a90ef6279588a7048397d1b",
      "parents": [
        "17295c88a160c6eea3fcf46cec9d08a0fcb02db9"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 13 15:47:43 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:51 2011 -0800"
      },
      "message": "memcg: fix memory migration of shmem swapcache\n\nIn the current implementation mem_cgroup_end_migration() decides whether\nthe page migration has succeeded or not by checking \"oldpage-\u003emapping\".\n\nBut if we are tring to migrate a shmem swapcache, the page-\u003emapping of it\nis NULL from the begining, so the check would be invalid.  As a result,\nmem_cgroup_end_migration() assumes the migration has succeeded even if\nit\u0027s not, so \"newpage\" would be freed while it\u0027s not uncharged.\n\nThis patch fixes it by passing mem_cgroup_end_migration() the result of\nthe page migration.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: Johannes Weiner \u003channes@cmpxchg.org\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": "2a7106f2cb0768d00fe8c1eb42a754a7d8518f08",
      "tree": "730bef06e752c1edcb2d475fd193f94bea00bf6a",
      "parents": [
        "ece72400c2a27a3d726cb0854449f991d9fcd2da"
      ],
      "author": {
        "name": "Greg Thelen",
        "email": "gthelen@google.com",
        "time": "Thu Jan 13 15:47:37 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:50 2011 -0800"
      },
      "message": "memcg: create extensible page stat update routines\n\nReplace usage of the mem_cgroup_update_file_mapped() memcg\nstatistic update routine with two new routines:\n* mem_cgroup_inc_page_stat()\n* mem_cgroup_dec_page_stat()\n\nAs before, only the file_mapped statistic is managed.  However, these more\ngeneral interfaces allow for new statistics to be more easily added.  New\nstatistics are added with memcg dirty page accounting.\n\nSigned-off-by: Greg Thelen \u003cgthelen@google.com\u003e\nSigned-off-by: Andrea Righi \u003carighi@develer.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "00918b6ab89df8984ca06397cb77994dabd73f9b",
      "tree": "2ca2f0f0e7f3ca235c254f05759f96f160e3c0ab",
      "parents": [
        "14fec79680f7cc4617d6ba69324e63d4a732986c"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Tue Aug 10 18:03:05 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 11 08:59:19 2010 -0700"
      },
      "message": "memcg: remove nid and zid argument from mem_cgroup_soft_limit_reclaim()\n\nmem_cgroup_soft_limit_reclaim() has zone, nid and zid argument.  but nid\nand zid can be calculated from zone.  So remove it.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Nishimura Daisuke \u003cd-nishimura@mtf.biglobe.ne.jp\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": "25edde0332916ae706ccf83de688be57bcc844b7",
      "tree": "35a5b0e651f9cdb48d9a55a748970339c4f681bc",
      "parents": [
        "b898cc70019ce1835bbf6c47bdf978adc36faa42"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Mon Aug 09 17:19:27 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:45:00 2010 -0700"
      },
      "message": "vmscan: kill prev_priority completely\n\nSince 2.6.28 zone-\u003eprev_priority is unused. Then it can be removed\nsafely. It reduce stack usage slightly.\n\nNow I have to say that I\u0027m sorry. 2 years ago, I thought prev_priority\ncan be integrate again, it\u0027s useful. but four (or more) times trying\nhaven\u0027t got good performance number. Thus I give up such approach.\n\nThe rest of this changelog is notes on prev_priority and why it existed in\nthe first place and why it might be not necessary any more. This information\nis based heavily on discussions between Andrew Morton, Rik van Riel and\nKosaki Motohiro who is heavily quotes from.\n\nHistorically prev_priority was important because it determined when the VM\nwould start unmapping PTE pages. i.e. there are no balances of note within\nthe VM, Anon vs File and Mapped vs Unmapped. Without prev_priority, there\nis a potential risk of unnecessarily increasing minor faults as a large\namount of read activity of use-once pages could push mapped pages to the\nend of the LRU and get unmapped.\n\nThere is no proof this is still a problem but currently it is not considered\nto be. Active files are not deactivated if the active file list is smaller\nthan the inactive list reducing the liklihood that file-mapped pages are\nbeing pushed off the LRU and referenced executable pages are kept on the\nactive list to avoid them getting pushed out by read activity.\n\nEven if it is a problem, prev_priority prev_priority wouldn\u0027t works\nnowadays. First of all, current vmscan still a lot of UP centric code. it\nexpose some weakness on some dozens CPUs machine. I think we need more and\nmore improvement.\n\nThe problem is, current vmscan mix up per-system-pressure, per-zone-pressure\nand per-task-pressure a bit. example, prev_priority try to boost priority to\nother concurrent priority. but if the another task have mempolicy restriction,\nit is unnecessary, but also makes wrong big latency and exceeding reclaim.\nper-task based priority + prev_priority adjustment make the emulation of\nper-system pressure. but it have two issue 1) too rough and brutal emulation\n2) we need per-zone pressure, not per-system.\n\nAnother example, currently DEF_PRIORITY is 12. it mean the lru rotate about\n2 cycle (1/4096 + 1/2048 + 1/1024 + .. + 1) before invoking OOM-Killer.\nbut if 10,0000 thrreads enter DEF_PRIORITY reclaim at the same time, the\nsystem have higher memory pressure than priority\u003d\u003d0 (1/4096*10,000 \u003e 2).\nprev_priority can\u0027t solve such multithreads workload issue. In other word,\nprev_priority concept assume the sysmtem don\u0027t have lots threads.\"\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Chris Mason \u003cchris.mason@oracle.com\u003e\nCc: Nick Piggin \u003cnpiggin@suse.de\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Michael Rubin \u003cmrubin@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": "ac39cf8cb86c45eeac6a592ce0d58f9021a97235",
      "tree": "7321cafb0a1f8f2727c86f9d29159751df856c59",
      "parents": [
        "315c1998e10527ff364a9883048455e609bc7232"
      ],
      "author": {
        "name": "akpm@linux-foundation.org",
        "email": "akpm@linux-foundation.org",
        "time": "Wed May 26 14:42:46 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 27 09:12:44 2010 -0700"
      },
      "message": "memcg: fix mis-accounting of file mapped racy with migration\n\nFILE_MAPPED per memcg of migrated file cache is not properly updated,\nbecause our hook in page_add_file_rmap() can\u0027t know to which memcg\nFILE_MAPPED should be counted.\n\nBasically, this patch is for fixing the bug but includes some big changes\nto fix up other messes.\n\nNow, at migrating mapped file, events happen in following sequence.\n\n 1. allocate a new page.\n 2. get memcg of an old page.\n 3. charge ageinst a new page before migration. But at this point,\n    no changes to new page\u0027s page_cgroup, no commit for the charge.\n    (IOW, PCG_USED bit is not set.)\n 4. page migration replaces radix-tree, old-page and new-page.\n 5. page migration remaps the new page if the old page was mapped.\n 6. Here, the new page is unlocked.\n 7. memcg commits the charge for newpage, Mark the new page\u0027s page_cgroup\n    as PCG_USED.\n\nBecause \"commit\" happens after page-remap, we can count FILE_MAPPED\nat \"5\", because we should avoid to trust page_cgroup-\u003emem_cgroup.\nif PCG_USED bit is unset.\n(Note: memcg\u0027s LRU removal code does that but LRU-isolation logic is used\n for helping it. When we overwrite page_cgroup-\u003emem_cgroup, page_cgroup is\n not on LRU or page_cgroup-\u003emem_cgroup is NULL.)\n\nWe can lose file_mapped accounting information at 5 because FILE_MAPPED\nis updated only when mapcount changes 0-\u003e1. So we should catch it.\n\nBTW, historically, above implemntation comes from migration-failure\nof anonymous page. Because we charge both of old page and new page\nwith mapcount\u003d0, we can\u0027t catch\n  - the page is really freed before remap.\n  - migration fails but it\u0027s freed before remap\nor .....corner cases.\n\nNew migration sequence with memcg is:\n\n 1. allocate a new page.\n 2. mark PageCgroupMigration to the old page.\n 3. charge against a new page onto the old page\u0027s memcg. (here, new page\u0027s pc\n    is marked as PageCgroupUsed.)\n 4. page migration replaces radix-tree, page table, etc...\n 5. At remapping, new page\u0027s page_cgroup is now makrked as \"USED\"\n    We can catch 0-\u003e1 event and FILE_MAPPED will be properly updated.\n\n    And we can catch SWAPOUT event after unlock this and freeing this\n    page by unmap() can be caught.\n\n 7. Clear PageCgroupMigration of the old page.\n\nSo, FILE_MAPPED will be correctly updated.\n\nThen, for what MIGRATION flag is ?\n  Without it, at migration failure, we may have to charge old page again\n  because it may be fully unmapped. \"charge\" means that we have to dive into\n  memory reclaim or something complated. So, it\u0027s better to avoid\n  charge it again. Before this patch, __commit_charge() was working for\n  both of the old/new page and fixed up all. But this technique has some\n  racy condtion around FILE_MAPPED and SWAPOUT etc...\n  Now, the kernel use MIGRATION flag and don\u0027t uncharge old page until\n  the end of migration.\n\nI hope this change will make memcg\u0027s page migration much simpler.  This\npage migration has caused several troubles.  Worth to add a flag for\nsimplification.\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nTested-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReported-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: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: \"Kirill A. Shutemov\" \u003ckirill@shutemov.name\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8b25c6d2231b978ccce9c401e771932bde79aa9f",
      "tree": "13845799e14e49465de1529680df7def59dcfeb8",
      "parents": [
        "0aeb2339e54e40d0788a7017ecaeac7f5271e262"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Mon May 24 14:32:40 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 25 08:07:00 2010 -0700"
      },
      "message": "vmscan: remove isolate_pages callback scan control\n\nFor now, we have global isolation vs.  memory control group isolation, do\nnot allow the reclaim entry function to set an arbitrary page isolation\ncallback, we do not need that flexibility.\n\nAnd since we already pass around the group descriptor for the memory\ncontrol group isolation case, just use it to decide which one of the two\nisolator functions to use.\n\nThe decisions can be merged into nearby branches, so no extra cost there.\nIn fact, we save the indirect calls.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@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": "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": "d4220f987cf473c65a342ca69e3eb13dea919a49",
      "tree": "dbb004a9c805d6de3f6e3955398fee1084a29f16",
      "parents": [
        "61cf693159d6a968a7014e24905143f71ed8ddcf",
        "f2c03debdfb387fa2e35cac6382779072b8b9209"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 12:36:49 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 12:36:49 2009 -0800"
      },
      "message": "Merge branch \u0027hwpoison\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6\n\n* \u0027hwpoison\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (34 commits)\n  HWPOISON: Remove stray phrase in a comment\n  HWPOISON: Try to allocate migration page on the same node\n  HWPOISON: Don\u0027t do early filtering if filter is disabled\n  HWPOISON: Add a madvise() injector for soft page offlining\n  HWPOISON: Add soft page offline support\n  HWPOISON: Undefine short-hand macros after use to avoid namespace conflict\n  HWPOISON: Use new shake_page in memory_failure\n  HWPOISON: Use correct name for MADV_HWPOISON in documentation\n  HWPOISON: mention HWPoison in Kconfig entry\n  HWPOISON: Use get_user_page_fast in hwpoison madvise\n  HWPOISON: add an interface to switch off/on all the page filters\n  HWPOISON: add memory cgroup filter\n  memcg: add accessor to mem_cgroup.css\n  memcg: rename and export try_get_mem_cgroup_from_page()\n  HWPOISON: add page flags filter\n  mm: export stable page flags\n  HWPOISON: limit hwpoison injector to known page types\n  HWPOISON: add fs/device filters\n  HWPOISON: return 0 to indicate success reliably\n  HWPOISON: make semantics of IGNORED/DELAYED clear\n  ...\n"
    },
    {
      "commit": "d8046582d5ee24448800e71c6933fdb6813aa062",
      "tree": "857d014a850deee5ddb6da6550d81ce0122f03b1",
      "parents": [
        "cdec2e4265dfa09490601b00aeabd8a8d4af30f0"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Dec 15 16:47:09 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: make memcg\u0027s file mapped consistent with global VM\n\nIn global VM, FILE_MAPPED is used but memcg uses MAPPED_FILE.  This makes\ngrep difficult.  Replace memcg\u0027s MAPPED_FILE with FILE_MAPPED\n\nAnd in global VM, mapped shared memory is accounted into FILE_MAPPED.\nBut memcg doesn\u0027t. fix it.\nNote:\n  page_is_file_cache() just checks SwapBacked or not.\n  So, we need to check PageAnon.\n\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-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": "569b846df54ffb2827b83ce3244c5f032394cba4",
      "tree": "77c5d373a5edf97710fab8777912971b99e84828",
      "parents": [
        "cd9b45b78a61e8df250e69385c74e729e5b66abf"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Dec 15 16:47:03 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: coalesce uncharge during unmap/truncate\n\nIn massive parallel enviroment, res_counter can be a performance\nbottleneck.  One strong techinque to reduce lock contention is reducing\ncalls by coalescing some amount of calls into one.\n\nConsidering charge/uncharge chatacteristic,\n\t- charge is done one by one via demand-paging.\n\t- uncharge is done by\n\t\t- in chunk at munmap, truncate, exit, execve...\n\t\t- one by one via vmscan/paging.\n\nIt seems we have a chance to coalesce uncharges for improving scalability\nat unmap/truncation.\n\nThis patch is a for coalescing uncharge.  For avoiding scattering memcg\u0027s\nstructure to functions under /mm, this patch adds memcg batch uncharge\ninformation to the task.  A reason for per-task batching is for making use\nof caller\u0027s context information.  We do batched uncharge (deleyed\nuncharge) when truncation/unmap occurs but do direct uncharge when\nuncharge is called by memory reclaim (vmscan.c).\n\nThe degree of coalescing depends on callers\n  - at invalidate/trucate... pagevec size\n  - at unmap ....ZAP_BLOCK_SIZE\n(memory itself will be freed in this degree.)\nThen, we\u0027ll not coalescing too much.\n\nOn x86-64 8cpu server, I tested overheads of memcg at page fault by\nrunning a program which does map/fault/unmap in a loop. Running\na task per a cpu by taskset and see sum of the number of page faults\nin 60secs.\n\n[without memcg config]\n  40156968  page-faults              #      0.085 M/sec   ( +-   0.046% )\n  27.67 cache-miss/faults\n[root cgroup]\n  36659599  page-faults              #      0.077 M/sec   ( +-   0.247% )\n  31.58 miss/faults\n[in a child cgroup]\n  18444157  page-faults              #      0.039 M/sec   ( +-   0.133% )\n  69.96 miss/faults\n[child with this patch]\n  27133719  page-faults              #      0.057 M/sec   ( +-   0.155% )\n  47.16 miss/faults\n\nWe can see some amounts of improvement.\n(root cgroup doesn\u0027t affected by this patch)\nAnother patch for \"charge\" will follow this and above will be improved more.\n\nChangelog(since 2009/10/02):\n - renamed filed of memcg_batch (as pages to bytes, memsw to memsw_bytes)\n - some clean up and commentary/description updates.\n - added initialize code to copy_process(). (possible bug fix)\n\nChangelog(old):\n - fixed !CONFIG_MEM_CGROUP case.\n - rebased onto the latest mmotm + softlimit fix patches.\n - unified patch for callers\n - added commetns.\n - make -\u003edo_batch as bool.\n - removed css_get() at el. We don\u0027t need it.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.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": "d324236b3333e87c8825b35f2104184734020d35",
      "tree": "e8ad6b50e50f975b692cc6a15d5812a51d0047ad",
      "parents": [
        "e42d9d5d47961fb5db0be65b56dd52fe7b2421f1"
      ],
      "author": {
        "name": "Wu Fengguang",
        "email": "fengguang.wu@intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "committer": {
        "name": "Andi Kleen",
        "email": "ak@linux.intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "message": "memcg: add accessor to mem_cgroup.css\n\nSo that an outside user can free the reference count grabbed by\ntry_get_mem_cgroup_from_page().\n\nCC: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCC: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCC: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCC: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andi Kleen \u003cak@linux.intel.com\u003e\n"
    },
    {
      "commit": "e42d9d5d47961fb5db0be65b56dd52fe7b2421f1",
      "tree": "6a898c8d43ee0533581076342b9a7a97cca0509e",
      "parents": [
        "478c5ffc0b50527bd2390f2daa46cc16276b8413"
      ],
      "author": {
        "name": "Wu Fengguang",
        "email": "fengguang.wu@intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "committer": {
        "name": "Andi Kleen",
        "email": "ak@linux.intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "message": "memcg: rename and export try_get_mem_cgroup_from_page()\n\nSo that the hwpoison injector can get mem_cgroup for arbitrary page\nand thus know whether it is owned by some mem_cgroup task(s).\n\n[AK: Merged with latest git tree]\n\nCC: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCC: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCC: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCC: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andi Kleen \u003cak@linux.intel.com\u003e\n"
    },
    {
      "commit": "4e41695356fb4e0b153be1440ad027e46e0a7ea2",
      "tree": "547dae77d1655a1acb260ea8b266c7b8a48f2d2c",
      "parents": [
        "75822b4495b62e8721e9b88e3cf9e653a0c85b73"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Sep 23 15:56:39 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "memory controller: soft limit reclaim on contention\n\nImplement reclaim from groups over their soft limit\n\nPermit reclaim from memory cgroups on contention (via the direct reclaim\npath).\n\nmemory cgroup soft limit reclaim finds the group that exceeds its soft\nlimit by the largest number of pages and reclaims pages from it and then\nreinserts the cgroup into its correct place in the rbtree.\n\nAdd additional checks to mem_cgroup_hierarchical_reclaim() to detect long\nloops in case all swap is turned off.  The code has been refactored and\nthe loop check (loop \u003c 2) has been enhanced for soft limits.  For soft\nlimits, we try to do more targetted reclaim.  Instead of bailing out after\ntwo loops, the routine now reclaims memory proportional to the size by\nwhich the soft limit is exceeded.  The proportion has been empirically\ndetermined.\n\n[akpm@linux-foundation.org: build fix]\n[kamezawa.hiroyu@jp.fujitsu.com: fix softlimit css refcnt handling]\n[nishimura@mxp.nes.nec.co.jp: refcount of the \"victim\" should be decremented before exiting the loop]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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": "d69b042f3d7406ddba560143b1796020df760800",
      "tree": "6b704864716240aa1282d06bb79c02ef4b77e16d",
      "parents": [
        "cd5008196f7e583f4c558531a2bca59f6c674c5b"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Jun 17 16:26:34 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:47 2009 -0700"
      },
      "message": "memcg: add file-based RSS accounting\n\nAdd file RSS tracking per memory cgroup\n\nWe currently don\u0027t track file RSS, the RSS we report is actually anon RSS.\n All the file mapped pages, come in through the page cache and get\naccounted there.  This patch adds support for accounting file RSS pages.\nIt should\n\n1. Help improve the metrics reported by the memory resource controller\n2. Will form the basis for a future shared memory accounting heuristic\n   that has been proposed by Kamezawa.\n\nUnfortunately, we cannot rename the existing \"rss\" keyword used in\nmemory.stat to \"anon_rss\".  We however, add \"mapped_file\" data and hope to\neducate the end user through documentation.\n\n[hugh.dickins@tiscali.co.uk: fix mem_cgroup_update_mapped_file_stat oops]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.cn\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.co.jp\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "56e49d218890f49b0057710a4b6fef31f5ffbfec",
      "tree": "a0525dd9a140352276bdfb76a3d65230c3e5121d",
      "parents": [
        "35efa5e993a7a00a50b87d2b7725c3eafc80b083"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Tue Jun 16 15:32:28 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jun 16 19:47:38 2009 -0700"
      },
      "message": "vmscan: evict use-once pages first\n\nWhen the file LRU lists are dominated by streaming IO pages, evict those\npages first, before considering evicting other pages.\n\nThis should be safe from deadlocks or performance problems\nbecause only three things can happen to an inactive file page:\n\n1) referenced twice and promoted to the active list\n2) evicted by the pageout code\n3) under IO, after which it will get evicted or promoted\n\nThe pages freed in this way can either be reused for streaming IO, or\nallocated for something else.  If the pages are used for streaming IO,\nthis pageout pattern continues.  Otherwise, we will fall back to the\nnormal pageout pattern.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nReported-by: Elladan \u003celladan@eskimo.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ae3abae64f177586be55b04a7fb7047a34b21a3e",
      "tree": "05ba2ef8dca958cc4a02ac08e5aae03b8bc82a81",
      "parents": [
        "0816178638c15ce5472d39d771a96860dff4141a"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Apr 30 15:08:19 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat May 02 15:36:09 2009 -0700"
      },
      "message": "memcg: fix mem_cgroup_shrink_usage()\n\nCurrent mem_cgroup_shrink_usage() has two problems.\n\n1. It doesn\u0027t call mem_cgroup_out_of_memory and doesn\u0027t update\n   last_oom_jiffies, so pagefault_out_of_memory invokes global OOM.\n\n2. Considering hierarchy, shrinking has to be done from the\n   mem_over_limit, not from the memcg which the page would be charged to.\n\nmem_cgroup_try_charge_swapin() does all of these things properly, so we\nuse it and call cancel_charge_swapin when it succeeded.\n\nThe name of \"shrink_usage\" is not appropriate for this behavior, so we\nchange it too.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.cn\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.co.jp\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.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": "e638c1394010859a015a3b533ee452d768e62cea",
      "tree": "b8db247c01e86835afe6b0d6cd897543e76c23d0",
      "parents": [
        "c12ddba09394c60e1120e6997794fa6ed52da884"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Apr 21 12:24:41 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Apr 21 13:41:48 2009 -0700"
      },
      "message": "memcg: use rcu_dereference to access mm-\u003eowner\n\nmm-\u003eowner should be accessed with rcu_dereference().\n\nReported-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-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": "3918b96e03b2b8dd05889320623f6870e81d35ec",
      "tree": "b00b009a4e7b2a2605e592c5faf262c6006f74f5",
      "parents": [
        "c137b5ece4b111e46981aae7da77315b9909809f"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:41 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:56 2009 -0700"
      },
      "message": "memcg: remove mem_cgroup_reclaim_imbalance() remnants\n\ncommit 4f98a2fee8acdb4ac84545df98cccecfd130f8db (vmscan: split LRU lists\ninto anon \u0026 file sets) removed mem_cgroup_reclaim_imbalance(), but there\nare some leftovers in memcontrol.h.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: 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": "c137b5ece4b111e46981aae7da77315b9909809f",
      "tree": "99677d3ae0f9016e83f257743ff04d5886a6e998",
      "parents": [
        "e222432bfa7dcf6ec008622a978c9f284ed5e3a9"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:40 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: remove mem_cgroup_calc_mapped_ratio()\n\nCurrently, mem_cgroup_calc_mapped_ratio() is unused at all.  it can be\nremoved and KAMEZAWA-san suggested it.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\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": "b5a84319a4343a0db753436fd8147e61eaafa7ea",
      "tree": "5faae671b431b50a32a2d8c7a57cc9361d8f336d",
      "parents": [
        "544122e5e0ee27d5aac4a441f7746712afbf248c"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:35 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:10 2009 -0800"
      },
      "message": "memcg: fix shmem\u0027s swap accounting\n\nNow, you can see following even when swap accounting is enabled.\n\n 1. Create Group 01, and 02.\n 2. allocate a \"file\" on tmpfs by a task under 01.\n 3. swap out the \"file\" (by memory pressure)\n 4. Read \"file\" from a task in group 02.\n 5. the charge of \"file\" is moved to group 02.\n\nThis is not ideal behavior. This is because SwapCache which was loaded\nby read-ahead is not taken into account..\n\nThis is a patch to fix shmem\u0027s swapcache behavior.\n  - remove mem_cgroup_cache_charge_swapin().\n  - Add SwapCache handler routine to mem_cgroup_cache_charge().\n    By this, shmem\u0027s file cache is charged at add_to_page_cache()\n    with GFP_NOWAIT.\n  - pass the page of swapcache to shrink_mem_cgroup.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a5e924f5f8abf97944e625d74967cc9452cfbce8",
      "tree": "3a90d35e270617933f352c8c748880a62fa6eeca",
      "parents": [
        "3bb4edf24b26358eccfc69ac8b9a9c36ccc312da"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:28 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: remove mem_cgroup_try_charge\n\nAfter previous patch, mem_cgroup_try_charge is not used by anyone, so we\ncan remove it.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@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"
    }
  ],
  "next": "c772be939e078afd2505ede7d596a30f8f61de95"
}
