)]}'
{
  "log": [
    {
      "commit": "45f83cefe3a5f0476ac3f96382ebfdc3fe4caab2",
      "tree": "b2f7d3c02923d89db5a551c6a7923121db9610c4",
      "parents": [
        "623e3db9f9b7d6e7b2a99180f9cf0825c936ab7a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Wed Mar 28 14:42:40 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 28 17:14:35 2012 -0700"
      },
      "message": "mm: thp: fix up pmd_trans_unstable() locations\n\npmd_trans_unstable() should be called before pmd_offset_map() in the\nlocations where the mmap_sem is held for reading.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Larry Woodman \u003clwoodman@redhat.com\u003e\nCc: Ulrich Obergfell \u003cuobergfe@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Mark Salter \u003cmsalter@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": "12724850e8064f64b6223d26d78c0597c742c65a",
      "tree": "f0b91eeae069fe92906db7ad9d0d8a8003f05db4",
      "parents": [
        "d8c37c480678ebe09bc570f33e085e28049db035"
      ],
      "author": {
        "name": "Naoya Horiguchi",
        "email": "n-horiguchi@ah.jp.nec.com",
        "time": "Wed Mar 21 16:34:28 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:02 2012 -0700"
      },
      "message": "memcg: avoid THP split in task migration\n\nCurrently we can\u0027t do task migration among memory cgroups without THP\nsplit, which means processes heavily using THP experience large overhead\nin task migration.  This patch introduces the code for moving charge of\nTHP and makes THP more valuable.\n\nSigned-off-by: Naoya Horiguchi \u003cn-horiguchi@ah.jp.nec.com\u003e\nAcked-by: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.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": "8d32ff84401f1addb961c7af2c8d9baceb0ab9ba",
      "tree": "bf62513b239dce072f0105c0b06ed694634a77d4",
      "parents": [
        "a488428871265979bcf2c46298a04c1d5826e6cb"
      ],
      "author": {
        "name": "Naoya Horiguchi",
        "email": "n-horiguchi@ah.jp.nec.com",
        "time": "Wed Mar 21 16:34:27 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:02 2012 -0700"
      },
      "message": "memcg: clean up existing move charge code\n\n- Replace lengthy function name is_target_pte_for_mc() with a shorter\n  one in order to avoid ugly line breaks.\n\n- explicitly use MC_TARGET_* instead of simply using integers.\n\nSigned-off-by: Naoya Horiguchi \u003cn-horiguchi@ah.jp.nec.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Hillf Danton \u003cdhillf@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": "a488428871265979bcf2c46298a04c1d5826e6cb",
      "tree": "87126bade942bcff8f36e538c8f45605fd080fd0",
      "parents": [
        "45f3e385b7a639c633d7a4b1e863c2d52b918258"
      ],
      "author": {
        "name": "Jeff Liu",
        "email": "jeff.liu@oracle.com",
        "time": "Wed Mar 21 16:34:27 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:02 2012 -0700"
      },
      "message": "mm/memcontrol.c: remove unnecessary \u0027break\u0027 in mem_cgroup_read()\n\nSigned-off-by: Jie Liu \u003cjeff.liu@oracle.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "45f3e385b7a639c633d7a4b1e863c2d52b918258",
      "tree": "8f0c068aff36cc4f915899ed68d2e8686d75b069",
      "parents": [
        "13fd1dd9db345f6b2babd1e80a1c929092eb4896"
      ],
      "author": {
        "name": "Anton Vorontsov",
        "email": "anton.vorontsov@linaro.org",
        "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": "mm/memcontrol.c: remove redundant BUG_ON() in mem_cgroup_usage_unregister_event()\n\nIn the following code:\n\n\tif (type \u003d\u003d _MEM)\n\t\tthresholds \u003d \u0026memcg-\u003ethresholds;\n\telse if (type \u003d\u003d _MEMSWAP)\n\t\tthresholds \u003d \u0026memcg-\u003ememsw_thresholds;\n\telse\n\t\tBUG();\n\n\tBUG_ON(!thresholds);\n\nThe BUG_ON() seems redundant.\n\nSigned-off-by: Anton Vorontsov \u003canton.vorontsov@linaro.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "13fd1dd9db345f6b2babd1e80a1c929092eb4896",
      "tree": "03d5fd77f06780bd5c164b82c6ba04b56a259b06",
      "parents": [
        "4331f7d339ee0b54603344b9d13662a9c022540c"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "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": "mm/memcontrol.c: s/stealed/stolen/\n\nA grammatical fix.\n\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "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": "2ff76f1193f8481f7e6c29304eea4006e8e51569",
      "tree": "a263678dc298e29a0c54bb2e6f98bb1d5ee19751",
      "parents": [
        "89c06bd52fb9ffceddf84f7309d2e8c9f1666216"
      ],
      "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: remove PCG_FILE_MAPPED\n\nWith the new lock scheme for updating memcg\u0027s page stat, we don\u0027t need a\nflag PCG_FILE_MAPPED which was duplicated information of page_mapped().\n\n[hughd@google.com: cosmetic fix]\n[hughd@google.com: add comment to MEM_CGROUP_CHARGE_TYPE_MAPPED case in __mem_cgroup_uncharge_common()]\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": "312734c04e2fecc58429aec98194e4ff12d8f7d6",
      "tree": "c1195cd46733b6a3909c11b2b5abcdee4412b99b",
      "parents": [
        "619d094b5872a5af153f1af77a8b7f7326faf0d0"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 21 16:34:24 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:01 2012 -0700"
      },
      "message": "memcg: remove PCG_MOVE_LOCK flag from page_cgroup\n\nPCG_MOVE_LOCK is used for bit spinlock to avoid race between overwriting\npc-\u003emem_cgroup and page statistics accounting per memcg.  This lock helps\nto avoid the race but the race is very rare because moving tasks between\ncgroup is not a usual job.  So, it seems using 1bit per page is too\ncostly.\n\nThis patch changes this lock as per-memcg spinlock and removes\nPCG_MOVE_LOCK.\n\nIf smaller lock is required, we\u0027ll be able to add some hashes but I\u0027d like\nto start from this.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Greg Thelen \u003cgthelen@google.com\u003e\nCc: 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": "619d094b5872a5af153f1af77a8b7f7326faf0d0",
      "tree": "4de9ff8640d8cee092800cd722e621ea2db63640",
      "parents": [
        "9e3357907c84517d9e07bc0b19265807f0264b43"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 21 16:34:23 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:01 2012 -0700"
      },
      "message": "memcg: simplify move_account() check\n\nIn memcg, for avoiding take-lock-irq-off at accessing page_cgroup, a\nlogic, flag + rcu_read_lock(), is used.  This works as following\n\n     CPU-A                     CPU-B\n                             rcu_read_lock()\n    set flag\n                             if(flag is set)\n                                   take heavy lock\n                             do job.\n    synchronize_rcu()        rcu_read_unlock()\n    take heavy lock.\n\nIn recent discussion, it\u0027s argued that using per-cpu value for this flag\njust complicates the code because \u0027set flag\u0027 is very rare.\n\nThis patch changes \u0027flag\u0027 implementation from percpu to atomic_t.  This\nwill be much simpler.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Greg Thelen \u003cgthelen@google.com\u003e\nCc: 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\nCc: \"Paul E. McKenney\" \u003cpaulmck@us.ibm.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": "9e3357907c84517d9e07bc0b19265807f0264b43",
      "tree": "3ce1602eefd0c1f006c23170da16545478dc5404",
      "parents": [
        "a710920caedfcf56543136bfea300a6c593f9838"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 21 16:34:23 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:01 2012 -0700"
      },
      "message": "memcg: remove EXPORT_SYMBOL(mem_cgroup_update_page_stat)\n\nAs described in the log, I guess EXPORT was for preparing dirty\naccounting.  But _now_, we don\u0027t need to export this.  Remove this for\nnow.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Greg Thelen \u003cgthelen@google.com\u003e\nCc: 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\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": "b24028572fb69e9dd6de8c359eba2b2c66baa889",
      "tree": "563594eba40e5fd0b61c36c09705f128a8dfbe40",
      "parents": [
        "ca464d69b19120a826aa2534de2511a6f542edf5"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "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: remove PCG_CACHE page_cgroup flag\n\nWe record \u0027the page is cache\u0027 with the PCG_CACHE bit in page_cgroup.\nHere, \"CACHE\" means anonymous user pages (and SwapCache).  This doesn\u0027t\ninclude shmem.\n\nConsidering callers, at charge/uncharge, the caller should know what the\npage is and we don\u0027t need to record it by using one bit per page.\n\nThis patch removes PCG_CACHE bit and make callers of\nmem_cgroup_charge_statistics() to specify what the page is.\n\nAbout page migration: Mapping of the used page is not touched during migra\ntion (see page_remove_rmap) so we can rely on it and push the correct\ncharge type down to __mem_cgroup_uncharge_common from end_migration for\nunused page.  The force flag was misleading was abused for skipping the\nneedless page_mapped() / PageCgroupMigration() check, as we know the\nunused page is no longer mapped and cleared the migration flag just a few\nlines up.  But doing the checks is no biggie and it\u0027s not worth adding\nanother flag just to skip them.\n\n[akpm@linux-foundation.org: checkpatch fixes]\n[hughd@google.com: fix PageAnon uncharging]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Ying Han \u003cyinghan@google.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": "0e79dedde951e981612ed4e6d74873d61d2a113b",
      "tree": "eb759b4516068a39bc30a2e1758f0743a9c68762",
      "parents": [
        "1f2b71f41ee81735c25ef326da9a0610d640abc2"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Mar 21 16:34:20 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:01 2012 -0700"
      },
      "message": "memcg: remove unnecessary thp check in page stat accounting\n\nCommit e94c8a9cbce1 (\"memcg: make mem_cgroup_split_huge_fixup() more\nefficient\") removed move_lock_page_cgroup().  So we do not have to check\nPageTransHuge in mem_cgroup_update_page_stat() and fallback into the\nlocked accounting because both move_account() and thp split are done\nwith compound_lock so they cannot race.\n\nThe race between update vs.  move is protected by mem_cgroup_stealed.\n\nPageTransHuge pages shouldn\u0027t appear in this code path currently because\nwe are tracking only file pages at the moment but later we are planning\nto track also other pages (e.g.  mlocked ones).\n\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: Acked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nAcked-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": "1f2b71f41ee81735c25ef326da9a0610d640abc2",
      "tree": "07d2c696698da7bf6446b11158e0291c73bbae6b",
      "parents": [
        "f156ab9333c7810f8c4b1a0413142f52534b2df1"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Wed Mar 21 16:34:19 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:00 2012 -0700"
      },
      "message": "memcg: remove redundant returns\n\nRemove redundant returns from ends of functions, and one blank line.\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": "f156ab9333c7810f8c4b1a0413142f52534b2df1",
      "tree": "c456db15734c575223be69c57328e140cc4b489f",
      "parents": [
        "1eb4927251a4e5ab152e64afb29453547365fde8"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Wed Mar 21 16:34:19 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:00 2012 -0700"
      },
      "message": "memcg: enum lru_list lru\n\nMostly we use \"enum lru_list lru\": change those few \"l\"s to \"lru\"s.\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": "1eb4927251a4e5ab152e64afb29453547365fde8",
      "tree": "e2b51066c91c8a704251dfdfab6b94471206a00f",
      "parents": [
        "d79154bb5223edad407db61f59b9b15b0080ed80"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Wed Mar 21 16:34:19 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:55:00 2012 -0700"
      },
      "message": "memcg: lru_size instead of MEM_CGROUP_ZSTAT\n\nI never understood why we need a MEM_CGROUP_ZSTAT(mz, idx) macro to\nobscure the LRU counts.  For easier searching? So call it lru_size\nrather than bare count (lru_length sounds better, but would be wrong,\nsince each huge page raises lru_size hugely).\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\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": "d79154bb5223edad407db61f59b9b15b0080ed80",
      "tree": "28c7c706c5a78763fb75f9ff6e6d2b3a4d7fa82d",
      "parents": [
        "31a79235fc75b506e282e43723107a40f3bc5c07"
      ],
      "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 and mem_cont stragglers\n\nReplace mem and mem_cont stragglers in memcontrol.c by memcg.\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": "1a5a9906d4e8d1976b701f889d8f35d54b928f25",
      "tree": "e51912e725f224663a738045a4d0528d08da4572",
      "parents": [
        "31f6765266417c0d99f0e922fe82848a7c9c2ae9"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Wed Mar 21 16:33:42 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:54 2012 -0700"
      },
      "message": "mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode\n\nIn some cases it may happen that pmd_none_or_clear_bad() is called with\nthe mmap_sem hold in read mode.  In those cases the huge page faults can\nallocate hugepmds under pmd_none_or_clear_bad() and that can trigger a\nfalse positive from pmd_bad() that will not like to see a pmd\nmaterializing as trans huge.\n\nIt\u0027s not khugepaged causing the problem, khugepaged holds the mmap_sem\nin write mode (and all those sites must hold the mmap_sem in read mode\nto prevent pagetables to go away from under them, during code review it\nseems vm86 mode on 32bit kernels requires that too unless it\u0027s\nrestricted to 1 thread per process or UP builds).  The race is only with\nthe huge pagefaults that can convert a pmd_none() into a\npmd_trans_huge().\n\nEffectively all these pmd_none_or_clear_bad() sites running with\nmmap_sem in read mode are somewhat speculative with the page faults, and\nthe result is always undefined when they run simultaneously.  This is\nprobably why it wasn\u0027t common to run into this.  For example if the\nmadvise(MADV_DONTNEED) runs zap_page_range() shortly before the page\nfault, the hugepage will not be zapped, if the page fault runs first it\nwill be zapped.\n\nAltering pmd_bad() not to error out if it finds hugepmds won\u0027t be enough\nto fix this, because zap_pmd_range would then proceed to call\nzap_pte_range (which would be incorrect if the pmd become a\npmd_trans_huge()).\n\nThe simplest way to fix this is to read the pmd in the local stack\n(regardless of what we read, no need of actual CPU barriers, only\ncompiler barrier needed), and be sure it is not changing under the code\nthat computes its value.  Even if the real pmd is changing under the\nvalue we hold on the stack, we don\u0027t care.  If we actually end up in\nzap_pte_range it means the pmd was not none already and it was not huge,\nand it can\u0027t become huge from under us (khugepaged locking explained\nabove).\n\nAll we need is to enforce that there is no way anymore that in a code\npath like below, pmd_trans_huge can be false, but pmd_none_or_clear_bad\ncan run into a hugepmd.  The overhead of a barrier() is just a compiler\ntweak and should not be measurable (I only added it for THP builds).  I\ndon\u0027t exclude different compiler versions may have prevented the race\ntoo by caching the value of *pmd on the stack (that hasn\u0027t been\nverified, but it wouldn\u0027t be impossible considering\npmd_none_or_clear_bad, pmd_bad, pmd_trans_huge, pmd_none are all inlines\nand there\u0027s no external function called in between pmd_trans_huge and\npmd_none_or_clear_bad).\n\n\t\tif (pmd_trans_huge(*pmd)) {\n\t\t\tif (next-addr !\u003d HPAGE_PMD_SIZE) {\n\t\t\t\tVM_BUG_ON(!rwsem_is_locked(\u0026tlb-\u003emm-\u003emmap_sem));\n\t\t\t\tsplit_huge_page_pmd(vma-\u003evm_mm, pmd);\n\t\t\t} else if (zap_huge_pmd(tlb, vma, pmd, addr))\n\t\t\t\tcontinue;\n\t\t\t/* fall through */\n\t\t}\n\t\tif (pmd_none_or_clear_bad(pmd))\n\nBecause this race condition could be exercised without special\nprivileges this was reported in CVE-2012-1179.\n\nThe race was identified and fully explained by Ulrich who debugged it.\nI\u0027m quoting his accurate explanation below, for reference.\n\n\u003d\u003d\u003d\u003d\u003d\u003d start quote \u003d\u003d\u003d\u003d\u003d\u003d\u003d\n      mapcount 0 page_mapcount 1\n      kernel BUG at mm/huge_memory.c:1384!\n\n    At some point prior to the panic, a \"bad pmd ...\" message similar to the\n    following is logged on the console:\n\n      mm/memory.c:145: bad pmd ffff8800376e1f98(80000000314000e7).\n\n    The \"bad pmd ...\" message is logged by pmd_clear_bad() before it clears\n    the page\u0027s PMD table entry.\n\n        143 void pmd_clear_bad(pmd_t *pmd)\n        144 {\n    -\u003e  145         pmd_ERROR(*pmd);\n        146         pmd_clear(pmd);\n        147 }\n\n    After the PMD table entry has been cleared, there is an inconsistency\n    between the actual number of PMD table entries that are mapping the page\n    and the page\u0027s map count (_mapcount field in struct page). When the page\n    is subsequently reclaimed, __split_huge_page() detects this inconsistency.\n\n       1381         if (mapcount !\u003d page_mapcount(page))\n       1382                 printk(KERN_ERR \"mapcount %d page_mapcount %d\\n\",\n       1383                        mapcount, page_mapcount(page));\n    -\u003e 1384         BUG_ON(mapcount !\u003d page_mapcount(page));\n\n    The root cause of the problem is a race of two threads in a multithreaded\n    process. Thread B incurs a page fault on a virtual address that has never\n    been accessed (PMD entry is zero) while Thread A is executing an madvise()\n    system call on a virtual address within the same 2 MB (huge page) range.\n\n               virtual address space\n              .---------------------.\n              |                     |\n              |                     |\n            .-|---------------------|\n            | |                     |\n            | |                     |\u003c-- B(fault)\n            | |                     |\n      2 MB  | |/////////////////////|-.\n      huge \u003c  |/////////////////////|  \u003e A(range)\n      page  | |/////////////////////|-\u0027\n            | |                     |\n            | |                     |\n            \u0027-|---------------------|\n              |                     |\n              |                     |\n              \u0027---------------------\u0027\n\n    - Thread A is executing an madvise(..., MADV_DONTNEED) system call\n      on the virtual address range \"A(range)\" shown in the picture.\n\n    sys_madvise\n      // Acquire the semaphore in shared mode.\n      down_read(\u0026current-\u003emm-\u003emmap_sem)\n      ...\n      madvise_vma\n        switch (behavior)\n        case MADV_DONTNEED:\n             madvise_dontneed\n               zap_page_range\n                 unmap_vmas\n                   unmap_page_range\n                     zap_pud_range\n                       zap_pmd_range\n                         //\n                         // Assume that this huge page has never been accessed.\n                         // I.e. content of the PMD entry is zero (not mapped).\n                         //\n                         if (pmd_trans_huge(*pmd)) {\n                             // We don\u0027t get here due to the above assumption.\n                         }\n                         //\n                         // Assume that Thread B incurred a page fault and\n             .---------\u003e // sneaks in here as shown below.\n             |           //\n             |           if (pmd_none_or_clear_bad(pmd))\n             |               {\n             |                 if (unlikely(pmd_bad(*pmd)))\n             |                     pmd_clear_bad\n             |                     {\n             |                       pmd_ERROR\n             |                         // Log \"bad pmd ...\" message here.\n             |                       pmd_clear\n             |                         // Clear the page\u0027s PMD entry.\n             |                         // Thread B incremented the map count\n             |                         // in page_add_new_anon_rmap(), but\n             |                         // now the page is no longer mapped\n             |                         // by a PMD entry (-\u003e inconsistency).\n             |                     }\n             |               }\n             |\n             v\n    - Thread B is handling a page fault on virtual address \"B(fault)\" shown\n      in the picture.\n\n    ...\n    do_page_fault\n      __do_page_fault\n        // Acquire the semaphore in shared mode.\n        down_read_trylock(\u0026mm-\u003emmap_sem)\n        ...\n        handle_mm_fault\n          if (pmd_none(*pmd) \u0026\u0026 transparent_hugepage_enabled(vma))\n              // We get here due to the above assumption (PMD entry is zero).\n              do_huge_pmd_anonymous_page\n                alloc_hugepage_vma\n                  // Allocate a new transparent huge page here.\n                ...\n                __do_huge_pmd_anonymous_page\n                  ...\n                  spin_lock(\u0026mm-\u003epage_table_lock)\n                  ...\n                  page_add_new_anon_rmap\n                    // Here we increment the page\u0027s map count (starts at -1).\n                    atomic_set(\u0026page-\u003e_mapcount, 0)\n                  set_pmd_at\n                    // Here we set the page\u0027s PMD entry which will be cleared\n                    // when Thread A calls pmd_clear_bad().\n                  ...\n                  spin_unlock(\u0026mm-\u003epage_table_lock)\n\n    The mmap_sem does not prevent the race because both threads are acquiring\n    it in shared mode (down_read).  Thread B holds the page_table_lock while\n    the page\u0027s map count and PMD table entry are updated.  However, Thread A\n    does not synchronize on that lock.\n\n\u003d\u003d\u003d\u003d\u003d\u003d end quote \u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n[akpm@linux-foundation.org: checkpatch fixes]\nReported-by: Ulrich Obergfell \u003cuobergfe@redhat.com\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Dave Jones \u003cdavej@redhat.com\u003e\nAcked-by: Larry Woodman \u003clwoodman@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\t\t[2.6.38+]\nCc: Mark Salter \u003cmsalter@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": "0d9cabdccedb79ee5f27b77ff51f29a9e7d23275",
      "tree": "8bfb64c3672d058eb90aec3c3a9c4f61cef9097c",
      "parents": [
        "701085b219016d38f105b031381b9cee6200253a",
        "3ce3230a0cff484e5130153f244d4fb8a56b3a8b"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 20 18:11:21 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 20 18:11:21 2012 -0700"
      },
      "message": "Merge branch \u0027for-3.4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup\n\nPull cgroup changes from Tejun Heo:\n \"Out of the 8 commits, one fixes a long-standing locking issue around\n  tasklist walking and others are cleanups.\"\n\n* \u0027for-3.4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:\n  cgroup: Walk task list under tasklist_lock in cgroup_enable_task_cg_list\n  cgroup: Remove wrong comment on cgroup_enable_task_cg_list()\n  cgroup: remove cgroup_subsys argument from callbacks\n  cgroup: remove extra calls to find_existing_css_set\n  cgroup: replace tasklist_lock with rcu_read_lock\n  cgroup: simplify double-check locking in cgroup_attach_proc\n  cgroup: move struct cgroup_pidlist out from the header file\n  cgroup: remove cgroup_attach_task_current_cg()\n"
    },
    {
      "commit": "59927fb984de1703c67bc640c3e522d8b5276c73",
      "tree": "bbb2f9d93cebcd04e97f0f0b7d26c12e56ce831e",
      "parents": [
        "f1cbd03f5eabb75ea8ace23b47d2209f10871c16"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Mar 15 15:17:07 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 15 17:03:03 2012 -0700"
      },
      "message": "memcg: free mem_cgroup by RCU to fix oops\n\nAfter fixing the GPF in mem_cgroup_lru_del_list(), three times one\nmachine running a similar load (moving and removing memcgs while\nswapping) has oopsed in mem_cgroup_zone_nr_lru_pages(), when retrieving\nmemcg zone numbers for get_scan_count() for shrink_mem_cgroup_zone():\nthis is where a struct mem_cgroup is first accessed after being chosen\nby mem_cgroup_iter().\n\nJust what protects a struct mem_cgroup from being freed, in between\nmem_cgroup_iter()\u0027s css_get_next() and its css_tryget()? css_tryget()\nfails once css-\u003erefcnt is zero with CSS_REMOVED set in flags, yes: but\nwhat if that memory is freed and reused for something else, which sets\n\"refcnt\" non-zero? Hmm, and scope for an indefinite freeze if refcnt is\nleft at zero but flags are cleared.\n\nIt\u0027s tempting to move the css_tryget() into css_get_next(), to make it\nreally \"get\" the css, but I don\u0027t think that actually solves anything:\nthe same difficulty in moving from css_id found to stable css remains.\n\nBut we already have rcu_read_lock() around the two, so it\u0027s easily fixed\nif __mem_cgroup_free() just uses kfree_rcu() to free mem_cgroup.\n\nHowever, a big struct mem_cgroup is allocated with vzalloc() instead of\nkzalloc(), and we\u0027re not allowed to vfree() at interrupt time: there\ndoesn\u0027t appear to be a general vfree_rcu() to help with this, so roll\nour own using schedule_work().  The compiler decently removes\nvfree_work() and vfree_rcu() when the config doesn\u0027t need them.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Tejun Heo \u003ctj@kernel.org\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": "be22aece684f5a700e6247b9861c3759d5798a3c",
      "tree": "07d423a2cdb16140e8704a69788f8b9bd5ddbe13",
      "parents": [
        "a7f4255f906f60f72e00aad2fb000939449ff32e"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Fri Mar 09 13:37:32 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 09 15:32:20 2012 -0800"
      },
      "message": "memcg: revert fix to mapcount check for this release\n\nRespectfully revert commit e6ca7b89dc76 \"memcg: fix mapcount check\nin move charge code for anonymous page\" for the 3.3 release, so that\nit behaves exactly like releases 2.6.35 through 3.2 in this respect.\n\nHoriguchi-san\u0027s commit is correct in itself, 1 makes much more sense\nthan 2 in that check; but it does not go far enough - swapcount\nshould be considered too - if we really want such a check at all.\n\nWe appear to have reached agreement now, and expect that 3.4 will\nremove the mapcount check, but had better not make 3.3 different.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nReviewed-by: Naoya Horiguchi \u003cn-horiguchi@ah.jp.nec.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e6ca7b89dc76abf77c80887fed54e0a60c87c0a8",
      "tree": "edfd8cce78c61cbf6cd9e738662ad25baa2b2bc0",
      "parents": [
        "1c641e84719429bbfe62a95ed3545ee7fe24408f"
      ],
      "author": {
        "name": "Naoya Horiguchi",
        "email": "n-horiguchi@ah.jp.nec.com",
        "time": "Mon Mar 05 14:59:20 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 05 15:49:43 2012 -0800"
      },
      "message": "memcg: fix mapcount check in move charge code for anonymous page\n\nCurrently the charge on shared anonyous pages is supposed not to moved in\ntask migration.  To implement this, we need to check that mapcount \u003e 1,\ninstread of \u003e 2.  So this patch fixes it.\n\nSigned-off-by: Naoya Horiguchi \u003cn-horiguchi@ah.jp.nec.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.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": "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": "9ce70c0240d01309b34712f87eda4fbfba3c3764",
      "tree": "be59ba1d702631aab6e5f5c12b0ec5ebe15b10b2",
      "parents": [
        "73737b878767ef441d7cc34ebeeba01dd0a68dd6"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Mar 05 14:59:16 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 05 15:49:43 2012 -0800"
      },
      "message": "memcg: fix deadlock by inverting lrucare nesting\n\nWe have forgotten the rules of lock nesting: the irq-safe ones must be\ntaken inside the non-irq-safe ones, otherwise we are open to deadlock:\n\nCPU0                          CPU1\n----                          ----\nlock(\u0026(\u0026pc-\u003elock)-\u003erlock);\n                              local_irq_disable();\n                              lock(\u0026(\u0026zone-\u003elru_lock)-\u003erlock);\n                              lock(\u0026(\u0026pc-\u003elock)-\u003erlock);\n\u003cInterrupt\u003e\nlock(\u0026(\u0026zone-\u003elru_lock)-\u003erlock);\n\nTo check a different locking issue, I happened to add a spin_lock to\nmemcg\u0027s bit_spin_lock in lock_page_cgroup(), and lockdep very quickly\ncomplained about __mem_cgroup_commit_charge_lrucare() (on CPU1 above).\n\nSo delete __mem_cgroup_commit_charge_lrucare(), passing a bool lrucare to\n__mem_cgroup_commit_charge() instead, taking zone-\u003elru_lock under\nlock_page_cgroup() in the lrucare case.\n\nThe original was using spin_lock_irqsave, but we\u0027d be in more trouble if\nit were ever called at interrupt time: unconditional _irq is enough.  And\nClearPageLRU before del from lru, SetPageLRU before add to lru: no strong\nreason, but that is the ordering used consistently elsewhere.\n\nFixes 36b62ad539498d00c2d280a151a (\"memcg: simplify corner case handling\nof LRU\").\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "371528caec553785c37f73fa3926ea0de84f986f",
      "tree": "cc718011d32ae17ec61d1a68b71f912caf26b5bb",
      "parents": [
        "37fbf4bfb826372c3ca6c09d8a015d1fe9f5e186"
      ],
      "author": {
        "name": "Anton Vorontsov",
        "email": "anton.vorontsov@linaro.org",
        "time": "Fri Feb 24 05:14:46 2012 +0400"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 24 08:55:51 2012 -0800"
      },
      "message": "mm: memcg: Correct unregistring of events attached to the same eventfd\n\nThere is an issue when memcg unregisters events that were attached to\nthe same eventfd:\n\n- On the first call mem_cgroup_usage_unregister_event() removes all\n  events attached to a given eventfd, and if there were no events left,\n  thresholds-\u003eprimary would become NULL;\n\n- Since there were several events registered, cgroups core will call\n  mem_cgroup_usage_unregister_event() again, but now kernel will oops,\n  as the function doesn\u0027t expect that threshold-\u003eprimary may be NULL.\n\nThat\u0027s a good question whether mem_cgroup_usage_unregister_event()\nshould actually remove all events in one go, but nowadays it can\u0027t\ndo any better as cftype-\u003eunregister_event callback doesn\u0027t pass\nany private event-associated cookie. So, let\u0027s fix the issue by\nsimply checking for threshold-\u003eprimary.\n\nFWIW, w/o the patch the following oops may be observed:\n\n BUG: unable to handle kernel NULL pointer dereference at 0000000000000004\n IP: [\u003cffffffff810be32c\u003e] mem_cgroup_usage_unregister_event+0x9c/0x1f0\n Pid: 574, comm: kworker/0:2 Not tainted 3.3.0-rc4+ #9 Bochs Bochs\n RIP: 0010:[\u003cffffffff810be32c\u003e]  [\u003cffffffff810be32c\u003e] mem_cgroup_usage_unregister_event+0x9c/0x1f0\n RSP: 0018:ffff88001d0b9d60  EFLAGS: 00010246\n Process kworker/0:2 (pid: 574, threadinfo ffff88001d0b8000, task ffff88001de91cc0)\n Call Trace:\n  [\u003cffffffff8107092b\u003e] cgroup_event_remove+0x2b/0x60\n  [\u003cffffffff8103db94\u003e] process_one_work+0x174/0x450\n  [\u003cffffffff8103e413\u003e] worker_thread+0x123/0x2d0\n\nCc: stable \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Anton Vorontsov \u003canton.vorontsov@linaro.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "82b3f2a7171731cce62f25058d25afb91a14710c",
      "tree": "a8837d2d8640f1607611257bd41fded4ab2a56e8",
      "parents": [
        "31e0017e6f6fb5cfdfaf932c1f98c9bef8d57688"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Fri Feb 03 15:37:14 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 03 16:16:40 2012 -0800"
      },
      "message": "mm/memcontrol.c: fix warning with CONFIG_NUMA\u003dn\n\nmm/memcontrol.c: In function \u0027memcg_check_events\u0027:\nmm/memcontrol.c:779: warning: unused variable \u0027do_numainfo\u0027\n\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Hiroyuki KAMEZAWA \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: \"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": "761b3ef50e1c2649cffbfa67a4dcb2dcdb7982ed",
      "tree": "67ab6a9a2520811c9c0b4d70d1c19b4bfca16237",
      "parents": [
        "61d1d219c4c0761059236a46867bc49943c4d29d"
      ],
      "author": {
        "name": "Li Zefan",
        "email": "lizf@cn.fujitsu.com",
        "time": "Tue Jan 31 13:47:36 2012 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Feb 02 09:20:22 2012 -0800"
      },
      "message": "cgroup: remove cgroup_subsys argument from callbacks\n\nThe argument is not used at all, and it\u0027s not necessary, because\na specific callback handler of course knows which subsys it\nbelongs to.\n\nNow only -\u003epupulate() takes this argument, because the handlers of\nthis callback always call cgroup_add_file()/cgroup_add_files().\n\nSo we reduce a few lines of code, though the shrinking of object size\nis minimal.\n\n 16 files changed, 113 insertions(+), 162 deletions(-)\n\n   text    data     bss     dec     hex filename\n5486240  656987 7039960 13183187         c928d3 vmlinux.o.orig\n5486170  656987 7039960 13183117         c9288d vmlinux.o\n\nSigned-off-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "701b259f446be2f3625fb852bceb93afe76e206d",
      "tree": "93f15bcd00bd59c38b4e59fed9af7ddf6b06c8b3",
      "parents": [
        "d2346963bfcbb9a8ee783ca3c3b3bdd7448ec9d5",
        "efc3dbc37412c027e363736b4f4c74ee5e8ecffc"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jan 24 15:51:40 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jan 24 15:51:40 2012 -0800"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net\n\nDavem says:\n\n1) Fix JIT code generation on x86-64 for divide by zero, from Eric Dumazet.\n\n2) tg3 header length computation correction from Eric Dumazet.\n\n3) More build and reference counting fixes for socket memory cgroup\n   code from Glauber Costa.\n\n4) module.h snuck back into a core header after all the hard work we\n   did to remove that, from Paul Gortmaker and Jesper Dangaard Brouer.\n\n5) Fix PHY naming regression and add some new PCI IDs in stmmac, from\n   Alessandro Rubini.\n\n6) Netlink message generation fix in new team driver, should only advertise\n   the entries that changed during events, from Jiri Pirko.\n\n7) SRIOV VF registration and unregistration fixes, and also add a\n   missing PCI ID, from Roopa Prabhu.\n\n8) Fix infinite loop in tx queue flush code of brcmsmac, from Stanislaw Gruszka.\n\n9) ftgmac100/ftmac100 build fix, missing interrupt.h include.\n\n10) Memory leak fix in net/hyperv do_set_mutlicast() handling, from Wei Yongjun.\n\n11) Off by one fix in netem packet scheduler, from Vijay Subramanian.\n\n12) TCP loss detection fix from Yuchung Cheng.\n\n13) TCP reset packet MD5 calculation uses wrong address, fix from Shawn Lu.\n\n14) skge carrier assertion and DMA mapping fixes from Stephen Hemminger.\n\n15) Congestion recovery undo performed at the wrong spot in BIC and CUBIC\n    congestion control modules, fix from Neal Cardwell.\n\n16) Ethtool ETHTOOL_GSSET_INFO is unnecessarily restrictive, from Michał Mirosław.\n\n17) Fix triggerable race in ipv6 sysctl handling, from Francesco Ruggeri.\n\n18) Statistics bug fixes in mlx4 from Eugenia Emantayev.\n\n19) rds locking bug fix during info dumps, from your\u0027s truly.\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (67 commits)\n  rds: Make rds_sock_lock BH rather than IRQ safe.\n  netprio_cgroup.h: dont include module.h from other includes\n  net: flow_dissector.c missing include linux/export.h\n  team: send only changed options/ports via netlink\n  net/hyperv: fix possible memory leak in do_set_multicast()\n  drivers/net: dsa/mv88e6xxx.c files need linux/module.h\n  stmmac: added PCI identifiers\n  llc: Fix race condition in llc_ui_recvmsg\n  stmmac: fix phy naming inconsistency\n  dsa: Add reporting of silicon revision for Marvell 88E6123/88E6161/88E6165 switches.\n  tg3: fix ipv6 header length computation\n  skge: add byte queue limit support\n  mv643xx_eth: Add Rx Discard and Rx Overrun statistics\n  bnx2x: fix compilation error with SOE in fw_dump\n  bnx2x: handle CHIP_REVISION during init_one\n  bnx2x: allow user to change ring size in ISCSI SD mode\n  bnx2x: fix Big-Endianess in ethtool -t\n  bnx2x: fixed ethtool statistics for MF modes\n  bnx2x: credit-leakage fixup on vlan_mac_del_all\n  macvlan: fix a possible use after free\n  ...\n"
    },
    {
      "commit": "6568d4a9c9ff16d6c4f0b14dfea567806ce579e4",
      "tree": "5aef7ff51027d8986113025b3e9b0255476772dd",
      "parents": [
        "85e72aa5384b1a614563ad63257ded0e91d1a620"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Fri Jan 20 14:34:12 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 23 08:38:48 2012 -0800"
      },
      "message": "mm: memcg: update the correct soft limit tree during migration\n\nend_migration() passes the old page instead of the new page to commit\nthe charge.  This page descriptor is not used for committing itself,\nthough, since we also pass the (correct) page_cgroup descriptor.  But\nit\u0027s used to find the soft limit tree through the page\u0027s zone, so the\nsoft limit tree of the old page\u0027s zone is updated instead of that of the\nnew page\u0027s, which might get slightly out of date until the next charge\nreaches the ratelimit point.\n\nThis glitch has been present since 5564e88 (\"memcg: condense\npage_cgroup-to-page lookup points\").\n\nThis fixes a bug that I introduced in 2.6.38.  It\u0027s benign enough (to my\nknowledge) that we probably don\u0027t want this for stable.\n\nReported-by: Hugh Dickins \u003chughd@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\nAcked-by: 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": "376be5ff8a6a36efadd131860cf26841f366d44c",
      "tree": "af7c37842eeb37c4a79195c46fc1dabbaf84be6f",
      "parents": [
        "1a3bc369ba547c11ca8b3ed079d7584f27499e70"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Fri Jan 20 04:57:14 2012 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Sun Jan 22 15:08:45 2012 -0500"
      },
      "message": "net: fix socket memcg build with !CONFIG_NET\n\nThere is still a build bug with the sock memcg code, that triggers\nwith !CONFIG_NET, that survived my series of randconfig builds.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nReported-by: Randy Dunlap \u003crdunlap@xenotime.net\u003e\nCC: Hiroyouki Kamezawa \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "319d3b9c97b5e3191e419bb95496bf08ec50f096",
      "tree": "6e57f4183060aab780d17fe8f6ac11272cc679fc",
      "parents": [
        "8d9d399f14ea65aeb50c7404e986bceede93bb99"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Sun Jan 15 22:04:39 2012 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Tue Jan 17 10:15:45 2012 -0500"
      },
      "message": "net: move sock_update_memcg outside of CONFIG_INET\n\nAlthough only used currently for tcp sockets, this function\nis now used in common sock code (for sock_clone())\n\nCommit 475f1b52645a29936b9df1d8fcd45f7e56bd4a9f moved the\ndeclaration of sock_update_clone() to inside sock.c, but\nthis only fixes the problem when CONFIG_CGROUP_MEM_RES_CTLR_KMEM\nis also not defined.\n\nThis patch here is verified to fix both problems, although\nreverting the previous one is not necessary.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCC: David S. Miller \u003cdavem@davemloft.net\u003e\nCC: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nReported-by: Randy Dunlap \u003crdunlap@xenotime.net\u003e\nAcked-by: Randy Dunlap \u003crdunlap@xenotime.net\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "90b3feaec8ffb167abd8903bf111605c2f035aa8",
      "tree": "503c27c343397e1c94dce61e922fae18c7cd7172",
      "parents": [
        "12d27107867fc7216e8faaff0b894b0f162dcf75"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 12 17:19:54 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:10 2012 -0800"
      },
      "message": "memcg: fix mem_cgroup_print_bad_page\n\nIf DEBUG_VM, mem_cgroup_print_bad_page() is called whenever bad_page()\nshows a \"Bad page state\" message, removes page from circulation, adds a\ntaint and continues.  This is at a very low level, often when a spinlock\nis held (sometimes when page table lock is held, for example).\n\nWe want to recover from this badness, not make it worse: we must not\nkmalloc memory here, we must not do a cgroup path lookup via dubious\npointers.  No doubt that code was useful to debug a particular case at one\ntime, and may be again, but take it out of the mainline kernel.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: 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": "12d27107867fc7216e8faaff0b894b0f162dcf75",
      "tree": "8f35d39f7e5d0b0f0ba10a3475e9fa4a2581e509",
      "parents": [
        "0cee34fd72c582b4f8ad8ce00645b75fb4168199"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 12 17:19:52 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:09 2012 -0800"
      },
      "message": "memcg: fix split_huge_page_refcounts()\n\nThis patch started off as a cleanup: __split_huge_page_refcounts() has to\ncope with two scenarios, when the hugepage being split is already on LRU,\nand when it is not; but why does it have to split that accounting across\nthree different sites?  Consolidate it in lru_add_page_tail(), handling\nevictable and unevictable alike, and use standard add_page_to_lru_list()\nwhen accounting is needed (when the head is not yet on LRU).\n\nBut a recent regression in -next, I guess the removal of PageCgroupAcctLRU\ntest from mem_cgroup_split_huge_fixup(), makes this now a necessary fix:\nunder load, the MEM_CGROUP_ZSTAT count was wrapping to a huge number,\nmessing up reclaim calculations and causing a freeze at rmdir of cgroup.\n\nAdd a VM_BUG_ON to mem_cgroup_lru_del_list() when we\u0027re about to wrap that\ncount - this has not been the only such incident.  Document that\nlru_add_page_tail() is for Transparent HugePages by #ifdef around it.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: 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": "3ed28fa1080c73747ce17f2025b28b062fb5aa7f",
      "tree": "f4eab7da502fb728fac728220bc1f296ee04dca1",
      "parents": [
        "38c5d72f3ebe5ddd57d2f08dc035070fc6c9a287"
      ],
      "author": {
        "name": "Bob Liu",
        "email": "lliubbo@gmail.com",
        "time": "Thu Jan 12 17:19:04 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "memcg: cleanup for_each_node_state()\n\nWe already have for_each_node(node) define in nodemask.h, better to use it.\n\nSigned-off-by: Bob Liu \u003clliubbo@gmail.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: 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": "38c5d72f3ebe5ddd57d2f08dc035070fc6c9a287",
      "tree": "6461c0dfec95dccc92191f059fbe99b5660a8860",
      "parents": [
        "4e5f01c2b9b94321992acb09c35d34f5ee5bb274"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 12 17:19:01 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "memcg: simplify LRU handling by new rule\n\nNow, at LRU handling, memory cgroup needs to do complicated works to see\nvalid pc-\u003emem_cgroup, which may be overwritten.\n\nThis patch is for relaxing the protocol. This patch guarantees\n   - when pc-\u003emem_cgroup is overwritten, page must not be on LRU.\n\nBy this, LRU routine can believe pc-\u003emem_cgroup and don\u0027t need to check\nbits on pc-\u003eflags.  This new rule may adds small overheads to swapin.  But\nin most case, lru handling gets faster.\n\nAfter this patch, PCG_ACCT_LRU bit is obsolete and removed.\n\n[akpm@linux-foundation.org: remove unneeded VM_BUG_ON(), restore hannes\u0027s christmas tree]\n[akpm@linux-foundation.org: clean up code comment]\n[hughd@google.com: fix NULL mem_cgroup_try_charge]\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\nAcked-by: 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": "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": "36b62ad539498d00c2d280a151abad5f7630fa73",
      "tree": "553409901df6210e4a698c1991f9d455199e098b",
      "parents": [
        "dc67d50465f249bb357bf85b3ed1f642eb00130a"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 12 17:18:57 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "memcg: simplify corner case handling of LRU.\n\nThis patch simplifies LRU handling of racy case (memcg+SwapCache).  At\ncharging, SwapCache tend to be on LRU already.  So, before overwriting\npc-\u003emem_cgroup, the page must be removed from LRU and added to LRU\nlater.\n\nThis patch does\n        spin_lock(zone-\u003elru_lock);\n        if (PageLRU(page))\n                remove from LRU\n        overwrite pc-\u003emem_cgroup\n        if (PageLRU(page))\n                add to new LRU.\n        spin_unlock(zone-\u003elru_lock);\n\nAnd guarantee all pages are not on LRU at modifying pc-\u003emem_cgroup.\nThis patch also unfies lru handling of replace_page_cache() and\nswapin.\n\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\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Ying Han \u003cyinghan@google.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": "dc67d50465f249bb357bf85b3ed1f642eb00130a",
      "tree": "f3808a1bebe5dfbf1691603007966b7222376d55",
      "parents": [
        "de077d222d5ca6108cab119a09593344c12100ab"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 12 17:18:55 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "memcg: simplify page cache charging\n\nThis patch is a clean up. No functional/logical changes.\n\nBecause of commit ef6a3c6311 (\"mm: add replace_page_cache_page()\nfunction\") , FUSE uses replace_page_cache() instead of\nadd_to_page_cache().  Then, mem_cgroup_cache_charge() is not called\nagainst FUSE\u0027s pages from splice.\n\nSo now, mem_cgroup_cache_charge() gets pages that are not on the LRU\nwith the exception of PageSwapCache pages.  For checking,\nWARN_ON_ONCE(PageLRU(page)) is added.\n\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\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Ying Han \u003cyinghan@google.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": "de077d222d5ca6108cab119a09593344c12100ab",
      "tree": "c59efc8b4fff063d2c318480881050b1913ed21b",
      "parents": [
        "c3cecc683446ad54ca587d7123bd3ce94bd7b8e1"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Thu Jan 12 17:18:52 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "oom, memcg: fix exclusion of memcg threads after they have detached their mm\n\nThe oom killer relies on logic that identifies threads that have already\nbeen oom killed when scanning the tasklist and, if found, deferring\nuntil such threads have exited.  This is done by checking for any\ncandidate threads that have the TIF_MEMDIE bit set.\n\nFor memcg ooms, candidate threads are first found by calling\ntask_in_mem_cgroup() since the oom killer should not defer if there\u0027s an\noom killed thread in another memcg.\n\nUnfortunately, task_in_mem_cgroup() excludes threads if they have\ndetached their mm in the process of exiting so TIF_MEMDIE is never\ndetected for such conditions.  This is different for global, mempolicy,\nand cpuset oom conditions where a detached mm is only excluded after\nchecking for TIF_MEMDIE and deferring, if necessary, in\nselect_bad_process().\n\nThe fix is to return true if a task has a detached mm but is still in\nthe memcg or its hierarchy that is currently oom.  This will allow the\noom killer to appropriately defer rather than kill unnecessarily or, in\nthe worst case, panic the machine if nothing else is available to kill.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.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": "c3cecc683446ad54ca587d7123bd3ce94bd7b8e1",
      "tree": "27dfb859c1c45a6369d62eac4b5b9ad62871b7ce",
      "parents": [
        "9fb4b7cc0724f178d4b24a2a566ea1e7cb120b82"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Thu Jan 12 17:18:50 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "memcg: free entries in soft_limit_tree if allocation fails\n\nIf we are not able to allocate tree nodes for all NUMA nodes then we\nshould release those that were allocated.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9fb4b7cc0724f178d4b24a2a566ea1e7cb120b82",
      "tree": "0f2db9102d46f5e5c8492864fb1bd21f2e7cd768",
      "parents": [
        "40f23a21a8501c1b2c65c50c19b516488ac31313"
      ],
      "author": {
        "name": "Bob Liu",
        "email": "lliubbo@gmail.com",
        "time": "Thu Jan 12 17:18:48 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:07 2012 -0800"
      },
      "message": "page_cgroup: add helper function to get swap_cgroup\n\nThere are multiple places which need to get the swap_cgroup address, so\nadd a helper function:\n\n  static struct swap_cgroup *swap_cgroup_getsc(swp_entry_t ent,\n                                struct swap_cgroup_ctrl **ctrl);\n\nto simplify the code.\n\nSigned-off-by: Bob Liu \u003clliubbo@gmail.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003cjweiner@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": "40f23a21a8501c1b2c65c50c19b516488ac31313",
      "tree": "4e70dbd9e7cc1dda350156bf05786ede7dbf8256",
      "parents": [
        "7a0524cfc8f9f585471a31b1282a9ce4a1a7d444"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:45 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:06 2012 -0800"
      },
      "message": "mm: memcg: remove unneeded checks from uncharge_page()\n\nmem_cgroup_uncharge_page() is only called on either freshly allocated\npages without page-\u003emapping or on rmapped PageAnon() pages.  There is no\nneed to check for a page-\u003emapping that is not an anon_vma.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.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: David Rientjes \u003crientjes@google.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": "7a0524cfc8f9f585471a31b1282a9ce4a1a7d444",
      "tree": "4e31e1ec7e892d67e48d1199b9e8590ad5718e7a",
      "parents": [
        "00c54c0bac24bb02d2460c516da76651a7451286"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:43 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:06 2012 -0800"
      },
      "message": "mm: memcg: remove unneeded checks from newpage_charge()\n\nAll callsites pass in freshly allocated pages and a valid mm.  As a\nresult, all checks pertaining to the page\u0027s mapcount, page-\u003emapping or the\nfallback to init_mm are unneeded.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: David Rientjes \u003crientjes@google.com\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": "cfa449461e67b60df986170eecb089831fa9e49a",
      "tree": "ff40cff591e27250b91b2f1fb4409875f397b048",
      "parents": [
        "0e574a932d2cab8eb3b02d21feb59f2c09154738"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:38 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:06 2012 -0800"
      },
      "message": "mm: memcg: lookup_page_cgroup (almost) never returns NULL\n\nPages have their corresponding page_cgroup descriptors set up before\nthey are used in userspace, and thus managed by a memory cgroup.\n\nThe only time where lookup_page_cgroup() can return NULL is in the\nCONFIG_DEBUG_VM-only page sanity checking code that executes while\nfeeding pages into the page allocator for the first time.\n\nRemove the NULL checks against lookup_page_cgroup() results from all\ncallsites where we know that corresponding page_cgroup descriptors must\nbe allocated, and add a comment to the callsite that actually does have\nto check the return value.\n\n[hughd@google.com: stop oops in mem_cgroup_update_page_stat()]\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.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: David Rientjes \u003crientjes@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": "0e574a932d2cab8eb3b02d21feb59f2c09154738",
      "tree": "5bfae84ec49d6e92efcf6ba1cb92235f546c8e38",
      "parents": [
        "72835c86ca15d0126354b73d5f29ce9194931c9b"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:35 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:06 2012 -0800"
      },
      "message": "mm: memcg: clean up fault accounting\n\nThe fault accounting functions have a single, memcg-internal user, so they\ndon\u0027t need to be global.  In fact, their one-line bodies can be directly\nfolded into the caller.  And since faults happen one at a time, use\nthis_cpu_inc() directly instead of this_cpu_add(foo, 1).\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: David Rientjes \u003crientjes@google.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": "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": "f53d7ce32e13dbd09573b176e6521a04c2c77803",
      "tree": "af88d1c256d06e3d37c5df013de9ff41f86ed4a2",
      "parents": [
        "e94c8a9cbce1aee4af9e1285802785481b7f93c5"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:23 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:05 2012 -0800"
      },
      "message": "mm: memcg: shorten preempt-disabled section around event checks\n\nOnly the ratelimit checks themselves have to run with preemption\ndisabled, the resulting actions - checking for usage thresholds,\nupdating the soft limit tree - can and should run with preemption\nenabled.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nReported-by: Yong Zhang \u003cyong.zhang0@gmail.com\u003e\nTested-by: Yong Zhang \u003cyong.zhang0@gmail.com\u003e\nReported-by: Luis Henriques \u003chenrix@camandro.org\u003e\nTested-by: Luis Henriques \u003chenrix@camandro.org\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "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": "6290df545814990ca2663baf6e894669132d5f73",
      "tree": "c62472270ba81a7146bed0854be74e2e2338c629",
      "parents": [
        "b95a2f2d486d0d768a92879c023a03757b9c7e58"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:10 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:05 2012 -0800"
      },
      "message": "mm: collect LRU list heads into struct lruvec\n\nHaving a unified structure with a LRU list set for both global zones and\nper-memcg zones allows to keep that code simple which deals with LRU\nlists and does not care about the container itself.\n\nOnce the per-memcg LRU lists directly link struct pages, the isolation\nfunction and all other list manipulations are shared between the memcg\ncase and the global LRU case.\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": "ad2b8e601099a23dffffb53f91c18d874fe98854",
      "tree": "6b7706f3005fd799f23d0ddc21fe5b33fd1e79ac",
      "parents": [
        "5660048ccac8735d9bc0a46325a02e6a6518b5b2"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:18:02 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:05 2012 -0800"
      },
      "message": "mm: memcg: remove optimization of keeping the root_mem_cgroup LRU lists empty\n\nroot_mem_cgroup, lacking a configurable limit, was never subject to\nlimit reclaim, so the pages charged to it could be kept off its LRU\nlists.  They would be found on the global per-zone LRU lists upon\nphysical memory pressure and it made sense to avoid uselessly linking\nthem to both lists.\n\nThe global per-zone LRU lists are about to go away on memcg-enabled\nkernels, with all pages being exclusively linked to their respective\nper-memcg LRU lists.  As a result, pages of the root_mem_cgroup must\nalso be linked to its LRU lists again.  This is purely about the LRU\nlist, root_mem_cgroup is still not charged.\n\nThe overhead is temporary until the double-LRU scheme is going away\ncompletely.\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": "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": "527a5ec9a53471d855291ba9f1fdf1dd4e12a184",
      "tree": "156a8be57e66e1c6f54e498beda0f2d8412cee12",
      "parents": [
        "f16015fbf2f6ac45505d6ad21455ff9f6c14473d"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:17:55 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:04 2012 -0800"
      },
      "message": "mm: memcg: per-priority per-zone hierarchy scan generations\n\nMemory cgroup limit reclaim currently picks one memory cgroup out of the\ntarget hierarchy, remembers it as the last scanned child, and reclaims\nall zones in it with decreasing priority levels.\n\nThe new hierarchy reclaim code will pick memory cgroups from the same\nhierarchy concurrently from different zones and priority levels, it\nbecomes necessary that hierarchy roots not only remember the last\nscanned child, but do so for each zone and priority level.\n\nUntil now, we reclaimed memcgs like this:\n\n    mem \u003d mem_cgroup_iter(root)\n    for each priority level:\n      for each zone in zonelist:\n        reclaim(mem, zone)\n\nBut subsequent patches will move the memcg iteration inside the loop\nover the zones:\n\n    for each priority level:\n      for each zone in zonelist:\n        mem \u003d mem_cgroup_iter(root)\n        reclaim(mem, zone)\n\nAnd to keep with the original scan order - memcg -\u003e priority -\u003e zone -\nthe last scanned memcg has to be remembered per zone and per priority\nlevel.\n\nFurthermore, global reclaim will be switched to the hierarchy walk as\nwell.  Different from limit reclaim, which can just recheck the limit\nafter some reclaim progress, its target is to scan all memcgs for the\ndesired zone pages, proportional to the memcg size, and so reliably\ndetecting a full hierarchy round-trip will become crucial.\n\nCurrently, the code relies on one reclaimer encountering the same memcg\ntwice, but that is error-prone with concurrent reclaimers.  Instead, use\na generation counter that is increased every time the child with the\nhighest ID has been visited, so that reclaimers can stop when the\ngeneration changes.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nReviewed-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\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": "9f3a0d0933de079665ec1b498947ffbf805b0018",
      "tree": "495b27908e328eff16a2269734109b8d6e5be95d",
      "parents": [
        "ab936cbcd02072a34b60d268f94440fd5cf1970b"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Jan 12 17:17:48 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:04 2012 -0800"
      },
      "message": "mm: memcg: consolidate hierarchy iteration primitives\n\nThe memcg naturalization series:\n\nMemory control groups are currently bolted onto the side of\ntraditional memory management in places where better integration would\nbe preferrable.  To reclaim memory, for example, memory control groups\nmaintain their own LRU list and reclaim strategy aside from the global\nper-zone LRU list reclaim.  But an extra list head for each existing\npage frame is expensive and maintaining it requires additional code.\n\nThis patchset disables the global per-zone LRU lists on memory cgroup\nconfigurations and converts all its users to operate on the per-memory\ncgroup lists instead.  As LRU pages are then exclusively on one list,\nthis saves two list pointers for each page frame in the system:\n\npage_cgroup array size with 4G physical memory\n\n  vanilla: allocated 31457280 bytes of page_cgroup\n  patched: allocated 15728640 bytes of page_cgroup\n\nAt the same time, system performance for various workloads is\nunaffected:\n\n100G sparse file cat, 4G physical memory, 10 runs, to test for code\nbloat in the traditional LRU handling and kswapd \u0026 direct reclaim\npaths, without/with the memory controller configured in\n\n  vanilla: 71.603(0.207) seconds\n  patched: 71.640(0.156) seconds\n\n  vanilla: 79.558(0.288) seconds\n  patched: 77.233(0.147) seconds\n\n100G sparse file cat in 1G memory cgroup, 10 runs, to test for code\nbloat in the traditional memory cgroup LRU handling and reclaim path\n\n  vanilla: 96.844(0.281) seconds\n  patched: 94.454(0.311) seconds\n\n4 unlimited memcgs running kbuild -j32 each, 4G physical memory, 500M\nswap on SSD, 10 runs, to test for regressions in kswapd \u0026 direct\nreclaim using per-memcg LRU lists with multiple memcgs and multiple\nallocators within each memcg\n\n  vanilla: 717.722(1.440) seconds [ 69720.100(11600.835) majfaults ]\n  patched: 714.106(2.313) seconds [ 71109.300(14886.186) majfaults ]\n\n16 unlimited memcgs running kbuild, 1900M hierarchical limit, 500M\nswap on SSD, 10 runs, to test for regressions in hierarchical memcg\nsetups\n\n  vanilla: 2742.058(1.992) seconds [ 26479.600(1736.737) majfaults ]\n  patched: 2743.267(1.214) seconds [ 27240.700(1076.063) majfaults ]\n\nThis patch:\n\nThere are currently two different implementations of iterating over a\nmemory cgroup hierarchy tree.\n\nConsolidate them into one worker function and base the convenience\nlooping-macros on top of it.\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": "38e5781bbf8e82c1635ea845e0d07b2228a5ac7a",
      "tree": "69ced9c509c864a67122c5e1337f14cd1d9e988d",
      "parents": [
        "979ecef5b89a8003902299566d9cdc08de34a3ee",
        "a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 09 14:46:52 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 09 14:46:52 2012 -0800"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net\n\n* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:\n  igmp: Avoid zero delay when receiving odd mixture of IGMP queries\n  netdev: make net_device_ops const\n  bcm63xx: make ethtool_ops const\n  usbnet: make ethtool_ops const\n  net: Fix build with INET disabled.\n  net: introduce netif_addr_lock_nested() and call if when appropriate\n  net: correct lock name in dev_[uc/mc]_sync documentations.\n  net: sk_update_clone is only used in net/core/sock.c\n  8139cp: fix missing napi_gro_flush.\n  pktgen: set correct max and min in pktgen_setup_inject()\n  smsc911x: Unconditionally include linux/smscphy.h in smsc911x.h\n  asix: fix infinite loop in rx_fixup()\n  net: Default UDP and UNIX diag to \u0027n\u0027.\n  r6040: fix typo in use of MCR0 register bits\n  net: fix sock_clone reference mismatch with tcp memcontrol\n"
    },
    {
      "commit": "db0c2bf69aa095d4a6de7b1145f29fe9a7c0f6a3",
      "tree": "8f38957c01b18edddd44d49ecc3beeac08a20b4e",
      "parents": [
        "ac69e0928054ff29a5049902fb477f9c7605c773",
        "0d19ea866562e46989412a0676412fa0983c9ce7"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 09 12:59:24 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 09 12:59:24 2012 -0800"
      },
      "message": "Merge branch \u0027for-3.3\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup\n\n* \u0027for-3.3\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (21 commits)\n  cgroup: fix to allow mounting a hierarchy by name\n  cgroup: move assignement out of condition in cgroup_attach_proc()\n  cgroup: Remove task_lock() from cgroup_post_fork()\n  cgroup: add sparse annotation to cgroup_iter_start() and cgroup_iter_end()\n  cgroup: mark cgroup_rmdir_waitq and cgroup_attach_proc() as static\n  cgroup: only need to check oldcgrp\u003d\u003dnewgrp once\n  cgroup: remove redundant get/put of task struct\n  cgroup: remove redundant get/put of old css_set from migrate\n  cgroup: Remove unnecessary task_lock before fetching css_set on migration\n  cgroup: Drop task_lock(parent) on cgroup_fork()\n  cgroups: remove redundant get/put of css_set from css_set_check_fetched()\n  resource cgroups: remove bogus cast\n  cgroup: kill subsys-\u003ecan_attach_task(), pre_attach() and attach_task()\n  cgroup, cpuset: don\u0027t use ss-\u003epre_attach()\n  cgroup: don\u0027t use subsys-\u003ecan_attach_task() or -\u003eattach_task()\n  cgroup: introduce cgroup_taskset and use it in subsys-\u003ecan_attach(), cancel_attach() and attach()\n  cgroup: improve old cgroup handling in cgroup_attach_proc()\n  cgroup: always lock threadgroup during migration\n  threadgroup: extend threadgroup_lock() to cover exit and exec\n  threadgroup: rename signal-\u003ethreadgroup_fork_lock to -\u003egroup_rwsem\n  ...\n\nFix up conflict in kernel/cgroup.c due to commit e0197aae59e5: \"cgroups:\nfix a css_set not found bug in cgroup_attach_proc\" that already\nmentioned that the bug is fixed (differently) in Tejun\u0027s cgroup\npatchset. This one, in other words.\n"
    },
    {
      "commit": "f3f511e1ce6f1a6f0a5bb8320e9f802e76f6b999",
      "tree": "bedb8b38bec1bdb3fa7159bc61822488984d3ce0",
      "parents": [
        "356b95424cfb456e14a59eaa579422ce014c424b"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Thu Jan 05 20:16:39 2012 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Sat Jan 07 10:16:34 2012 -0800"
      },
      "message": "net: fix sock_clone reference mismatch with tcp memcontrol\n\nSockets can also be created through sock_clone. Because it copies\nall data in the sock structure, it also copies the memcg-related pointer,\nand all should be fine. However, since we now use reference counts in\nsocket creation, we are left with some sockets that have no reference\ncounts. It matters when we destroy them, since it leads to a mismatch.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCC: David S. Miller \u003cdavem@davemloft.net\u003e\nCC: Greg Thelen \u003cgthelen@google.com\u003e\nCC: Hiroyouki Kamezawa \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCC: Laurent Chavey \u003cchavey@google.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "abb434cb0539fb355c1c921f8fd761efbbac3462",
      "tree": "24a7d99ec161f8fd4dc9ff03c9c4cc93be883ce6",
      "parents": [
        "2494654d4890316e7340fb8b3458daad0474a1b9",
        "6350323ad8def2ac00d77cdee3b79c9b9fba75c4"
      ],
      "author": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Fri Dec 23 17:13:56 2011 -0500"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Fri Dec 23 17:13:56 2011 -0500"
      },
      "message": "Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net\n\nConflicts:\n\tnet/bluetooth/l2cap_core.c\n\nJust two overlapping changes, one added an initialization of\na local variable, and another change added a new local variable.\n\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "65c64ce8ee642eb330a4c4d94b664725f2902b44",
      "tree": "c4ad98c2a7f839f3b968fae6eddeec8b5752ce49",
      "parents": [
        "7d6c429b263c2f735f3df8c282cc77a8659e5d74"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Thu Dec 22 01:02:27 2011 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Thu Dec 22 22:37:18 2011 -0500"
      },
      "message": "Partial revert \"Basic kernel memory functionality for the Memory Controller\"\n\nThis reverts commit e5671dfae59b165e2adfd4dfbdeab11ac8db5bda.\n\nAfter a follow up discussion with Michal, it was agreed it would\nbe better to leave the kmem controller with just the tcp files,\ndeferring the behavior of the other general memory.kmem.* files\nfor a later time, when more caches are controlled. This is because\ngeneric kmem files are not used by tcp accounting and it is\nnot clear how other slab caches would fit into the scheme.\n\nWe are reverting the original commit so we can track the reference.\nPart of the patch is kept, because it was used by the later tcp\ncode. Conflicts are shown in the bottom. init/Kconfig is removed from\nthe revert entirely.\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCC: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCC: Paul Menage \u003cpaul@paulmenage.org\u003e\nCC: Greg Thelen \u003cgthelen@google.com\u003e\nCC: Johannes Weiner \u003cjweiner@redhat.com\u003e\nCC: David S. Miller \u003cdavem@davemloft.net\u003e\n\nConflicts:\n\n\tDocumentation/cgroups/memory.txt\n\tmm/memcontrol.c\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "a41c58a6665cc995e237303b05db42100b71b65e",
      "tree": "49842a2cde1ad77232cd4a5dadb5cb9796e2aee5",
      "parents": [
        "481fe17e973fb97aa3edf17c69557afe88d8334f"
      ],
      "author": {
        "name": "Hillf Danton",
        "email": "dhillf@gmail.com",
        "time": "Mon Dec 19 17:11:57 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 20 10:25:04 2011 -0800"
      },
      "message": "memcg: keep root group unchanged if creation fails\n\nIf the request is to create non-root group and we fail to meet it, we\nshould leave the root unchanged.\n\nSigned-off-by: Hillf Danton \u003cdhillf@gmail.com\u003e\nAcked-by: Hugh Dickins \u003chughd@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: David Rientjes \u003crientjes@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\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": "2f7ee5691eecb67c8108b92001a85563ea336ac5",
      "tree": "18cf60ea8a463f4a6cd59c68926ba4357ae8ff4c",
      "parents": [
        "134d33737f9015761c3832f6b268fae6274aac7f"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Dec 12 18:12:21 2011 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Dec 12 18:12:21 2011 -0800"
      },
      "message": "cgroup: introduce cgroup_taskset and use it in subsys-\u003ecan_attach(), cancel_attach() and attach()\n\nCurrently, there\u0027s no way to pass multiple tasks to cgroup_subsys\nmethods necessitating the need for separate per-process and per-task\nmethods.  This patch introduces cgroup_taskset which can be used to\npass multiple tasks and their associated cgroups to cgroup_subsys\nmethods.\n\nThree methods - can_attach(), cancel_attach() and attach() - are\nconverted to use cgroup_taskset.  This unifies passed parameters so\nthat all methods have access to all information.  Conversions in this\npatchset are identical and don\u0027t introduce any behavior change.\n\n-v2: documentation updated as per Paul Menage\u0027s suggestion.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nAcked-by: Paul Menage \u003cpaul@paulmenage.org\u003e\nAcked-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: James Morris \u003cjmorris@namei.org\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": "e5671dfae59b165e2adfd4dfbdeab11ac8db5bda",
      "tree": "daf5570e8da71934970daa4b2044c6f13ee98f9d",
      "parents": [
        "08e34eb14fe4cfd934b5c169a7682a969457c4ea"
      ],
      "author": {
        "name": "Glauber Costa",
        "email": "glommer@parallels.com",
        "time": "Sun Dec 11 21:47:01 2011 +0000"
      },
      "committer": {
        "name": "David S. Miller",
        "email": "davem@davemloft.net",
        "time": "Mon Dec 12 19:03:55 2011 -0500"
      },
      "message": "Basic kernel memory functionality for the Memory Controller\n\nThis patch lays down the foundation for the kernel memory component\nof the Memory Controller.\n\nAs of today, I am only laying down the following files:\n\n * memory.independent_kmem_limit\n * memory.kmem.limit_in_bytes (currently ignored)\n * memory.kmem.usage_in_bytes (always zero)\n\nSigned-off-by: Glauber Costa \u003cglommer@parallels.com\u003e\nCC: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCC: Paul Menage \u003cpaul@paulmenage.org\u003e\nCC: Greg Thelen \u003cgthelen@google.com\u003e\nCC: Johannes Weiner \u003cjweiner@redhat.com\u003e\nCC: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n"
    },
    {
      "commit": "32aaeffbd4a7457bf2f7448b33b5946ff2a960eb",
      "tree": "faf7ad871d87176423ff9ed1d1ba4d9c688fc23f",
      "parents": [
        "208bca0860406d16398145ddd950036a737c3c9d",
        "67b84999b1a8b1af5625b1eabe92146c5eb42932"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 19:44:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 19:44:47 2011 -0800"
      },
      "message": "Merge branch \u0027modsplit-Oct31_2011\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux\n\n* \u0027modsplit-Oct31_2011\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)\n  Revert \"tracing: Include module.h in define_trace.h\"\n  irq: don\u0027t put module.h into irq.h for tracking irqgen modules.\n  bluetooth: macroize two small inlines to avoid module.h\n  ip_vs.h: fix implicit use of module_get/module_put from module.h\n  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence\n  include: replace linux/module.h with \"struct module\" wherever possible\n  include: convert various register fcns to macros to avoid include chaining\n  crypto.h: remove unused crypto_tfm_alg_modname() inline\n  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE\n  pm_runtime.h: explicitly requires notifier.h\n  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h\n  miscdevice.h: fix up implicit use of lists and types\n  stop_machine.h: fix implicit use of smp.h for smp_processor_id\n  of: fix implicit use of errno.h in include/linux/of.h\n  of_platform.h: delete needless include \u003clinux/module.h\u003e\n  acpi: remove module.h include from platform/aclinux.h\n  miscdevice.h: delete unnecessary inclusion of module.h\n  device_cgroup.h: delete needless include \u003clinux/module.h\u003e\n  net: sch_generic remove redundant use of \u003clinux/module.h\u003e\n  net: inet_timewait_sock doesnt need \u003clinux/module.h\u003e\n  ...\n\nFix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in\n - drivers/media/dvb/frontends/dibx000_common.c\n - drivers/media/video/{mt9m111.c,ov6650.c}\n - drivers/mfd/ab3550-core.c\n - include/linux/dmaengine.h\n"
    },
    {
      "commit": "4799401fef9d5951b2da384c5eb08034c48e08a0",
      "tree": "94f9113c6870f46811aaa0f08cdb3ca2beba1e9c",
      "parents": [
        "a61ed3cec51cfd4877855c24890ab8d3e2b143e3"
      ],
      "author": {
        "name": "Steven Rostedt",
        "email": "srostedt@redhat.com",
        "time": "Wed Nov 02 13:38:33 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 02 16:07:00 2011 -0700"
      },
      "message": "memcg: Fix race condition in memcg_check_events() with this_cpu usage\n\nVarious code in memcontrol.c () calls this_cpu_read() on the calculations\nto be done from two different percpu variables, or does an open-coded\nread-modify-write on a single percpu variable.\n\nDisable preemption throughout these operations so that the writes go to\nthe correct palces.\n\n[hannes@cmpxchg.org: added this_cpu to __this_cpu conversion]\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.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": "a61ed3cec51cfd4877855c24890ab8d3e2b143e3",
      "tree": "3ffb850513b202c8eb0ac09ad6d307719bd39856",
      "parents": [
        "9b272977e3b99a8699361d214b51f98c8a9e0e7b"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Wed Nov 02 13:38:29 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 02 16:07:00 2011 -0700"
      },
      "message": "memcg: close race between charge and putback\n\nThere is a potential race between a thread charging a page and another\nthread putting it back to the LRU list:\n\n  charge:                         putback:\n  SetPageCgroupUsed               SetPageLRU\n  PageLRU \u0026\u0026 add to memcg LRU     PageCgroupUsed \u0026\u0026 add to memcg LRU\n\nThe order of setting one flag and checking the other is crucial, otherwise\nthe charge may observe !PageLRU while the putback observes !PageCgroupUsed\nand the page is not linked to the memcg LRU at all.\n\nGlobal memory pressure may fix this by trying to isolate and putback the\npage for reclaim, where that putback would link it to the memcg LRU again.\n Without that, the memory cgroup is undeletable due to a charge whose\nphysical page can not be found and moved out.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nCc: Ying Han \u003cyinghan@google.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\nCc: 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": "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": "0a619e58703b86d53d07e938eade9a91a4a863c6",
      "tree": "0579cebdbdbb90507db04b320acb4191f8a86f2e",
      "parents": [
        "715a5ee82ab3c07430f748630044354132add5ad"
      ],
      "author": {
        "name": "Igor Mammedov",
        "email": "imammedo@redhat.com",
        "time": "Wed Nov 02 13:38:21 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 02 16:07:00 2011 -0700"
      },
      "message": "memcg: do not expose uninitialized mem_cgroup_per_node to world\n\nIf somebody is touching data too early, it might be easier to diagnose a\nproblem when dereferencing NULL at mem-\u003einfo.nodeinfo[node] than trying to\nunderstand why mem_cgroup_per_zone is [un|partly]initialized.\n\nSigned-off-by: Igor Mammedov \u003cimammedo@redhat.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "715a5ee82ab3c07430f748630044354132add5ad",
      "tree": "f77a20fbcd0e19dcb3b65f511194e01e8095bf6a",
      "parents": [
        "c0ff4b8540a5c158b8e5bafb7d767298b67b0b92"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Nov 02 13:38:18 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 02 16:06:59 2011 -0700"
      },
      "message": "memcg: fix oom schedule_timeout()\n\nBefore calling schedule_timeout(), task state should be changed.\n\nSigned-off-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": "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": "b9e15bafdf1aa20791cdefdcbf1ccf7d7aa03aaa",
      "tree": "459af0df6234a50b43b87078fd252941e231cbc3",
      "parents": [
        "e25934a51772f47edd94d7b7d08b0e167769639c"
      ],
      "author": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Thu May 26 16:00:52 2011 -0400"
      },
      "committer": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Mon Oct 31 09:20:12 2011 -0400"
      },
      "message": "mm: Add export.h for EXPORT_SYMBOL to active symbol exporters\n\nThese files were getting \u003clinux/module.h\u003e via an implicit include\npath, but we want to crush those out of existence since they cost\ntime during compiles of processing thousands of lines of headers\nfor no reason.  Give them the lightweight header that just contains\nthe EXPORT_SYMBOL infrastructure.\n\nSigned-off-by: Paul Gortmaker \u003cpaul.gortmaker@windriver.com\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": "23751be0094012eb6b4756fa80ca54b3eb83069f",
      "tree": "30c33d9165bb33d64bd42d6e9bc1e4cbed1c0780",
      "parents": [
        "86383b55791bd97e88ef493e33ef521ee244f3d9"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Aug 25 15:59:16 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Aug 25 16:25:34 2011 -0700"
      },
      "message": "memcg: fix hierarchical oom locking\n\nCommit 79dfdaccd1d5 (\"memcg: make oom_lock 0 and 1 based rather than\ncounter\") tried to oom lock the hierarchy and roll back upon\nencountering an already locked memcg.\n\nThe code is confused when it comes to detecting a locked memcg, though,\nso it would fail and rollback after locking one memcg and encountering\nan unlocked second one.\n\nThe result is that oom-locking hierarchies fails unconditionally and\nthat every oom killer invocation simply goes to sleep on the oom\nwaitqueue forever.  The tasks practically hang forever without anyone\nintervening, possibly holding locks that trip up unrelated tasks, too.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\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": "5af12d0efdbd9967cc71a0a10c4025c4255a6254",
      "tree": "e5e036671dc7ae02bebaf201126d6c19104e02d1",
      "parents": [
        "a801876638c5ce650223476c4eb8f37cea32dc1c"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "jweiner@redhat.com",
        "time": "Thu Aug 25 15:59:07 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Aug 25 16:25:33 2011 -0700"
      },
      "message": "memcg: pin execution to current cpu while draining stock\n\nCommit d1a05b6973c7 (\"memcg do not try to drain per-cpu caches without\npages\") added a drain_local_stock() call to a preemptible section.\n\nThe draining task looks up the cpu-local stock twice to set the\ndraining-flag, then to drain the stock and clear the flag again.  If the\ntask is migrated to a different CPU in between, noone will clear the\nflag on the first stock and it will be forever undrainable.  Its charge\ncan not be recovered and the cgroup can not be deleted anymore.\n\nProperly pin the task to the executing CPU while draining stocks.\n\nSigned-off-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\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": "9f50fad65b87a8776ae989ca059ad6c17925dfc3",
      "tree": "9d15fc968323357da6b3a534c4c40ff3192cf2f9",
      "parents": [
        "47e180d6523081605c970f806572beab8a205537"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Aug 09 11:56:26 2011 +0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Aug 09 17:04:43 2011 -0700"
      },
      "message": "Revert \"memcg: get rid of percpu_charge_mutex lock\"\n\nThis reverts commit 8521fc50d433507a7cdc96bec280f9e5888a54cc.\n\nThe patch incorrectly assumes that using atomic FLUSHING_CACHED_CHARGE\nbit operations is sufficient but that is not true.  Johannes Weiner has\nreported a crash during parallel memory cgroup removal:\n\n  BUG: unable to handle kernel NULL pointer dereference at 0000000000000018\n  IP: [\u003cffffffff81083b70\u003e] css_is_ancestor+0x20/0x70\n  Oops: 0000 [#1] PREEMPT SMP\n  Pid: 19677, comm: rmdir Tainted: G        W   3.0.0-mm1-00188-gf38d32b #35 ECS MCP61M-M3/MCP61M-M3\n  RIP: 0010:[\u003cffffffff81083b70\u003e]  css_is_ancestor+0x20/0x70\n  RSP: 0018:ffff880077b09c88  EFLAGS: 00010202\n  Process rmdir (pid: 19677, threadinfo ffff880077b08000, task ffff8800781bb310)\n  Call Trace:\n   [\u003cffffffff810feba3\u003e] mem_cgroup_same_or_subtree+0x33/0x40\n   [\u003cffffffff810feccf\u003e] drain_all_stock+0x11f/0x170\n   [\u003cffffffff81103211\u003e] mem_cgroup_force_empty+0x231/0x6d0\n   [\u003cffffffff811036c4\u003e] mem_cgroup_pre_destroy+0x14/0x20\n   [\u003cffffffff81080559\u003e] cgroup_rmdir+0xb9/0x500\n   [\u003cffffffff81114d26\u003e] vfs_rmdir+0x86/0xe0\n   [\u003cffffffff81114e7b\u003e] do_rmdir+0xfb/0x110\n   [\u003cffffffff81114ea6\u003e] sys_rmdir+0x16/0x20\n   [\u003cffffffff8154d76b\u003e] system_call_fastpath+0x16/0x1b\n\nWe are crashing because we try to dereference cached memcg when we are\nchecking whether we should wait for draining on the cache.  The cache is\nalready cleaned up, though.\n\nThere is also a theoretical chance that the cached memcg gets freed\nbetween we test for the FLUSHING_CACHED_CHARGE and dereference it in\nmem_cgroup_same_or_subtree:\n\n        CPU0                    CPU1                         CPU2\n  mem\u003dstock-\u003ecached\n  stock-\u003ecached\u003dNULL\n                              clear_bit\n                                                        test_and_set_bit\n  test_bit()                    ...\n  \u003cpreempted\u003e             mem_cgroup_destroy\n  use after free\n\nThe percpu_charge_mutex protected from this race because sync draining\nis exclusive.\n\nIt is safer to revert now and come up with a more parallel\nimplementation later.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReported-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: stable@kernel.org\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": "8521fc50d433507a7cdc96bec280f9e5888a54cc",
      "tree": "b89d7b2eb34ba80b52e1f89ca767a86847df59b8",
      "parents": [
        "3e92041d68b40c47faa34c7dc08fc650a6c36adc"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Jul 26 16:08:29 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:43 2011 -0700"
      },
      "message": "memcg: get rid of percpu_charge_mutex lock\n\npercpu_charge_mutex protects from multiple simultaneous per-cpu charge\ncaches draining because we might end up having too many work items.  At\nleast this was the case until commit 26fe61684449 (\"memcg: fix percpu\ncached charge draining frequency\") when we introduced a more targeted\ndraining for async mode.\n\nNow that also sync draining is targeted we can safely remove mutex\nbecause we will not send more work than the current number of CPUs.\nFLUSHING_CACHED_CHARGE protects from sending the same work multiple\ntimes and stock-\u003enr_pages \u003d\u003d 0 protects from pointless sending a work if\nthere is obviously nothing to be done.  This is of course racy but we\ncan live with it as the race window is really small (we would have to\nsee FLUSHING_CACHED_CHARGE cleared while nr_pages would be still\nnon-zero).\n\nThe only remaining place where we can race is synchronous mode when we\nrely on FLUSHING_CACHED_CHARGE test which might have been set by other\ndrainer on the same group but we should wait in that case as well.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3e92041d68b40c47faa34c7dc08fc650a6c36adc",
      "tree": "29eab5bcd1bbf333cb25ed140a245645f9d7e0c4",
      "parents": [
        "d38144b7a5f8d0a5e05d549177191374c6911009"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Jul 26 16:08:29 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:43 2011 -0700"
      },
      "message": "memcg: add mem_cgroup_same_or_subtree() helper\n\nWe are checking whether a given two groups are same or at least in the\nsame subtree of a hierarchy at several places.  Let\u0027s make a helper for\nit to make code easier to read.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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": "d38144b7a5f8d0a5e05d549177191374c6911009",
      "tree": "ca0737291d22791c66aad10ad1218afc3dac51fd",
      "parents": [
        "d1a05b6973c7cb33144fa965d73facc708ffc37d"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Jul 26 16:08:28 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: unify sync and async per-cpu charge cache draining\n\nCurrently we have two ways how to drain per-CPU caches for charges.\ndrain_all_stock_sync will synchronously drain all caches while\ndrain_all_stock_async will asynchronously drain only those that refer to\na given memory cgroup or its subtree in hierarchy.  Targeted async\ndraining has been introduced by 26fe6168 (memcg: fix percpu cached\ncharge draining frequency) to reduce the cpu workers number.\n\nsync draining is currently triggered only from mem_cgroup_force_empty\nwhich is triggered only by userspace (mem_cgroup_force_empty_write) or\nwhen a cgroup is removed (mem_cgroup_pre_destroy).  Although these are\nnot usually frequent operations it still makes some sense to do targeted\ndraining as well, especially if the box has many CPUs.\n\nThis patch unifies both methods to use the single code (drain_all_stock)\nwhich relies on the original async implementation and just adds\nflush_work to wait on all caches that are still under work for the sync\nmode.  We are using FLUSHING_CACHED_CHARGE bit check to prevent from\nwaiting on a work that we haven\u0027t triggered.  Please note that both sync\nand async functions are currently protected by percpu_charge_mutex so we\ncannot race with other drainers.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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": "d1a05b6973c7cb33144fa965d73facc708ffc37d",
      "tree": "463a8bfedd56b4972f273c816fa62a55d7bc4754",
      "parents": [
        "82f9d486e59f588c7d100865c36510644abda356"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Jul 26 16:08:27 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: do not try to drain per-cpu caches without pages\n\ndrain_all_stock_async tries to optimize a work to be done on the work\nqueue by excluding any work for the current CPU because it assumes that\nthe context we are called from already tried to charge from that cache\nand it\u0027s failed so it must be empty already.\n\nWhile the assumption is correct we can optimize it even more by checking\nthe current number of pages in the cache.  This will also reduce a work\non other CPUs with an empty stock.\n\nFor the current CPU we can simply call drain_local_stock rather than\ndeferring it to the work queue.\n\n[kamezawa.hiroyu@jp.fujitsu.com: use drain_local_stock for current CPU optimization]\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\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": "108b6a78463bb8c7163e4f9779f36ad8bbade334",
      "tree": "f23a3d4835cf61ba73b918169355bafbf20e3966",
      "parents": [
        "4508378b9523e22a2a0175d8bf64d932fb10a67d"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Tue Jul 26 16:08:25 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: fix behavior of mem_cgroup_resize_limit()\n\nCommit 22a668d7c3ef (\"memcg: fix behavior under memory.limit equals to\nmemsw.limit\") introduced \"memsw_is_minimum\" flag, which becomes true\nwhen mem_limit \u003d\u003d memsw_limit.  The flag is checked at the beginning of\nreclaim, and \"noswap\" is set if the flag is true, because using swap is\nmeaningless in this case.\n\nThis works well in most cases, but when we try to shrink mem_limit,\nwhich is the same as memsw_limit now, we might fail to shrink mem_limit\nbecause swap doesn\u0027t used.\n\nThis patch fixes this behavior by:\n - check MEM_CGROUP_RECLAIM_SHRINK at the begining of reclaim\n - If it is set, don\u0027t set \"noswap\" flag even if memsw_is_minimum is true.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1af8efe965676ab30d6c8a5b1fccc9229f339a3b",
      "tree": "832cfd92cae498d9af1687bccc77344143df97a1",
      "parents": [
        "79dfdaccd1d5b40ff7cf4a35a0e63696ebb78b4d"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Jul 26 16:08:24 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: change memcg_oom_mutex to spinlock\n\nmemcg_oom_mutex is used to protect memcg OOM path and eventfd interface\nfor oom_control.  None of the critical sections which it protects sleep\n(eventfd_signal works from atomic context and the rest are simple linked\nlist resp.  oom_lock atomic operations).\n\nMutex is also too heavyweight for those code paths because it triggers a\nlot of scheduling.  It also makes makes convoying effects more visible\nwhen we have a big number of oom killing because we take the lock\nmutliple times during mem_cgroup_handle_oom so we have multiple places\nwhere many processes can sleep.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Balbir Singh \u003cbsingharora@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "79dfdaccd1d5b40ff7cf4a35a0e63696ebb78b4d",
      "tree": "27eeb38c9ca690a19f05e06a2a46f094b20bfd52",
      "parents": [
        "bb2a0de92c891b8feeedc0178acb3ae009d899a8"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Tue Jul 26 16:08:23 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: make oom_lock 0 and 1 based rather than counter\n\nCommit 867578cb (\"memcg: fix oom kill behavior\") introduced a oom_lock\ncounter which is incremented by mem_cgroup_oom_lock when we are about to\nhandle memcg OOM situation.  mem_cgroup_handle_oom falls back to a sleep\nif oom_lock \u003e 1 to prevent from multiple oom kills at the same time.\nThe counter is then decremented by mem_cgroup_oom_unlock called from the\nsame function.\n\nThis works correctly but it can lead to serious starvations when we have\nmany processes triggering OOM and many CPUs available for them (I have\ntested with 16 CPUs).\n\nConsider a process (call it A) which gets the oom_lock (the first one\nthat got to mem_cgroup_handle_oom and grabbed memcg_oom_mutex) and other\nprocesses that are blocked on the mutex.  While A releases the mutex and\ncalls mem_cgroup_out_of_memory others will wake up (one after another)\nand increase the counter and fall into sleep (memcg_oom_waitq).\n\nOnce A finishes mem_cgroup_out_of_memory it takes the mutex again and\ndecreases oom_lock and wakes other tasks (if releasing memory by\nsomebody else - e.g.  killed process - hasn\u0027t done it yet).\n\nA testcase would look like:\n  Assume malloc XXX is a program allocating XXX Megabytes of memory\n  which touches all allocated pages in a tight loop\n  # swapoff SWAP_DEVICE\n  # cgcreate -g memory:A\n  # cgset -r memory.oom_control\u003d0   A\n  # cgset -r memory.limit_in_bytes\u003d 200M\n  # for i in `seq 100`\n  # do\n  #     cgexec -g memory:A   malloc 10 \u0026\n  # done\n\nThe main problem here is that all processes still race for the mutex and\nthere is no guarantee that we will get counter back to 0 for those that\ngot back to mem_cgroup_handle_oom.  In the end the whole convoy\nin/decreases the counter but we do not get to 1 that would enable\nkilling so nothing useful can be done.  The time is basically unbounded\nbecause it highly depends on scheduling and ordering on mutex (I have\nseen this taking hours...).\n\nThis patch replaces the counter by a simple {un}lock semantic.  As\nmem_cgroup_oom_{un}lock works on the a subtree of a hierarchy we have to\nmake sure that nobody else races with us which is guaranteed by the\nmemcg_oom_mutex.\n\nWe have to be careful while locking subtrees because we can encounter a\nsubtree which is already locked: hierarchy:\n\n          A\n        /   \\\n       B     \\\n      /\\      \\\n     C  D     E\n\nB - C - D tree might be already locked.  While we want to enable locking\nE subtree because OOM situations cannot influence each other we\ndefinitely do not want to allow locking A.\n\nTherefore we have to refuse lock if any subtree is already locked and\nclear up the lock for all nodes that have been set up to the failure\npoint.\n\nOn the other hand we have to make sure that the rest of the world will\nrecognize that a group is under OOM even though it doesn\u0027t have a lock.\nTherefore we have to introduce under_oom variable which is incremented\nand decremented for the whole subtree when we enter resp.  leave\nmem_cgroup_handle_oom.  under_oom, unlike oom_lock, doesn\u0027t need be\nupdated under memcg_oom_mutex because its users only check a single\ngroup and they use atomic operations for that.\n\nThis can be checked easily by the following test case:\n\n  # cgcreate -g memory:A\n  # cgset -r memory.use_hierarchy\u003d1 A\n  # cgset -r memory.oom_control\u003d1   A\n  # cgset -r memory.limit_in_bytes\u003d 100M\n  # cgset -r memory.memsw.limit_in_bytes\u003d 100M\n  # cgcreate -g memory:A/B\n  # cgset -r memory.oom_control\u003d1 A/B\n  # cgset -r memory.limit_in_bytes\u003d20M\n  # cgset -r memory.memsw.limit_in_bytes\u003d20M\n  # cgexec -g memory:A/B malloc 30  \u0026    #-\u003ethis will be blocked by OOM of group B\n  # cgexec -g memory:A   malloc 80  \u0026    #-\u003ethis will be blocked by OOM of group A\n\nWhile B gets oom_lock A will not get it.  Both of them go into sleep and\nwait for an external action.  We can make the limit higher for A to\nenforce waking it up\n\n  # cgset -r memory.memsw.limit_in_bytes\u003d300M A\n  # cgset -r memory.limit_in_bytes\u003d300M A\n\nmalloc in A has to wake up even though it doesn\u0027t have oom_lock.\n\nFinally, the unlock path is very easy because we always unlock only the\nsubtree we have locked previously while we always decrement under_oom.\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.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": "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": "1f4c025b5a5520fd2571244196b1b01ad96d18f6",
      "tree": "f2123a44c9e838eac7d08fe13443cfa04cc23f33",
      "parents": [
        "b830ac1d9a2262093bb0f3f6a2fd2a1c8278daf5"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Jul 26 16:08:21 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 26 16:49:42 2011 -0700"
      },
      "message": "memcg: export memory cgroup\u0027s swappiness with mem_cgroup_swappiness()\n\nEach memory cgroup has a \u0027swappiness\u0027 value which can be accessed by\nget_swappiness(memcg).  The major user is try_to_free_mem_cgroup_pages()\nand swappiness is passed by argument.  It\u0027s propagated by scan_control.\n\nget_swappiness() is a static function but some planned updates will need\nto get swappiness from files other than memcontrol.c This patch exports\nget_swappiness() as mem_cgroup_swappiness().  With this, we can remove the\nargument of swapiness from try_to_free...  and drop swappiness from\nscan_control.  only memcg uses it.\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 \u003cbsingharora@gmail.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.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": "453a9bf347f1e22a5bb3605ced43b2366921221d",
      "tree": "dfe355892b8ace86f74f6b8a34ad86da159f697d",
      "parents": [
        "4d0c066d29f030d47d19678f8008933e67dd3b72"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Fri Jul 08 15:39:43 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jul 08 21:14:44 2011 -0700"
      },
      "message": "memcg: fix numa scan information update to be triggered by memory event\n\ncommit 889976dbcb12 (\"memcg: reclaim memory from nodes in round-robin\norder\") adds an numa node round-robin for memcg.  But the information is\nupdated once per 10sec.\n\nThis patch changes the update trigger from jiffies to memcg\u0027s event count.\n After this patch, numa scan information will be updated when we see 1024\nevents of pagein/pageout under a memcg.\n\n[akpm@linux-foundation.org: attempt to repair code layout]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\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": "4d0c066d29f030d47d19678f8008933e67dd3b72",
      "tree": "96f46e845b7a937b2e41b735061f696d2cb03293",
      "parents": [
        "0b43c3aab0137595335b08b340a3f3e5af9818a6"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Fri Jul 08 15:39:42 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jul 08 21:14:43 2011 -0700"
      },
      "message": "memcg: fix reclaimable lru check in memcg\n\nNow, in mem_cgroup_hierarchical_reclaim(), mem_cgroup_local_usage() is\nused for checking whether the memcg contains reclaimable pages or not.  If\nno pages in it, the routine skips it.\n\nBut, mem_cgroup_local_usage() contains Unevictable pages and cannot handle\n\"noswap\" condition correctly.  This doesn\u0027t work on a swapless system.\n\nThis patch adds test_mem_cgroup_reclaimable() and replaces\nmem_cgroup_local_usage().  test_mem_cgroup_reclaimable() see LRU counter\nand returns correct answer to the caller.  And this new function has\n\"noswap\" argument and can see only FILE LRU if necessary.\n\n[akpm@linux-foundation.org: coding-style fixes]\n[akpm@linux-foundation.org: fix kerneldoc layout]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\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": "072441e21ddcd1140606b7d4ef6eab579a86b0b3",
      "tree": "6f059ad83c09dfbeb1def29e805839db3e5bf85f",
      "parents": [
        "5b8ba10198a109f8a02380648c5d29000caa9c55"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Jun 27 16:18:02 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jun 27 18:00:12 2011 -0700"
      },
      "message": "mm: move shmem prototypes to shmem_fs.h\n\nBefore adding any more global entry points into shmem.c, gather such\nprototypes into shmem_fs.h.  Remove mm\u0027s own declarations from swap.h,\nbut for now leave the ones in mm.h: because shmem_file_setup() and\nshmem_zero_setup() are called from various places, and we should not\nforce other subsystems to update immediately.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.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": "fbc29a25e484be073e7d762c9f7f1d4bf8aecc48",
      "tree": "276a9e1e0c3d8f653dd821c049ec4b6940a06c1d",
      "parents": [
        "26fe616844491a41a1abc02e29f7a9d1ec2f8ddb"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jun 15 15:08:46 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:01 2011 -0700"
      },
      "message": "memcg: avoid percpu cached charge draining at softlimit\n\nBased on Michal Hocko\u0027s comment.\n\nWe are not draining per cpu cached charges during soft limit reclaim\nbecause background reclaim doesn\u0027t care about charges.  It tries to free\nsome memory and charges will not give any.\n\nCached charges might influence only selection of the biggest soft limit\noffender but as the call is done only after the selection has been already\ndone it makes no change.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-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": "26fe616844491a41a1abc02e29f7a9d1ec2f8ddb",
      "tree": "cd8747ad8e96d6ebda771db41b96db11a4b09f26",
      "parents": [
        "7ae534d074e01e54d5cfbc9734b73fdfc855501f"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jun 15 15:08:45 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:01 2011 -0700"
      },
      "message": "memcg: fix percpu cached charge draining frequency\n\nFor performance, memory cgroup caches some \"charge\" from res_counter into\nper cpu cache.  This works well but because it\u0027s cache, it needs to be\nflushed in some cases.  Typical cases are\n\n   1. when someone hit limit.\n\n   2. when rmdir() is called and need to charges to be 0.\n\nBut \"1\" has problem.\n\nRecently, with large SMP machines, we see many kworker runs because of\nflushing memcg\u0027s cache.  Bad things in implementation are that even if a\ncpu contains a cache for memcg not related to a memcg which hits limit,\ndrain code is called.\n\nThis patch does\n        A) check percpu cache contains a useful data or not.\n        B) check other asynchronous percpu draining doesn\u0027t run.\n        C) don\u0027t call local cpu callback.\n\n(*)This patch avoid changing the calling condition with hard-limit.\n\nWhen I run \"cat 1Gfile \u003e /dev/null\" under 300M limit memcg,\n\n[Before]\n13767 kamezawa  20   0 98.6m  424  416 D 10.0  0.0   0:00.61 cat\n   58 root      20   0     0    0    0 S  0.6  0.0   0:00.09 kworker/2:1\n   60 root      20   0     0    0    0 S  0.6  0.0   0:00.08 kworker/4:1\n    4 root      20   0     0    0    0 S  0.3  0.0   0:00.02 kworker/0:0\n   57 root      20   0     0    0    0 S  0.3  0.0   0:00.05 kworker/1:1\n   61 root      20   0     0    0    0 S  0.3  0.0   0:00.05 kworker/5:1\n   62 root      20   0     0    0    0 S  0.3  0.0   0:00.05 kworker/6:1\n   63 root      20   0     0    0    0 S  0.3  0.0   0:00.05 kworker/7:1\n\n[After]\n 2676 root      20   0 98.6m  416  416 D  9.3  0.0   0:00.87 cat\n 2626 kamezawa  20   0 15192 1312  920 R  0.3  0.0   0:00.28 top\n    1 root      20   0 19384 1496 1204 S  0.0  0.0   0:00.66 init\n    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd\n    3 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0\n    4 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kworker/0:0\n\n[akpm@linux-foundation.org: make percpu_charge_mutex static, tweak comments]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nTested-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": "7ae534d074e01e54d5cfbc9734b73fdfc855501f",
      "tree": "8c815762779fd79cc83db788aa29e6239212c3f4",
      "parents": [
        "733eda7ac316cd4e550fa096e4ed42356dc546e7"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jun 15 15:08:44 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:01 2011 -0700"
      },
      "message": "memcg: fix wrong check of noswap with softlimit\n\nHierarchical reclaim doesn\u0027t swap out if memsw and resource limits are\nthye same (memsw_is_minimum \u003d\u003d true) because we would hit mem+swap limit\nanyway (during hard limit reclaim).\n\nIf it comes to the soft limit we shouldn\u0027t consider memsw_is_minimum at\nall because it doesn\u0027t make much sense.  Either the soft limit is bellow\nthe hard limit and then we cannot hit mem+swap limit or the direct reclaim\ntakes a precedence.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\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": "8957712710e045044e3c44375c6a87d7ffa17d51",
      "tree": "94d801709cb1a57d12695ba9b2f8da42996e178e",
      "parents": [
        "45d16f09ddd66597e561876f5652c05bf986360a"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jun 15 15:08:41 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:01 2011 -0700"
      },
      "message": "mm: memory.numa_stat: fix file permission\n\nCommit 406eb0c9ba76 (\"memcg: add memory.numastat api for numa\nstatistics\") adds memory.numa_stat file for memory cgroup.  But the file\npermissions are wrong.\n\n  [kamezawa@bluextal linux-2.6]$ ls -l /cgroup/memory/A/memory.numa_stat\n  ---------- 1 root root 0 Jun  9 18:36 /cgroup/memory/A/memory.numa_stat\n\nThis patch fixes the permission as\n\n  [root@bluextal kamezawa]# ls -l /cgroup/memory/A/memory.numa_stat\n  -r--r--r-- 1 root root 0 Jun 10 16:49 /cgroup/memory/A/memory.numa_stat\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-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": "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"
    }
  ],
  "next": "406eb0c9ba765eb066406fd5ce9d5e2b169a4d5a"
}
