)]}'
{
  "log": [
    {
      "commit": "ef8745c1e7fc5413d760b3b958f3fd3a0beaad72",
      "tree": "a1f1998dbcf06e84fe3539192e440e9d1bb876f2",
      "parents": [
        "4e649152cbaa1aedd01821d200ab9d597fe469e4"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Oct 01 15:44:12 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Oct 01 16:11:13 2009 -0700"
      },
      "message": "memcg: reduce check for softlimit excess\n\nIn charge/uncharge/reclaim path, usage_in_excess is calculated repeatedly\nand it takes res_counter\u0027s spin_lock every time.\n\nThis patch removes unnecessary calls for res_count_soft_limit_excess.\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4e649152cbaa1aedd01821d200ab9d597fe469e4",
      "tree": "635fa7d75acda929e81b8b0db7e641b7d4e07b35",
      "parents": [
        "3dece8347df6a16239fab10dadb370854f1c969c"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Oct 01 15:44:11 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Oct 01 16:11:13 2009 -0700"
      },
      "message": "memcg: some modification to softlimit under hierarchical memory reclaim.\n\nThis patch clean up/fixes for memcg\u0027s uncharge soft limit path.\n\nProblems:\n  Now, res_counter_charge()/uncharge() handles softlimit information at\n  charge/uncharge and softlimit-check is done when event counter per memcg\n  goes over limit. Now, event counter per memcg is updated only when\n  memory usage is over soft limit. Here, considering hierarchical memcg\n  management, ancesotors should be taken care of.\n\n  Now, ancerstors(hierarchy) are handled in charge() but not in uncharge().\n  This is not good.\n\n  Prolems:\n  1. memcg\u0027s event counter incremented only when softlimit hits. That\u0027s bad.\n     It makes event counter hard to be reused for other purpose.\n\n  2. At uncharge, only the lowest level rescounter is handled. This is bug.\n     Because ancesotor\u0027s event counter is not incremented, children should\n     take care of them.\n\n  3. res_counter_uncharge()\u0027s 3rd argument is NULL in most case.\n     ops under res_counter-\u003elock should be small. No \"if\" sentense is better.\n\nFixes:\n  * Removed soft_limit_xx poitner and checks in charge and uncharge.\n    Do-check-only-when-necessary scheme works enough well without them.\n\n  * make event-counter of memcg incremented at every charge/uncharge.\n    (per-cpu area will be accessed soon anyway)\n\n  * All ancestors are checked at soft-limit-check. This is necessary because\n    ancesotor\u0027s event counter may never be modified. Then, they should be\n    checked at the same time.\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "26251eaf98e26dc2ce2dc26d63bc502700760704",
      "tree": "f783cab10c5244c170e7d1a92b6a80c574cdf114",
      "parents": [
        "447e4460a4ef44a275f81d992d227f34673be2a8"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Oct 01 15:44:08 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Oct 01 16:11:12 2009 -0700"
      },
      "message": "memcg: fix refcnt going negative\n\n__mem_cgroup_largest_soft_limit_node() returns a mem_cgroup_per_zone \"mz\"\nwith incremnted mz-\u003emem-\u003ecss\u0027s refcnt.  Then, the caller of this function\nhas to call css_put(mz-\u003emem-\u003ecss).\n\nBut, mz can be !NULL even if \"not found\" i.e.  without css_get().  By\nthis, css-\u003erefcnt will go down to minus.\n\nThis may cause various things...one of results will be\ninitite-loop in css_tryget()  as this.\n\nINFO: RCU detected CPU 0 stall (t\u003d10000 jiffies)\nsending NMI to all CPUs:\nNMI backtrace for cpu 0\nCPU 0:\n\u003csnip\u003e\n\n \u003c\u003cEOE\u003e\u003e  \u003cIRQ\u003e  [\u003cffffffff810884bd\u003e] trace_hardirqs_off+0xd/0x10\n  [\u003cffffffff8102a940\u003e] flat_send_IPI_mask+0x90/0xb0\n  [\u003cffffffff8102a9c9\u003e] flat_send_IPI_all+0x69/0x70\n  [\u003cffffffff81027372\u003e] arch_trigger_all_cpu_backtrace+0x62/0xa0\n  [\u003cffffffff810bff8e\u003e] __rcu_pending+0x7e/0x370\n  [\u003cffffffff810c02c7\u003e] rcu_check_callbacks+0x47/0x130\n  [\u003cffffffff81063a26\u003e] update_process_times+0x46/0x70\n  [\u003cffffffff81085930\u003e] tick_sched_timer+0x60/0x160\n  [\u003cffffffff810858d0\u003e] ? tick_sched_timer+0x0/0x160\n  [\u003cffffffff8107a03a\u003e] __run_hrtimer+0xba/0x150\n  [\u003cffffffff8107a325\u003e] hrtimer_interrupt+0xd5/0x1b0\n  [\u003cffffffff81426dfe\u003e] ? trace_hardirqs_off_thunk+0x3a/0x3c\n  [\u003cffffffff8142cacd\u003e] smp_apic_timer_interrupt+0x6d/0x9b\n  [\u003cffffffff8100cb33\u003e] apic_timer_interrupt+0x13/0x20\n  \u003cEOI\u003e  [\u003cffffffff811317b6\u003e] ? mem_cgroup_walk_tree+0x156/0x180\n  [\u003cffffffff811316d3\u003e] ? mem_cgroup_walk_tree+0x73/0x180\n  [\u003cffffffff81131692\u003e] ? mem_cgroup_walk_tree+0x32/0x180\n  [\u003cffffffff81131a00\u003e] ? mem_cgroup_get_local_stat+0x0/0x110\n  [\u003cffffffff81131d5b\u003e] ? mem_control_stat_show+0x14b/0x330\n  [\u003cffffffff810a57fd\u003e] ? cgroup_seqfile_show+0x3d/0x60\n\nAbove shows CPU0 caught in css_tryget()\u0027s inifinite loop because\nof bad refcnt.\n\nThis is a fix to set mz\u003dNULL at the top of retry path.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1dd3a27326d307952f8ad2499478c84dc7311517",
      "tree": "ae59d52935c790dd3fd0c8e12af5855cfe1abfcb",
      "parents": [
        "0c3e73e84fe3f64cf1c2e8bb4e91e8901cbcdc38"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Sep 23 15:56:43 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "memcg: show swap usage in stat file\n\nWe now count MEM_CGROUP_STAT_SWAPOUT, so we can show swap usage.  It would\nbe useful for users to show swap usage in memory.stat file, because they\ndon\u0027t need calculate memsw.usage - res.usage to know swap usage.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0c3e73e84fe3f64cf1c2e8bb4e91e8901cbcdc38",
      "tree": "1c3e27fce3babd3703b34c9a353f253fcefb6325",
      "parents": [
        "4e41695356fb4e0b153be1440ad027e46e0a7ea2"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Sep 23 15:56:42 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "memcg: improve resource counter scalability\n\nReduce the resource counter overhead (mostly spinlock) associated with the\nroot cgroup.  This is a part of the several patches to reduce mem cgroup\noverhead.  I had posted other approaches earlier (including using percpu\ncounters).  Those patches will be a natural addition and will be added\niteratively on top of these.\n\nThe patch stops resource counter accounting for the root cgroup.  The data\nfor display is derived from the statisitcs we maintain via\nmem_cgroup_charge_statistics (which is more scalable).  What happens today\nis that, we do double accounting, once using res_counter_charge() and once\nusing memory_cgroup_charge_statistics().  For the root, since we don\u0027t\nimplement limits any more, we don\u0027t need to track every charge via\nres_counter_charge() and check for limit being exceeded and reclaim.\n\nThe main mem-\u003eres usage_in_bytes can be derived by summing the cache and\nrss usage data from memory statistics (MEM_CGROUP_STAT_RSS and\nMEM_CGROUP_STAT_CACHE).  However, for memsw-\u003eres usage_in_bytes, we need\nadditional data about swapped out memory.  This patch adds a\nMEM_CGROUP_STAT_SWAPOUT and uses that along with MEM_CGROUP_STAT_RSS and\nMEM_CGROUP_STAT_CACHE to derive the memsw data.  This data is computed\nrecursively when hierarchy is enabled.\n\nThe tests results I see on a 24 way show that\n\n1. The lock contention disappears from /proc/lock_stats\n2. The results of the test are comparable to running with\n   cgroup_disable\u003dmemory.\n\nHere is a sample of my program runs\n\nWithout Patch\n\n Performance counter stats for \u0027/home/balbir/parallel_pagefault\u0027:\n\n 7192804.124144  task-clock-msecs         #     23.937 CPUs\n         424691  context-switches         #      0.000 M/sec\n            267  CPU-migrations           #      0.000 M/sec\n       28498113  page-faults              #      0.004 M/sec\n  5826093739340  cycles                   #    809.989 M/sec\n   408883496292  instructions             #      0.070 IPC\n     7057079452  cache-references         #      0.981 M/sec\n     3036086243  cache-misses             #      0.422 M/sec\n\n  300.485365680  seconds time elapsed\n\nWith cgroup_disable\u003dmemory\n\n Performance counter stats for \u0027/home/balbir/parallel_pagefault\u0027:\n\n 7182183.546587  task-clock-msecs         #     23.915 CPUs\n         425458  context-switches         #      0.000 M/sec\n            203  CPU-migrations           #      0.000 M/sec\n       92545093  page-faults              #      0.013 M/sec\n  6034363609986  cycles                   #    840.185 M/sec\n   437204346785  instructions             #      0.072 IPC\n     6636073192  cache-references         #      0.924 M/sec\n     2358117732  cache-misses             #      0.328 M/sec\n\n  300.320905827  seconds time elapsed\n\nWith this patch applied\n\n Performance counter stats for \u0027/home/balbir/parallel_pagefault\u0027:\n\n 7191619.223977  task-clock-msecs         #     23.955 CPUs\n         422579  context-switches         #      0.000 M/sec\n             88  CPU-migrations           #      0.000 M/sec\n       91946060  page-faults              #      0.013 M/sec\n  5957054385619  cycles                   #    828.333 M/sec\n  1058117350365  instructions             #      0.178 IPC\n     9161776218  cache-references         #      1.274 M/sec\n     1920494280  cache-misses             #      0.267 M/sec\n\n  300.218764862  seconds time elapsed\n\nData from Prarit (kernel compile with make -j64 on a 64\nCPU/32G machine)\n\nFor a single run\n\nWithout patch\n\nreal 27m8.988s\nuser 87m24.916s\nsys 382m6.037s\n\nWith patch\n\nreal    4m18.607s\nuser    84m58.943s\nsys     50m52.682s\n\nWith config turned off\n\nreal    4m54.972s\nuser    90m13.456s\nsys     50m19.711s\n\nNOTE: The data looks counterintuitive due to the increased performance\nwith the patch, even over the config being turned off. We probably need\nmore runs, but so far all testing has shown that the patches definitely\nhelp.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Prarit Bhargava \u003cprarit@redhat.com\u003e\nCc: Andi Kleen \u003candi@firstfloor.org\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4e41695356fb4e0b153be1440ad027e46e0a7ea2",
      "tree": "547dae77d1655a1acb260ea8b266c7b8a48f2d2c",
      "parents": [
        "75822b4495b62e8721e9b88e3cf9e653a0c85b73"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Sep 23 15:56:39 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "memory controller: soft limit reclaim on contention\n\nImplement reclaim from groups over their soft limit\n\nPermit reclaim from memory cgroups on contention (via the direct reclaim\npath).\n\nmemory cgroup soft limit reclaim finds the group that exceeds its soft\nlimit by the largest number of pages and reclaims pages from it and then\nreinserts the cgroup into its correct place in the rbtree.\n\nAdd additional checks to mem_cgroup_hierarchical_reclaim() to detect long\nloops in case all swap is turned off.  The code has been refactored and\nthe loop check (loop \u003c 2) has been enhanced for soft limits.  For soft\nlimits, we try to do more targetted reclaim.  Instead of bailing out after\ntwo loops, the routine now reclaims memory proportional to the size by\nwhich the soft limit is exceeded.  The proportion has been empirically\ndetermined.\n\n[akpm@linux-foundation.org: build fix]\n[kamezawa.hiroyu@jp.fujitsu.com: fix softlimit css refcnt handling]\n[nishimura@mxp.nes.nec.co.jp: refcount of the \"victim\" should be decremented before exiting the loop]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "75822b4495b62e8721e9b88e3cf9e653a0c85b73",
      "tree": "b8d4c10f03a4e289f0a66b982243fd8980f9df07",
      "parents": [
        "f64c3f54940d6929a2b6dcffaab942bd62be2e66"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Sep 23 15:56:38 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "memory controller: soft limit refactor reclaim flags\n\nRefactor mem_cgroup_hierarchical_reclaim()\n\nRefactor the arguments passed to mem_cgroup_hierarchical_reclaim() into\nflags, so that new parameters don\u0027t have to be passed as we make the\nreclaim routine more flexible\n\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\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": "f64c3f54940d6929a2b6dcffaab942bd62be2e66",
      "tree": "7b3587700b08639970580be6c87f36df80ca8c74",
      "parents": [
        "296c81d89f4f14269f7346f81442910158c0a83a"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Sep 23 15:56:37 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "memory controller: soft limit organize cgroups\n\nOrganize cgroups over soft limit in a RB-Tree\n\nIntroduce an RB-Tree for storing memory cgroups that are over their soft\nlimit.  The overall goal is to\n\n1. Add a memory cgroup to the RB-Tree when the soft limit is exceeded.\n   We are careful about updates, updates take place only after a particular\n   time interval has passed\n2. We remove the node from the RB-Tree when the usage goes below the soft\n   limit\n\nThe next set of patches will exploit the RB-Tree to get the group that is\nover its soft limit by the largest amount and reclaim from it, when we\nface memory contention.\n\n[hugh.dickins@tiscali.co.uk: CONFIG_CGROUP_MEM_RES_CTLR\u003dy CONFIG_PREEMPT\u003dy fails to boot]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Jiri Slaby \u003cjirislaby@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": "296c81d89f4f14269f7346f81442910158c0a83a",
      "tree": "cf0e1facd1fed8282c1885bc4126e7bca1928712",
      "parents": [
        "a6df63615b943dbef22df04c19f4506330fe835e"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Sep 23 15:56:36 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:59 2009 -0700"
      },
      "message": "memory controller: soft limit interface\n\nAdd an interface to allow get/set of soft limits.  Soft limits for memory\nplus swap controller (memsw) is currently not supported.  Resource\ncounters have been enhanced to support soft limits and new type\nRES_SOFT_LIMIT has been added.  Unlike hard limits, soft limits can be\ndirectly set and do not need any reclaim or checks before setting them to\na newer value.\n\nKamezawa-San raised a question as to whether soft limit should belong to\nres_counter.  Since all resources understand the basic concepts of hard\nand soft limits, it is justified to add soft limits here.  Soft limits are\na generic resource usage feature, even file system quotas support soft\nlimits.\n\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\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": "261fb61a8bf6d3bd964ae6f1e6af49585d30db51",
      "tree": "417cebd2e18bc2457b5b09d8359ad71ba6afd56d",
      "parents": [
        "4b3bde4c983de36c59e6c1a24701f6fe816f9f55"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Sep 23 15:56:33 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:58 2009 -0700"
      },
      "message": "memcg: add comments explaining memory barriers\n\nAdd comments for the reason of smp_wmb() in mem_cgroup_commit_charge().\n\n[akpm@linux-foundation.org: coding-style fixes]\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4b3bde4c983de36c59e6c1a24701f6fe816f9f55",
      "tree": "e759c5ceccf57331b868b7feac61cae5e932c6d4",
      "parents": [
        "be367d09927023d081f9199665c8500f69f14d22"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Sep 23 15:56:32 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:58 2009 -0700"
      },
      "message": "memcg: remove the overhead associated with the root cgroup\n\nChange the memory cgroup to remove the overhead associated with accounting\nall pages in the root cgroup.  As a side-effect, we can no longer set a\nmemory hard limit in the root cgroup.\n\nA new flag to track whether the page has been accounted or not has been\nadded as well.  Flags are now set atomically for page_cgroup,\npcg_default_flags is now obsolete and removed.\n\n[akpm@linux-foundation.org: fix a few documentation glitches]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "be367d09927023d081f9199665c8500f69f14d22",
      "tree": "f0c5b9da037506da3c5890cf11b51b39a7d3c427",
      "parents": [
        "c378369d8b4fa516ff2b1e79c3eded4e0e955ebb"
      ],
      "author": {
        "name": "Ben Blum",
        "email": "bblum@google.com",
        "time": "Wed Sep 23 15:56:31 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 24 07:20:58 2009 -0700"
      },
      "message": "cgroups: let ss-\u003ecan_attach and ss-\u003eattach do whole threadgroups at a time\n\nAlter the ss-\u003ecan_attach and ss-\u003eattach functions to be able to deal with\na whole threadgroup at a time, for use in cgroup_attach_proc.  (This is a\npre-patch to cgroup-procs-writable.patch.)\n\nCurrently, new mode of the attach function can only tell the subsystem\nabout the old cgroup of the threadgroup leader.  No subsystem currently\nneeds that information for each thread that\u0027s being moved, but if one were\nto be added (for example, one that counts tasks within a group) this bit\nwould need to be reworked a bit to tell the subsystem the right\ninformation.\n\n[hidave.darkstar@gmail.com: fix build]\nSigned-off-by: Ben Blum \u003cbblum@google.com\u003e\nSigned-off-by: Paul Menage \u003cmenage@google.com\u003e\nAcked-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nReviewed-by: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Dave Young \u003chidave.darkstar@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": "b7c46d151cb82856a429709d1227ba1648028232",
      "tree": "b93012b4bb2ffd603c020b38d8f1f6f3b4714ff7",
      "parents": [
        "bba78819548a59a52e60f0b259997bbd011164ae"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Mon Sep 21 17:02:56 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:35 2009 -0700"
      },
      "message": "mm: drop unneeded double negations\n\nRemove double negations where the operand is already boolean.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "887032670d47366a8c8f25396ea7c14b7b2cc620",
      "tree": "e5f9ece5ab9239648e8d7051ccb9a217d92553d7",
      "parents": [
        "f0d83679a8d471dc8b646919f70595d6fe8c9606"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jul 29 15:04:06 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jul 29 19:10:35 2009 -0700"
      },
      "message": "cgroup avoid permanent sleep at rmdir\n\nAfter commit ec64f51545fffbc4cb968f0cea56341a4b07e85a (\"cgroup: fix\nfrequent -EBUSY at rmdir\"), cgroup\u0027s rmdir (especially against memcg)\ndoesn\u0027t return -EBUSY by temporary ref counts.  That commit expects all\nrefs after pre_destroy() is temporary but...it wasn\u0027t.  Then, rmdir can\nwait permanently.  This patch tries to fix that and change followings.\n\n - set CGRP_WAIT_ON_RMDIR flag before pre_destroy().\n - clear CGRP_WAIT_ON_RMDIR flag when the subsys finds racy case.\n   if there are sleeping ones, wakes them up.\n - rmdir() sleeps only when CGRP_WAIT_ON_RMDIR flag is set.\n\nTested-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReported-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: Paul Menage \u003cmenage@google.com\u003e\nAcked-by: Balbir Sigh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8aa7e847d834ed937a9ad37a0f2ad5b8584c1ab0",
      "tree": "76c8b4f1362a928d426f2201790ab5d128f57724",
      "parents": [
        "c2cc49a2f8a479dde96a599646d30b6cc9dbed78"
      ],
      "author": {
        "name": "Jens Axboe",
        "email": "jens.axboe@oracle.com",
        "time": "Thu Jul 09 14:52:32 2009 +0200"
      },
      "committer": {
        "name": "Jens Axboe",
        "email": "axboe@carl.(none)",
        "time": "Fri Jul 10 20:31:53 2009 +0200"
      },
      "message": "Fix congestion_wait() sync/async vs read/write confusion\n\nCommit 1faa16d22877f4839bd433547d770c676d1d964c accidentally broke\nthe bdi congestion wait queue logic, causing us to wait on congestion\nfor WRITE (\u003d\u003d 1) when we really wanted BLK_RW_ASYNC (\u003d\u003d 0) instead.\n\nSigned-off-by: Jens Axboe \u003cjens.axboe@oracle.com\u003e\n"
    },
    {
      "commit": "2ffebca6aa7e1687905c842dd8c5c1e811e574e7",
      "tree": "93ec4e18c54289e82dcc8e602c166d5ffee50ef8",
      "parents": [
        "c5b947b28828e82814605824e5db0bc58d66d8c0"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jun 17 16:27:21 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:48 2009 -0700"
      },
      "message": "memcg: fix lru rotation in isolate_pages\n\nTry to fix memcg\u0027s lru rotation sanity: make memcg use the same logic as\nthe global LRU does.\n\nNow, at __isolate_lru_page() retruns -EBUSY, the page is rotated to the\ntail of LRU in global LRU\u0027s isolate LRU pages.  But in memcg, it\u0027s not\nhandled.  This makes memcg do the same behavior as global LRU and rotate\nLRU in the page is busy.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "22a668d7c3ef833e7d67e9cef587ecc78069d532",
      "tree": "da9f2e7ea7224c347dfe33ea9d4dddd944c861ac",
      "parents": [
        "8a9478ca7f4bcb8945cec7f95d52dae2d5e50cbd"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jun 17 16:27:19 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:48 2009 -0700"
      },
      "message": "memcg: fix behavior under memory.limit equals to memsw.limit\n\nA user can set memcg.limit_in_bytes \u003d\u003d memcg.memsw.limit_in_bytes when the\nuser just want to limit the total size of applications, in other words,\nnot very interested in memory usage itself.  In this case, swap-out will\nbe done only by global-LRU.\n\nBut, under current implementation, memory.limit_in_bytes is checked at\nfirst and try_to_free_page() may do swap-out.  But, that swap-out is\nuseless for memsw.limit_in_bytes and the thread may hit limit again.\n\nThis patch tries to fix the current behavior at memory.limit \u003d\u003d\nmemsw.limit case.  And documentation is updated to explain the behavior of\nthis special case.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.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": "8a9478ca7f4bcb8945cec7f95d52dae2d5e50cbd",
      "tree": "935e6ee3340ebe999374b54967cc2fa14e8d0060",
      "parents": [
        "20ebcdda78a282d1d5266887ddf8a2d670182576"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jun 17 16:27:17 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:47 2009 -0700"
      },
      "message": "memcg: fix swap accounting\n\nThis patch fixes mis-accounting of swap usage in memcg.\n\nIn the current implementation, memcg\u0027s swap account is uncharged only when\nswap is completely freed.  But there are several cases where swap cannot\nbe freed cleanly.  For handling that, this patch changes that memcg\nuncharges swap account when swap has no references other than cache.\n\nBy this, memcg\u0027s swap entry accounting can be fully synchronous with the\napplication\u0027s behavior.\n\nThis patch also changes memcg\u0027s hooks for swap-out.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.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": "338c843108bf5030d6765f4405126e70f8b77845",
      "tree": "c3bdab2f288e4c5a843ea07e0f8938a821ab848a",
      "parents": [
        "302362c5abdda80b5c2e4e57be610c2e3c2ab3c5"
      ],
      "author": {
        "name": "Li Zefan",
        "email": "lizf@cn.fujitsu.com",
        "time": "Wed Jun 17 16:27:15 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:47 2009 -0700"
      },
      "message": "memcg: remove some redundant checks\n\nWe don\u0027t need to check do_swap_account in the case that the function which\nchecks do_swap_account will never get called if do_swap_account \u003d\u003d 0.\n\nSigned-off-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.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": "d69b042f3d7406ddba560143b1796020df760800",
      "tree": "6b704864716240aa1282d06bb79c02ef4b77e16d",
      "parents": [
        "cd5008196f7e583f4c558531a2bca59f6c674c5b"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Jun 17 16:26:34 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 18 13:03:47 2009 -0700"
      },
      "message": "memcg: add file-based RSS accounting\n\nAdd file RSS tracking per memory cgroup\n\nWe currently don\u0027t track file RSS, the RSS we report is actually anon RSS.\n All the file mapped pages, come in through the page cache and get\naccounted there.  This patch adds support for accounting file RSS pages.\nIt should\n\n1. Help improve the metrics reported by the memory resource controller\n2. Will form the basis for a future shared memory accounting heuristic\n   that has been proposed by Kamezawa.\n\nUnfortunately, we cannot rename the existing \"rss\" keyword used in\nmemory.stat to \"anon_rss\".  We however, add \"mapped_file\" data and hope to\neducate the end user through documentation.\n\n[hugh.dickins@tiscali.co.uk: fix mem_cgroup_update_mapped_file_stat oops]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.cn\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.co.jp\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "56e49d218890f49b0057710a4b6fef31f5ffbfec",
      "tree": "a0525dd9a140352276bdfb76a3d65230c3e5121d",
      "parents": [
        "35efa5e993a7a00a50b87d2b7725c3eafc80b083"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Tue Jun 16 15:32:28 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jun 16 19:47:38 2009 -0700"
      },
      "message": "vmscan: evict use-once pages first\n\nWhen the file LRU lists are dominated by streaming IO pages, evict those\npages first, before considering evicting other pages.\n\nThis should be safe from deadlocks or performance problems\nbecause only three things can happen to an inactive file page:\n\n1) referenced twice and promoted to the active list\n2) evicted by the pageout code\n3) under IO, after which it will get evicted or promoted\n\nThe pages freed in this way can either be reused for streaming IO, or\nallocated for something else.  If the pages are used for streaming IO,\nthis pageout pattern continues.  Otherwise, we will fall back to the\nnormal pageout pattern.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nReported-by: Elladan \u003celladan@eskimo.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "46f7e602fb32e02145ef14f8c0ca6d399f0a96b9",
      "tree": "3db67ceec30ffc1ababad1d79c11ba8a61fa037c",
      "parents": [
        "f83a275dbc5ca1721143698e844243fcadfabf6a"
      ],
      "author": {
        "name": "Nikanth Karthikesan",
        "email": "knikanth@suse.de",
        "time": "Thu May 28 14:34:41 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri May 29 08:40:03 2009 -0700"
      },
      "message": "memcg: fix build warning and avoid checking for mem !\u003d null again and again\n\nFix build warning, \"mem_cgroup_is_obsolete defined but not used\" when\nCONFIG_DEBUG_VM is not set.  Also avoid checking for !mem again and again.\n\nSigned-off-by: Nikanth Karthikesan \u003cknikanth@suse.de\u003e\nAcked-by: Pekka Enberg \u003cpenberg@cs.helsinki.fi\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": "e767e0561d7fd2333df1921f1ab4176211f9036b",
      "tree": "3b936733f80ceb1ee61ce99f927d002d2296250e",
      "parents": [
        "bd6daba909d8484bd2ccf6017db4028d7a420927"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu May 28 14:34:28 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri May 29 08:40:02 2009 -0700"
      },
      "message": "memcg: fix deadlock between lock_page_cgroup and mapping tree_lock\n\nmapping-\u003etree_lock can be acquired from interrupt context.  Then,\nfollowing dead lock can occur.\n\nAssume \"A\" as a page.\n\n CPU0:\n       lock_page_cgroup(A)\n\t\tinterrupted\n\t\t\t-\u003e take mapping-\u003etree_lock.\n CPU1:\n       take mapping-\u003etree_lock\n\t\t-\u003e lock_page_cgroup(A)\n\nThis patch tries to fix above deadlock by moving memcg\u0027s hook to out of\nmapping-\u003etree_lock.  charge/uncharge of pagecache/swapcache is protected\nby page lock, not tree_lock.\n\nAfter this patch, lock_page_cgroup() is not called under mapping-\u003etree_lock.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ae3abae64f177586be55b04a7fb7047a34b21a3e",
      "tree": "05ba2ef8dca958cc4a02ac08e5aae03b8bc82a81",
      "parents": [
        "0816178638c15ce5472d39d771a96860dff4141a"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Apr 30 15:08:19 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat May 02 15:36:09 2009 -0700"
      },
      "message": "memcg: fix mem_cgroup_shrink_usage()\n\nCurrent mem_cgroup_shrink_usage() has two problems.\n\n1. It doesn\u0027t call mem_cgroup_out_of_memory and doesn\u0027t update\n   last_oom_jiffies, so pagefault_out_of_memory invokes global OOM.\n\n2. Considering hierarchy, shrinking has to be done from the\n   mem_over_limit, not from the memcg which the page would be charged to.\n\nmem_cgroup_try_charge_swapin() does all of these things properly, so we\nuse it and call cancel_charge_swapin when it succeeded.\n\nThe name of \"shrink_usage\" is not appropriate for this behavior, so we\nchange it too.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.cn\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.co.jp\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c0bd3f63ce01a1757dbce6373122a05fbf99ced7",
      "tree": "4034e701106d1ed819441f4f32a04dfa020398ae",
      "parents": [
        "1e50cc9022d6c0b9175d804573e3f401d00d1381"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Apr 30 15:08:11 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat May 02 15:36:09 2009 -0700"
      },
      "message": "memcg: fix try_get_mem_cgroup_from_swapcache()\n\nThis is a bugfix for commit 3c776e64660028236313f0e54f3a9945764422df\n(\"memcg: charge swapcache to proper memcg\").\n\nUsed bit of swapcache is solid under page lock, but considering\nmove_account, pc-\u003emem_cgroup is not.\n\nWe need lock_page_cgroup() anyway.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a8031cb00e286600ea08bd00a6812dbfec412376",
      "tree": "9b3708cbb048af00c152a311e0c5db841cb7f82a",
      "parents": [
        "3d26dcf7679c5cc6c9f3b95ffdb2152fba2b7fae"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Mon Apr 13 14:40:08 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 13 15:04:32 2009 -0700"
      },
      "message": "memcg: remove warning when CONFIG_DEBUG_VM\u003dn\n\nmm/memcontrol.c:318: warning: `mem_cgroup_is_obsolete\u0027 defined but not used\n\n[akpm@linux-foundation.org: simplify as suggested by Balbir]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "83aae4c737866da3280f51fd15da58eddd788397",
      "tree": "a4fdabfb02949e0d44743850b7f37ae52eaed757",
      "parents": [
        "627991a20b3f4d504d20466ab405fe035cb1a20a"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Apr 02 16:57:48 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:56 2009 -0700"
      },
      "message": "memcg: cleanup cache_charge\n\nCurrent mem_cgroup_cache_charge is a bit complicated especially\nin the case of shmem\u0027s swap-in.\n\nThis patch cleans it up by using try_charge_swapin and commit_charge_swapin.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a3b2d692690aef228e493b1beaafe5364cab3237",
      "tree": "d3ad99c5370462861a1b918b4136e7bd7ad78e52",
      "parents": [
        "3c776e64660028236313f0e54f3a9945764422df"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:45 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:56 2009 -0700"
      },
      "message": "cgroups: use css id in swap cgroup for saving memory v5\n\nTry to use CSS ID for records in swap_cgroup.  By this, on 64bit machine,\nsize of swap_cgroup goes down to 2 bytes from 8bytes.\n\nThis means, when 2GB of swap is equipped, (assume the page size is 4096bytes)\n\n\tFrom size of swap_cgroup \u003d 2G/4k * 8 \u003d 4Mbytes.\n\tTo   size of swap_cgroup \u003d 2G/4k * 2 \u003d 1Mbytes.\n\nReduction is large.  Of course, there are trade-offs.  This CSS ID will\nadd overhead to swap-in/swap-out/swap-free.\n\nBut in general,\n  - swap is a resource which the user tend to avoid use.\n  - If swap is never used, swap_cgroup area is not used.\n  - Reading traditional manuals, size of swap should be proportional to\n    size of memory. Memory size of machine is increasing now.\n\nI think reducing size of swap_cgroup makes sense.\n\nNote:\n  - ID-\u003eCSS lookup routine has no locks, it\u0027s under RCU-Read-Side.\n  - memcg can be obsolete at rmdir() but not freed while refcnt from\n    swap_cgroup is available.\n\nChangelog v4-\u003ev5:\n - reworked on to memcg-charge-swapcache-to-proper-memcg.patch\nChanglog -\u003ev4:\n - fixed not configured case.\n - deleted unnecessary comments.\n - fixed NULL pointer bug.\n - fixed message in dmesg.\n\n[nishimura@mxp.nes.nec.co.jp: css_tryget can be called twice in !PageCgroupUsed case]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3c776e64660028236313f0e54f3a9945764422df",
      "tree": "4268ca55283e572ab0e6570cd05030d64048af34",
      "parents": [
        "3918b96e03b2b8dd05889320623f6870e81d35ec"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Apr 02 16:57:43 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:56 2009 -0700"
      },
      "message": "memcg: charge swapcache to proper memcg\n\nmemcg_test.txt says at 4.1:\n\n\tThis swap-in is one of the most complicated work. In do_swap_page(),\n\tfollowing events occur when pte is unchanged.\n\n\t(1) the page (SwapCache) is looked up.\n\t(2) lock_page()\n\t(3) try_charge_swapin()\n\t(4) reuse_swap_page() (may call delete_swap_cache())\n\t(5) commit_charge_swapin()\n\t(6) swap_free().\n\n\tConsidering following situation for example.\n\n\t(A) The page has not been charged before (2) and reuse_swap_page()\n\t    doesn\u0027t call delete_from_swap_cache().\n\t(B) The page has not been charged before (2) and reuse_swap_page()\n\t    calls delete_from_swap_cache().\n\t(C) The page has been charged before (2) and reuse_swap_page() doesn\u0027t\n\t    call delete_from_swap_cache().\n\t(D) The page has been charged before (2) and reuse_swap_page() calls\n\t    delete_from_swap_cache().\n\n\t    memory.usage/memsw.usage changes to this page/swp_entry will be\n\t Case          (A)      (B)       (C)     (D)\n         Event\n       Before (2)     0/ 1     0/ 1      1/ 1    1/ 1\n          \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n          (3)        +1/+1    +1/+1     +1/+1   +1/+1\n          (4)          -       0/ 0       -     -1/ 0\n          (5)         0/-1     0/ 0     -1/-1    0/ 0\n          (6)          -       0/-1       -      0/-1\n          \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n       Result         1/ 1     1/ 1      1/ 1    1/ 1\n\n       In any cases, charges to this page should be 1/ 1.\n\nIn case of (D), mem_cgroup_try_get_from_swapcache() returns NULL\n(because lookup_swap_cgroup() returns NULL), so \"+1/+1\" at (3) means\ncharges to the memcg(\"foo\") to which the \"current\" belongs.\nOTOH, \"-1/0\" at (4) and \"0/-1\" at (6) means uncharges from the memcg(\"baa\")\nto which the page has been charged.\n\nSo, if the \"foo\" and \"baa\" is different(for example because of task move),\nthis charge will be moved from \"baa\" to \"foo\".\n\nI think this is an unexpected behavior.\n\nThis patch fixes this by modifying mem_cgroup_try_get_from_swapcache()\nto return the memcg to which the swapcache has been charged if PCG_USED bit\nis set.\nIIUC, checking PCG_USED bit of swapcache is safe under page lock.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c137b5ece4b111e46981aae7da77315b9909809f",
      "tree": "99677d3ae0f9016e83f257743ff04d5886a6e998",
      "parents": [
        "e222432bfa7dcf6ec008622a978c9f284ed5e3a9"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:40 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: remove mem_cgroup_calc_mapped_ratio()\n\nCurrently, mem_cgroup_calc_mapped_ratio() is unused at all.  it can be\nremoved and KAMEZAWA-san suggested it.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e222432bfa7dcf6ec008622a978c9f284ed5e3a9",
      "tree": "b006f569cb66523a5644ad0ef1669b051ccda907",
      "parents": [
        "0b7f569e45bb6be142d87017030669a6a7d327a1"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Thu Apr 02 16:57:39 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: show memcg information during OOM\n\nAdd RSS and swap to OOM output from memcg\n\nDisplay memcg values like failcnt, usage and limit when an OOM occurs due\nto memcg.\n\nThanks to Johannes Weiner, Li Zefan, David Rientjes, Kamezawa Hiroyuki,\nDaisuke Nishimura and KOSAKI Motohiro for review.\n\nSample output\n-------------\n\nTask in /a/x killed as a result of limit of /a\nmemory: usage 1048576kB, limit 1048576kB, failcnt 4183\nmemory+swap: usage 1400964kB, limit 9007199254740991kB, failcnt 0\n\n[akpm@linux-foundation.org: compilation fix]\n[akpm@linux-foundation.org: fix kerneldoc and whitespace]\n[akpm@linux-foundation.org: add printk facility level]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0b7f569e45bb6be142d87017030669a6a7d327a1",
      "tree": "8df7877b95c093ebf4cb4e1006cea16f75fc79b7",
      "parents": [
        "81d39c20f5ee2437d71709beb82597e2a38efbbc"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:38 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: fix OOM killer under memcg\n\nThis patch tries to fix OOM Killer problems caused by hierarchy.\nNow, memcg itself has OOM KILL function (in oom_kill.c) and tries to\nkill a task in memcg.\n\nBut, when hierarchy is used, it\u0027s broken and correct task cannot\nbe killed. For example, in following cgroup\n\n\t/groupA/\thierarchy\u003d1, limit\u003d1G,\n\t\t01\tnolimit\n\t\t02\tnolimit\nAll tasks\u0027 memory usage under /groupA, /groupA/01, groupA/02 is limited to\ngroupA\u0027s 1Gbytes but OOM Killer just kills tasks in groupA.\n\nThis patch provides makes the bad process be selected from all tasks\nunder hierarchy. BTW, currently, oom_jiffies is updated against groupA\nin above case. oom_jiffies of tree should be updated.\n\nTo see how oom_jiffies is used, please check mem_cgroup_oom_called()\ncallers.\n\n[akpm@linux-foundation.org: build fix]\n[akpm@linux-foundation.org: const fix]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: 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": "81d39c20f5ee2437d71709beb82597e2a38efbbc",
      "tree": "56297eb00cfa2bc251b2c5e0e0330becafd39e33",
      "parents": [
        "14067bb3e24b96d92e22d19c18c0119edf5575e5"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:36 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: fix shrinking memory to return -EBUSY by fixing retry algorithm\n\nAs pointed out, shrinking memcg\u0027s limit should return -EBUSY after\nreasonable retries.  This patch tries to fix the current behavior of\nshrink_usage.\n\nBefore looking into \"shrink should return -EBUSY\" problem, we should fix\nhierarchical reclaim code.  It compares current usage and current limit,\nbut it only makes sense when the kernel reclaims memory because hit\nlimits.  This is also a problem.\n\nWhat this patch does are.\n\n  1. add new argument \"shrink\" to hierarchical reclaim. If \"shrink\u003d\u003dtrue\",\n     hierarchical reclaim returns immediately and the caller checks the kernel\n     should shrink more or not.\n     (At shrinking memory, usage is always smaller than limit. So check for\n      usage \u003c limit is useless.)\n\n  2. For adjusting to above change, 2 changes in \"shrink\"\u0027s retry path.\n     2-a. retry_count depends on # of children because the kernel visits\n\t  the children under hierarchy one by one.\n     2-b. rather than checking return value of hierarchical_reclaim\u0027s progress,\n\t  compares usage-before-shrink and usage-after-shrink.\n\t  If usage-before-shrink \u003c\u003d usage-after-shrink, retry_count is\n\t  decremented.\n\nReported-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\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": "14067bb3e24b96d92e22d19c18c0119edf5575e5",
      "tree": "54af97e899bf4253b170938f6711097824b7364f",
      "parents": [
        "04046e1a0a34286382e913f8fc461440c21d88e8"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamzawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:35 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: hierarchical stat\n\nClean up memory.stat file routine and show \"total\" hierarchical stat.\n\nThis patch does\n  - renamed get_all_zonestat to be get_local_zonestat.\n  - remove old mem_cgroup_stat_desc, which is only for per-cpu stat.\n  - add mcs_stat to cover both of per-cpu/per-lru stat.\n  - add \"total\" stat of hierarchy (*)\n  - add a callback system to scan all memcg under a root.\n\u003d\u003d \"total\" is added.\n[kamezawa@localhost ~]$ cat /opt/cgroup/xxx/memory.stat\ncache 0\nrss 0\npgpgin 0\npgpgout 0\ninactive_anon 0\nactive_anon 0\ninactive_file 0\nactive_file 0\nunevictable 0\nhierarchical_memory_limit 50331648\nhierarchical_memsw_limit 9223372036854775807\ntotal_cache 65536\ntotal_rss 192512\ntotal_pgpgin 218\ntotal_pgpgout 155\ntotal_inactive_anon 0\ntotal_active_anon 135168\ntotal_inactive_file 61440\ntotal_active_file 4096\ntotal_unevictable 0\n\u003d\u003d\n(*) maybe the user can do calc hierarchical stat by his own program\n   in userland but if it can be written in clean way, it\u0027s worth to be\n   shown, I think.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: 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": "04046e1a0a34286382e913f8fc461440c21d88e8",
      "tree": "cab2b8a61e7474d509fbd3ea02e38b7c4137ce4b",
      "parents": [
        "b4046f00ee7c1e5615261b496cf7309683275b29"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:33 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:55 2009 -0700"
      },
      "message": "memcg: use CSS ID\n\nAssigning CSS ID for each memcg and use css_get_next() for scanning hierarchy.\n\n\tAssume folloing tree.\n\n\tgroup_A (ID\u003d3)\n\t\t/01 (ID\u003d4)\n\t\t   /0A (ID\u003d7)\n\t\t/02 (ID\u003d10)\n\tgroup_B (ID\u003d5)\n\tand task in group_A/01/0A hits limit at group_A.\n\n\treclaim will be done in following order (round-robin).\n\tgroup_A(3) -\u003e group_A/01 (4) -\u003e group_A/01/0A (7) -\u003e group_A/02(10)\n\t-\u003e group_A -\u003e .....\n\n\tRound robin by ID. The last visited cgroup is recorded and restart\n\tfrom it when it start reclaim again.\n\t(More smart algorithm can be implemented..)\n\n\tNo cgroup_mutex or hierarchy_mutex is required.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: 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": "ec64f51545fffbc4cb968f0cea56341a4b07e85a",
      "tree": "575d890a6759d81f3324fa2a22ca6ab14a41eefc",
      "parents": [
        "38460b48d06440de46b34cb778bd6c4855030754"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Apr 02 16:57:26 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Apr 02 19:04:54 2009 -0700"
      },
      "message": "cgroup: fix frequent -EBUSY at rmdir\n\nIn following situation, with memory subsystem,\n\n\t/groupA use_hierarchy\u003d\u003d1\n\t\t/01 some tasks\n\t\t/02 some tasks\n\t\t/03 some tasks\n\t\t/04 empty\n\nWhen tasks under 01/02/03 hit limit on /groupA, hierarchical reclaim\nis triggered and the kernel walks tree under groupA. In this case,\nrmdir /groupA/04 fails with -EBUSY frequently because of temporal\nrefcnt from the kernel.\n\nIn general. cgroup can be rmdir\u0027d if there are no children groups and\nno tasks. Frequent fails of rmdir() is not useful to users.\n(And the reason for -EBUSY is unknown to users.....in most cases)\n\nThis patch tries to modify above behavior, by\n\t- retries if css_refcnt is got by someone.\n\t- add \"return value\" to pre_destroy() and allows subsystem to\n\t  say \"we\u0027re really busy!\"\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "299b4eaa302138426d5a9ecd954de1f565d76c94",
      "tree": "790271af066eaa6d01f94ff91ab14d54f96c6f62",
      "parents": [
        "248ae0d43fe7f951352eedfff36572d4b75ce963"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 29 14:25:17 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 29 18:04:44 2009 -0800"
      },
      "message": "memcg: NULL pointer dereference at rmdir on some NUMA systems\n\nN_POSSIBLE doesn\u0027t means there is memory...and force_empty can\nvisit invalid node which have no pgdat.\n\nTo visit all valid nodes, N_HIGH_MEMORY should be used.\n\nReported-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nTested-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7bcc1bb1232de6efc0b85e0c7fe38e90b2436318",
      "tree": "3952a706885f4c57217f4196f055a7c16d0af80b",
      "parents": [
        "baef99a08a2e23d9386b47e53fa5f0d44fc98f66"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 29 14:25:11 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 29 18:04:43 2009 -0800"
      },
      "message": "memcg: get/put parents at create/free\n\nThe lifetime of struct cgroup and struct mem_cgroup is different and\nmem_cgroup has its own reference count for handling references from\nswap_cgroup.\n\nThis causes strange problem that the parent mem_cgroup dies while child\nmem_cgroup alive, and this problem causes a bug in case of\nuse_hierarchy\u003d\u003d1 because res_counter_uncharge climbs up the tree.\n\nThis patch is for avoiding it by getting the parent at create, and putting\nit at freeing.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by; KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@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": "068b38c1fa7a9210608f27ac521897ccc5f9b726",
      "tree": "6ae0ca440bab074c03a4cd4528e8c1467458753f",
      "parents": [
        "0eb253e223c88b982461e59154fcad1b82597592"
      ],
      "author": {
        "name": "Li Zefan",
        "email": "lizf@cn.fujitsu.com",
        "time": "Thu Jan 15 13:51:26 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 15 16:39:41 2009 -0800"
      },
      "message": "memcg: fix a race when setting memory.swappiness\n\n(suppose: memcg-\u003euse_hierarchy \u003d\u003d 0 and memcg-\u003eswappiness \u003d\u003d 60)\n\necho 10 \u003e /memcg/0/swappiness   |\n  mem_cgroup_swappiness_write() |\n    ...                         | echo 1 \u003e /memcg/0/use_hierarchy\n                                | mkdir /mnt/0/1\n                                |   sub_memcg-\u003eswappiness \u003d 60;\n    memcg-\u003eswappiness \u003d 10;     |\n\nIn the above scenario, we end up having 2 different swappiness\nvalues in a single hierarchy.\n\nWe should hold cgroup_lock() when cheking cgrp-\u003echildren list.\n\nSigned-off-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@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": "0eb253e223c88b982461e59154fcad1b82597592",
      "tree": "87d94d6512c26a0b70a452c0b50958b443824966",
      "parents": [
        "9e1c9d865543593ee92ec3a5075f064dec981a96"
      ],
      "author": {
        "name": "Li Zefan",
        "email": "lizf@cn.fujitsu.com",
        "time": "Thu Jan 15 13:51:25 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 15 16:39:41 2009 -0800"
      },
      "message": "memcg: fix section mismatch\n\nAt system boot when creating the top cgroup, mem_cgroup_create() calls\nenable_swap_cgroup() which is marked as __init, so mark\nmem_cgroup_create() as __ref to avoid false section mismatch warning.\n\nReported-by: Rakib Mullick \u003crakib.mullick@gmail.com\u003e\nSigned-off-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nAcked-by; KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4d1c627389c8ba6d9e703208567ffcdbd356f682",
      "tree": "535720830c6f547e2d544d1dd02d23bae41da45e",
      "parents": [
        "c268e9946d7dc30ac4e55cdc3f43c8af1ae8153c"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 15 13:51:14 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 15 16:39:39 2009 -0800"
      },
      "message": "memcg: make oom less frequently\n\nIn previous implementation, mem_cgroup_try_charge checked the return\nvalue of mem_cgroup_try_to_free_pages, and just retried if some pages\nhad been reclaimed.\nBut now, try_charge(and mem_cgroup_hierarchical_reclaim called from it)\nonly checks whether the usage is less than the limit.\n\nThis patch tries to change the behavior as before to cause oom less\nfrequently.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@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": "c268e9946d7dc30ac4e55cdc3f43c8af1ae8153c",
      "tree": "24de026d333ae2d8137165398d71650307cd26c0",
      "parents": [
        "40d58138f832a48208cdce57d6572a033b1f7a23"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 15 13:51:13 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 15 16:39:39 2009 -0800"
      },
      "message": "memcg: fix hierarchical reclaim\n\nIf root_mem has no children, last_scaned_child is set to root_mem itself.\nBut after some children added to root_mem, mem_cgroup_get_next_node can\nmem_cgroup_put the root_mem although root_mem has not been mem_cgroup_get.\n\nThis patch fixes this behavior by:\n\n- Set last_scanned_child to NULL if root_mem has no children or DFS\n  search has returned to root_mem itself(root_mem is not a \"child\" of\n  root_mem).  Make mem_cgroup_get_first_node return root_mem in this case.\n   There are no mem_cgroup_get/put for root_mem.\n\n- Rename mem_cgroup_get_next_node to __mem_cgroup_get_next_node, and\n  mem_cgroup_get_first_node to mem_cgroup_get_next_node.  Make\n  mem_cgroup_hierarchical_reclaim call only new mem_cgroup_get_next_node.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@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": "40d58138f832a48208cdce57d6572a033b1f7a23",
      "tree": "740c3ccefa96965cb5e27f4b13dc1e03e6f688a3",
      "parents": [
        "bd112db872c2f69993c86f458467acb4a14da010"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 15 13:51:12 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 15 16:39:39 2009 -0800"
      },
      "message": "memcg: fix error path of mem_cgroup_move_parent\n\nThere is a bug in error path of mem_cgroup_move_parent.\n\nExtra refcnt got from try_charge should be dropped, and usages incremented\nby try_charge should be decremented in both error paths:\n\n    A: failure at get_page_unless_zero\n    B: failure at isolate_lru_page\n\nThis bug makes this parent directory unremovable.\n\nIn case of A, rmdir doesn\u0027t return, because res.usage doesn\u0027t go down to 0\nat mem_cgroup_force_empty even after all the pc in lru are removed.\n\nIn case of B, rmdir fails and returns -EBUSY, because it has extra ref\ncounts even after res.usage goes down to 0.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@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": "bd112db872c2f69993c86f458467acb4a14da010",
      "tree": "a227a3e92ec7fbb68d2c0ca02d9d6df95c206b70",
      "parents": [
        "c3d6362b8717759de7f2086f9665a4d96cacbc51"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 15 13:51:11 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 15 16:39:39 2009 -0800"
      },
      "message": "memcg: fix mem_cgroup_get_reclaim_stat_from_page\n\nIn case of swapin, a new page is added to lru before it is charged,\nso page-\u003epc-\u003emem_cgroup points to NULL or last mem_cgroup the page\nwas charged before.\n\nIn the latter case, if the mem_cgroup has already freed by rmdir,\nthe area pointed to by page-\u003epc-\u003emem_cgroup may have invalid data.\n\nActually, I saw general protection fault.\n\n    general protection fault: 0000 [#1] SMP\n    last sysfs file: /sys/devices/system/cpu/cpu15/cache/index1/shared_cpu_map\n    CPU 4\n    Modules linked in: ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp ipv6 autofs4 hidp rfcomm l2cap bluetooth sunrpc dm_mirror dm_region_hash dm_log dm_multipath dm_mod rfkill input_polldev sbs sbshc battery ac lp sg ide_cd_mod cdrom button serio_raw acpi_memhotplug parport_pc e1000 rtc_cmos parport rtc_core rtc_lib i2c_i801 i2c_core shpchp pcspkr ata_piix libata megaraid_mbox megaraid_mm sd_mod scsi_mod ext3 jbd ehci_hcd ohci_hcd uhci_hcd [last unloaded: microcode]\n    Pid: 26038, comm: page01 Tainted: G        W  2.6.28-rc9-mm1-mmotm-2008-12-22-16-14-f2ab3dea #1\n    RIP: 0010:[\u003cffffffff8028e710\u003e]  [\u003cffffffff8028e710\u003e] update_page_reclaim_stat+0x2f/0x42\n    RSP: 0000:ffff8801ee457da8  EFLAGS: 00010002\n    RAX: 32353438312021c8 RBX: 0000000000000000 RCX: 32353438312021c8\n    RDX: 0000000000000000 RSI: ffff8800cb0b1000 RDI: ffff8801164d1d28\n    RBP: ffff880110002cb8 R08: ffff88010f2eae23 R09: 0000000000000001\n    R10: ffff8800bc514b00 R11: ffff880110002c00 R12: 0000000000000000\n    R13: ffff88000f484100 R14: 0000000000000003 R15: 00000000001200d2\n    FS:  00007f8a261726f0(0000) GS:ffff88010f2eaa80(0000) knlGS:0000000000000000\n    CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n    CR2: 00007f8a25d22000 CR3: 00000001ef18c000 CR4: 00000000000006e0\n    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400\n    Process page01 (pid: 26038, threadinfo ffff8801ee456000, task ffff8800b585b960)\n    Stack:\n     ffffe200071ee568 ffff880110001f00 0000000000000000 ffffffff8028ea17\n     ffff88000f484100 0000000000000000 0000000000000020 00007f8a25d22000\n     ffff8800bc514b00 ffffffff8028ec34 0000000000000000 0000000000016fd8\n    Call Trace:\n     [\u003cffffffff8028ea17\u003e] ? ____pagevec_lru_add+0xc1/0x13c\n     [\u003cffffffff8028ec34\u003e] ? drain_cpu_pagevecs+0x36/0x89\n     [\u003cffffffff802a4f8c\u003e] ? swapin_readahead+0x78/0x98\n     [\u003cffffffff8029a37a\u003e] ? handle_mm_fault+0x3d9/0x741\n     [\u003cffffffff804da654\u003e] ? do_page_fault+0x3ce/0x78c\n     [\u003cffffffff804d7a42\u003e] ? trace_hardirqs_off_thunk+0x3a/0x3c\n     [\u003cffffffff804d860f\u003e] ? page_fault+0x1f/0x30\n    Code: cc 55 48 8d af b8 0d 00 00 48 89 f7 53 89 d3 e8 39 85 02 00 48 63 d3 48 ff 44 d5 10 45 85 e4 74 05 48 ff 44 d5 00 48 85 c0 74 0e \u003c48\u003e ff 44 d0 10 45 85 e4 74 04 48 ff 04 d0 5b 5d 41 5c c3 41 54\n    RIP  [\u003cffffffff8028e710\u003e] update_page_reclaim_stat+0x2f/0x42\n     RSP \u003cffff8801ee457da8\u003e\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@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": "2cb378c862777d050c20db903b119a029845fdcb",
      "tree": "5512511acf9d66338039f9698e456f1e3254970b",
      "parents": [
        "999cd8a450f8f93701669a61cac4d3b19eca07e8"
      ],
      "author": {
        "name": "Paul Menage",
        "email": "menage@google.com",
        "time": "Wed Jan 07 18:08:37 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:10 2009 -0800"
      },
      "message": "cgroups: use hierarchy_mutex in memory controller\n\nUpdate the memory controller to use its hierarchy_mutex rather than\ncalling cgroup_lock() to protected against cgroup_mkdir()/cgroup_rmdir()\nfrom occurring in its hierarchy.\n\nSigned-off-by: Paul Menage \u003cmenage@google.com\u003e\nTested-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b5a84319a4343a0db753436fd8147e61eaafa7ea",
      "tree": "5faae671b431b50a32a2d8c7a57cc9361d8f336d",
      "parents": [
        "544122e5e0ee27d5aac4a441f7746712afbf248c"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:35 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:10 2009 -0800"
      },
      "message": "memcg: fix shmem\u0027s swap accounting\n\nNow, you can see following even when swap accounting is enabled.\n\n 1. Create Group 01, and 02.\n 2. allocate a \"file\" on tmpfs by a task under 01.\n 3. swap out the \"file\" (by memory pressure)\n 4. Read \"file\" from a task in group 02.\n 5. the charge of \"file\" is moved to group 02.\n\nThis is not ideal behavior. This is because SwapCache which was loaded\nby read-ahead is not taken into account..\n\nThis is a patch to fix shmem\u0027s swapcache behavior.\n  - remove mem_cgroup_cache_charge_swapin().\n  - Add SwapCache handler routine to mem_cgroup_cache_charge().\n    By this, shmem\u0027s file cache is charged at add_to_page_cache()\n    with GFP_NOWAIT.\n  - pass the page of swapcache to shrink_mem_cgroup.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "544122e5e0ee27d5aac4a441f7746712afbf248c",
      "tree": "8c5f87b19501478924654ae83a8751fde5dd51d4",
      "parents": [
        "54595fe2652f04dc8f5b985312c7cef5aa7bf722"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:34 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:10 2009 -0800"
      },
      "message": "memcg: fix LRU accounting for SwapCache\n\nNow, a page can be deleted from SwapCache while do_swap_page().\nmemcg-fix-swap-accounting-leak-v3.patch handles that, but, LRU handling is\nstill broken.  (above behavior broke assumption of memcg-synchronized-lru\npatch.)\n\nThis patch is a fix for LRU handling (especially for per-zone counters).\nAt charging SwapCache,\n - Remove page_cgroup from LRU if it\u0027s not used.\n - Add page cgroup to LRU if it\u0027s not linked to.\n\nReported-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "54595fe2652f04dc8f5b985312c7cef5aa7bf722",
      "tree": "4e63df850afb307a170c045217b2097aae271b78",
      "parents": [
        "a7ba0eef3af51cd1b6fc4028e4705b3ea2ea9469"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:33 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:10 2009 -0800"
      },
      "message": "memcg: use css_tryget in memcg\n\nFrom:KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\n\ncss_tryget() newly is added and we can know css is alive or not and get\nrefcnt of css in very safe way.  (\"alive\" here means \"rmdir/destroy\" is\nnot called.)\n\nThis patch replaces css_get() to css_tryget(), where I cannot explain\nwhy css_get() is safe. And removes memcg-\u003eobsolete flag.\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a7ba0eef3af51cd1b6fc4028e4705b3ea2ea9469",
      "tree": "70e43097041eed321be38d1af4ed65e41d1ebff9",
      "parents": [
        "03f3c433648a97ae7c86be789edba67690f6ea60"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:32 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:10 2009 -0800"
      },
      "message": "memcg: fix double free and make refcnt sane\n\n1. Fix double-free BUG in error route of mem_cgroup_create().\n    mem_cgroup_free() itself frees per-zone-info.\n 2. Making refcnt of memcg simple.\n    Add 1 refcnt at creation and call free when refcnt goes down to 0.\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "03f3c433648a97ae7c86be789edba67690f6ea60",
      "tree": "d92a17f6fe9d90d3a6b46762742ef239bf5ecc44",
      "parents": [
        "42e9abb628def2c335a4ecf130bb6c88d916d885"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:31 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:10 2009 -0800"
      },
      "message": "memcg: fix swap accounting leak\n\nFix swapin charge operation of memcg.\n\nNow, memcg has hooks to swap-out operation and checks SwapCache is really\nunused or not.  That check depends on contents of struct page.  I.e.  If\nPageAnon(page) \u0026\u0026 page_mapped(page), the page is recoginized as\nstill-in-use.\n\nNow, reuse_swap_page() calles delete_from_swap_cache() before establishment\nof any rmap. Then, in followinig sequence\n\n\t(Page fault with WRITE)\n\ttry_charge() (charge +\u003d PAGESIZE)\n\tcommit_charge() (Check page_cgroup is used or not..)\n\treuse_swap_page()\n\t\t-\u003e delete_from_swapcache()\n\t\t\t-\u003e mem_cgroup_uncharge_swapcache() (charge -\u003d PAGESIZE)\n\t......\nNew charge is uncharged soon....\nTo avoid this,  move commit_charge() after page_mapcount() goes up to 1.\nBy this,\n\n\ttry_charge()\t\t(usage +\u003d PAGESIZE)\n\treuse_swap_page()\t(may usage -\u003d PAGESIZE if PCG_USED is set)\n\tcommit_charge()\t\t(If page_cgroup is not marked as PCG_USED,\n\t\t\t\t add new charge.)\nAccounting will be correct.\n\nChangelog (v2) -\u003e (v3)\n  - fixed invalid charge to swp_entry\u003d\u003d0.\n  - updated documentation.\nChangelog (v1) -\u003e (v2)\n  - fixed comment.\n\n[nishimura@mxp.nes.nec.co.jp: swap accounting leak doc fix]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nTested-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "42e9abb628def2c335a4ecf130bb6c88d916d885",
      "tree": "e626dcc9d8fff5834c419e39dce57bed765aa09a",
      "parents": [
        "7f4d454dee2e0bdd21bafd413d1c53e443a26540"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:30 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: change try_to_free_pages to hierarchical_reclaim\n\nmem_cgroup_hierarchicl_reclaim() works properly even when !use_hierarchy\nnow (by memcg-hierarchy-avoid-unnecessary-reclaim.patch), so, instead of\ntry_to_free_mem_cgroup_pages(), it should be used in many cases.\n\nThe only exception is force_empty.  The group has no children in this\ncase.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7f4d454dee2e0bdd21bafd413d1c53e443a26540",
      "tree": "abf54c2bd7c91fe09685e42b3a92d84679403058",
      "parents": [
        "a5e924f5f8abf97944e625d74967cc9452cfbce8"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:29 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: avoid deadlock caused by race between oom and cpuset_attach\n\nmpol_rebind_mm(), which can be called from cpuset_attach(), does\ndown_write(mm-\u003emmap_sem).  This means down_write(mm-\u003emmap_sem) can be\ncalled under cgroup_mutex.\n\nOTOH, page fault path does down_read(mm-\u003emmap_sem) and calls\nmem_cgroup_try_charge_xxx(), which may eventually calls\nmem_cgroup_out_of_memory().  And mem_cgroup_out_of_memory() calls\ncgroup_lock().  This means cgroup_lock() can be called under\ndown_read(mm-\u003emmap_sem).\n\nIf those two paths race, deadlock can happen.\n\nThis patch avoid this deadlock by:\n  - remove cgroup_lock() from mem_cgroup_out_of_memory().\n  - define new mutex (memcg_tasklist) and serialize mem_cgroup_move_task()\n    (-\u003eattach handler of memory cgroup) and mem_cgroup_out_of_memory.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a5e924f5f8abf97944e625d74967cc9452cfbce8",
      "tree": "3a90d35e270617933f352c8c748880a62fa6eeca",
      "parents": [
        "3bb4edf24b26358eccfc69ac8b9a9c36ccc312da"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:28 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: remove mem_cgroup_try_charge\n\nAfter previous patch, mem_cgroup_try_charge is not used by anyone, so we\ncan remove it.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3bb4edf24b26358eccfc69ac8b9a9c36ccc312da",
      "tree": "61093878836115496bd52646670d123809e1bc99",
      "parents": [
        "9836d89191edd4887ed026a9ce53d9dfac62ec1c"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:28 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: don\u0027t trigger oom at page migration\n\nI think triggering OOM at mem_cgroup_prepare_migration would be just a bit\noverkill.  Returning -ENOMEM would be enough for\nmem_cgroup_prepare_migration.  The caller would handle the case anyway.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "fee7b548e6f2bd4bfd03a1a45d3afd593de7d5e9",
      "tree": "90a8b610298013c6ce2d9bb7970b8e6d2a66f488",
      "parents": [
        "c772be939e078afd2505ede7d596a30f8f61de95"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:26 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: show real limit under hierarchy mode\n\nShow \"real\" limit of memcg.  This helps my debugging and maybe useful for\nusers.\n\nWhile testing hierarchy like this\n\n\tmount -t cgroup none /cgroup -t memory\n\tmkdir /cgroup/A\n\tset use_hierarchy\u003d\u003d1 to \"A\"\n\tmkdir /cgroup/A/01\n\tmkdir /cgroup/A/01/02\n\tmkdir /cgroup/A/01/03\n\tmkdir /cgroup/A/01/03/04\n\tmkdir /cgroup/A/08\n\tmkdir /cgroup/A/08/01\n\t....\nand set each own limit to them, \"real\" limit of each memcg is unclear.\nThis patch shows real limit by checking all ancestors.\n\nChangelog: (v1) -\u003e (v2)\n\t- remove \"if\" and use \"min(a,b)\"\n\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-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": "c772be939e078afd2505ede7d596a30f8f61de95",
      "tree": "2cf3157fdd2b3570e105f2d91576585750526fb3",
      "parents": [
        "a7885eb8ad465ec9db99ac5b5e6680f0ca8e11c8"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:25 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:09 2009 -0800"
      },
      "message": "memcg: fix calculation of active_ratio\n\nCurrently, inactive_ratio of memcg is calculated at setting limit.\nbecause page_alloc.c does so and current implementation is straightforward\nporting.\n\nHowever, memcg introduced hierarchy feature recently.  In hierarchy\nrestriction, memory limit is not only decided memory.limit_in_bytes of\ncurrent cgroup, but also parent limit and sibling memory usage.\n\nThen, The optimal inactive_ratio is changed frequently.  So, everytime\ncalculation is better.\n\nTested-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a7885eb8ad465ec9db99ac5b5e6680f0ca8e11c8",
      "tree": "4f3ffaa399fbc16003cc1787228f10543dc9c3ef",
      "parents": [
        "2733c06ac864ed40b9dfbbd5270f3f16949bd4a1"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:24 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:08 2009 -0800"
      },
      "message": "memcg: swappiness\n\nCurrently, /proc/sys/vm/swappiness can change swappiness ratio for global\nreclaim.  However, memcg reclaim doesn\u0027t have tuning parameter for itself.\n\nIn general, the optimal swappiness depend on workload.  (e.g.  hpc\nworkload need to low swappiness than the others.)\n\nThen, per cgroup swappiness improve administrator tunability.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "2733c06ac864ed40b9dfbbd5270f3f16949bd4a1",
      "tree": "4847ad04739d6a25dede0e0329295c15cbb79dda",
      "parents": [
        "e72e2bd6747c7a5c432197b6614cf3a387e61a0e"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:23 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:08 2009 -0800"
      },
      "message": "memcg: protect prev_priority\n\nCurrently, mem_cgroup doesn\u0027t have own lock and almost its member doesn\u0027t\nneed.  (e.g.  mem_cgroup-\u003einfo is protected by zone lock, mem_cgroup-\u003estat\nis per cpu variable)\n\nHowever, there is one explict exception.  mem_cgroup-\u003eprev_priorit need\nlock, but doesn\u0027t protect.  Luckly, this is NOT bug because prev_priority\nisn\u0027t used for current reclaim code.\n\nHowever, we plan to use prev_priority future again.  Therefore, fixing is\nbetter.\n\nIn addition, we plan to reuse this lock for another member.  Then\n\"reclaim_param_lock\" name is better than \"prev_priority_lock\".\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "7f016ee8b6a9a43f768e6252021f169abec4fa1f",
      "tree": "68498191489e051a23da0d39de2b0257714e58b0",
      "parents": [
        "9439c1c95b5c25b8031b2a7eb7e1590eb84be7f5"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:22 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:08 2009 -0800"
      },
      "message": "memcg: show reclaim stat\n\nAdd the following four fields to memory.stat file:\n\n  - inactive_ratio\n  - recent_rotated_anon\n  - recent_rotated_file\n  - recent_scanned_anon\n  - recent_scanned_file\n\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "9439c1c95b5c25b8031b2a7eb7e1590eb84be7f5",
      "tree": "79eaae56278407e0a223e562a2d0079834ca5529",
      "parents": [
        "3e2f41f1f64744f7942980d93cc93dd3e5924560"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:21 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:08 2009 -0800"
      },
      "message": "memcg: remove mem_cgroup_cal_reclaim()\n\nNow, get_scan_ratio() return correct value although memcg reclaim.  Then,\nmem_cgroup_calc_reclaim() can be removed.\n\nSo, memcg reclaim get the same capability of anon/file reclaim balancing\nas global reclaim now.\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "3e2f41f1f64744f7942980d93cc93dd3e5924560",
      "tree": "7b605c407b7470877fd9c5c853407f75edcbeb49",
      "parents": [
        "a3d8e0549d913e30968fa02e505dfe02c0a23e0d"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:20 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:08 2009 -0800"
      },
      "message": "memcg: add zone_reclaim_stat\n\nIntroduce mem_cgroup_per_zone::reclaim_stat member and its statics\ncollecting function.\n\nNow, get_scan_ratio() can calculate correct value on memcg reclaim.\n\n[hugh@veritas.com: avoid reclaim_stat oops when disabled]\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a3d8e0549d913e30968fa02e505dfe02c0a23e0d",
      "tree": "e4d3df33666a18614289ae7bc76c27ad7950eb73",
      "parents": [
        "14797e2363c2b2f1ce139fd1c5a215e4e05aa1d9"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:19 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:08 2009 -0800"
      },
      "message": "memcg: add mem_cgroup_zone_nr_pages()\n\nIntroduce mem_cgroup_zone_nr_pages().  It is called by zone_nr_pages()\nhelper function.\n\nThis patch doesn\u0027t have any behavior change.\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "14797e2363c2b2f1ce139fd1c5a215e4e05aa1d9",
      "tree": "a56edaa680c7c338a5a3043aa24897d7f668b6c9",
      "parents": [
        "549927620b04a8f8073ce2ee2a8977f209af2ee5"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:18 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:08 2009 -0800"
      },
      "message": "memcg: add inactive_anon_is_low()\n\nThe inactive_anon_is_low() is key component of active/inactive anon\nbalancing on reclaim.  However current inactive_anon_is_low() function\nonly consider global reclaim.\n\nTherefore, we need following ugly scan_global_lru() condition.\n\n\tif (lru \u003d\u003d LRU_ACTIVE_ANON \u0026\u0026\n\t    (!scan_global_lru(sc) || inactive_anon_is_low(zone))) {\n\t\tshrink_active_list(nr_to_scan, zone, sc, priority, file);\n\t\treturn 0;\n\nit cause that memcg reclaim always deactivate pages when shrink_list() is\ncalled.  To make mem_cgroup_inactive_anon_is_low() improve active/inactive\nanon balancing of memcgroup.\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Cyrill Gorcunov \u003cgorcunov@gmail.com\u003e\nCc: \"Pekka Enberg\" \u003cpenberg@cs.helsinki.fi\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "549927620b04a8f8073ce2ee2a8977f209af2ee5",
      "tree": "6451507892fb353732fe959b2bf0a171fa3ac20b",
      "parents": [
        "eeee9a8cd1e93c8b94e7788790fa9e2f8910c779"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:18 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:07 2009 -0800"
      },
      "message": "memcg: add null check to page_cgroup_zoneinfo()\n\nIf CONFIG_CGROUP_MEM_RES_CTLR_SWAP\u003dy, page_cgroup::mem_cgroup can be NULL.\nTherefore null checking is better.\n\nA later patch uses this function.\n\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "670ec2f170301425fc4fdfa63d40652071fe85f6",
      "tree": "37a25cfc34c3ddada5bbb428cf1d4842ed30df1f",
      "parents": [
        "a7fe942e94b2f66aa0f11d37699c0ec8155d3ad1"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:13 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:07 2009 -0800"
      },
      "message": "memcg: hierarchy avoid unnecessary reclaim\n\nIf hierarchy is not used, no tree-walk is necessary.\n\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "a7fe942e94b2f66aa0f11d37699c0ec8155d3ad1",
      "tree": "27525266a70f8bd9aadc45695ed8db220eaf2e9a",
      "parents": [
        "b85a96c0b6cb79c67e7b01b66368f2e31579d7c5"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:13 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:07 2009 -0800"
      },
      "message": "memcg: swapout refcnt fix\n\ncss\u0027s refcnt is dropped before end of following access.\nHold it until end of access.\n\nReported-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "b85a96c0b6cb79c67e7b01b66368f2e31579d7c5",
      "tree": "178005176284faef0f8a47293eaddd2885062f53",
      "parents": [
        "f9717d28d673468883df8ac34b47268719ac5a3d"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Wed Jan 07 18:08:12 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:07 2009 -0800"
      },
      "message": "memcg: memory swap controller: fix limit check\n\nThere are scatterd calls of res_counter_check_under_limit(), and most of\nthem don\u0027t take mem+swap accounting into account.\n\ndefine mem_cgroup_check_under_limit() and avoid direct use of\nres_counter_check_limit().\n\nReported-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "f9717d28d673468883df8ac34b47268719ac5a3d",
      "tree": "ecb16bf21d33c7eaa34bdfb4af3ecfe2ca11a9b6",
      "parents": [
        "2c26fdd70c3094fa3e84caf9ef434911933d5477"
      ],
      "author": {
        "name": "Nikanth Karthikesan",
        "email": "knikanth@suse.de",
        "time": "Wed Jan 07 18:08:11 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:06 2009 -0800"
      },
      "message": "memcg: check group leader fix\n\nRemove unnecessary codes (...fragments of not-implemented\nfunctionalilty...)\n\nReported-by: Nikanth Karthikesan \u003cknikanth@suse.de\u003e\nSigned-off-by: Nikanth Karthikesan \u003cknikanth@suse.de\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "2c26fdd70c3094fa3e84caf9ef434911933d5477",
      "tree": "06a3bafc12f5f8fd91d9ed1fca5ea0a632ef2004",
      "parents": [
        "887007561ae58628f03aa9046949747c04f63be8"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:10 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:06 2009 -0800"
      },
      "message": "memcg: revert gfp mask fix\n\nMy patch, memcg-fix-gfp_mask-of-callers-of-charge.patch changed gfp_mask\nof callers of charge to be GFP_HIGHUSER_MOVABLE for showing what will\nhappen at memory reclaim.\n\nBut in recent discussion, it\u0027s NACKed because it sounds ugly.\n\nThis patch is for reverting it and add some clean up to gfp_mask of\ncallers of charge.  No behavior change but need review before generating\nHUNK in deep queue.\n\nThis patch also adds explanation to meaning of gfp_mask passed to charge\nfunctions in memcontrol.h.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Hugh Dickins \u003chugh@veritas.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": "887007561ae58628f03aa9046949747c04f63be8",
      "tree": "2cc7e5b3028070303121457bc63dd155df2158b4",
      "parents": [
        "a636b327f731143ccc544b966cfd8de6cb6d72c6"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:09 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:06 2009 -0800"
      },
      "message": "memcg: fix reclaim result checks\n\ncheck_under_limit logic was wrong and this check should be against\nmem_over_limit rather than mem.\n\nReported-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Badari Pulavarty \u003cpbadari@us.ibm.com\u003e\nCc: Jan Blunck \u003cjblunck@suse.de\u003e\nCc: Hirokazu Takahashi \u003ctaka@valinux.co.jp\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a636b327f731143ccc544b966cfd8de6cb6d72c6",
      "tree": "e53b03b64e8ebca20649c2d877bc4c3ef54ec34c",
      "parents": [
        "2e4d40915fb85207fe48cfc31201824ec6d7426e"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:08 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:06 2009 -0800"
      },
      "message": "memcg: avoid unnecessary system-wide-oom-killer\n\nCurrent mmtom has new oom function as pagefault_out_of_memory().  It\u0027s\nadded for select bad process rathar than killing current.\n\nWhen memcg hit limit and calls OOM at page_fault, this handler called and\nsystem-wide-oom handling happens.  (means kernel panics if panic_on_oom is\ntrue....)\n\nTo avoid overkill, check memcg\u0027s recent behavior before starting\nsystem-wide-oom.\n\nAnd this patch also fixes to guarantee \"don\u0027t accnout against process with\nTIF_MEMDIE\".  This is necessary for smooth OOM.\n\n[akpm@linux-foundation.org: build fix]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Badari Pulavarty \u003cpbadari@us.ibm.com\u003e\nCc: Jan Blunck \u003cjblunck@suse.de\u003e\nCc: Hirokazu Takahashi \u003ctaka@valinux.co.jp\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "18f59ea7de08db2449ba99185e8d8cc30e7acac5",
      "tree": "34aa342a7984c72f7c9fbae0dd95d2fe9e20bc25",
      "parents": [
        "6d61ef409d6ba168972f7c2f8c35baaade636a58"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Jan 07 18:08:07 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:06 2009 -0800"
      },
      "message": "memcg: memory cgroup hierarchy feature selector\n\nDon\u0027t enable multiple hierarchy support by default.  This patch introduces\na features element that can be set to enable the nested depth hierarchy\nfeature.  This feature can only be enabled when the cgroup for which the\nfeature this is enabled, has no children.\n\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.co.jp\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Pavel Emelianov \u003cxemul@openvz.org\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.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": "6d61ef409d6ba168972f7c2f8c35baaade636a58",
      "tree": "b43ef8d2426ced40bd3ed4741ea8523e4496da23",
      "parents": [
        "28dbc4b6a01fb579a9441c7b81e3d3413dc452df"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Jan 07 18:08:06 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:06 2009 -0800"
      },
      "message": "memcg: memory cgroup hierarchical reclaim\n\nThis patch introduces hierarchical reclaim.  When an ancestor goes over\nits limit, the charging routine points to the parent that is above its\nlimit.  The reclaim process then starts from the last scanned child of the\nancestor and reclaims until the ancestor goes below its limit.\n\n[akpm@linux-foundation.org: coding-style fixes]\n[d-nishimura@mtf.biglobe.ne.jp: mem_cgroup_from_res_counter should handle both mem-\u003eres and mem-\u003ememsw]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.co.jp\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Pavel Emelianov \u003cxemul@openvz.org\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "28dbc4b6a01fb579a9441c7b81e3d3413dc452df",
      "tree": "c45d94be6cd243f3e677ec8279bfec87855802d0",
      "parents": [
        "52bc0d82100cd896213a9a25ec01c1ba87b939db"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Wed Jan 07 18:08:05 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:05 2009 -0800"
      },
      "message": "memcg: memory cgroup resource counters for hierarchy\n\nAdd support for building hierarchies in resource counters.  Cgroups allows\nus to build a deep hierarchy, but we currently don\u0027t link the resource\ncounters belonging to the memory controller control groups, in the same\nfashion as the corresponding cgroup entries in the cgroup hierarchy.  This\npatch provides the infrastructure for resource counters that have the same\nhiearchy as their cgroup counter parts.\n\nThese set of patches are based on the resource counter hiearchy patches\nposted by Pavel Emelianov.\n\nNOTE: Building hiearchies is expensive, deeper hierarchies imply charging\nthe all the way up to the root.  It is known that hiearchies are\nexpensive, so the user needs to be careful and aware of the trade-offs\nbefore creating very deep ones.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: YAMAMOTO Takashi \u003cyamamoto@valinux.co.jp\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Pavel Emelianov \u003cxemul@openvz.org\u003e\nCc: Dhaval Giani \u003cdhaval@linux.vnet.ibm.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": "f8d665422603ee1b8ed04dcad4242f14d623c941",
      "tree": "d872a12113998ed99ce22247091c481b9f465faa",
      "parents": [
        "08e552c69c6930d64722de3ec18c51844d06ee28"
      ],
      "author": {
        "name": "Hirokazu Takahashi",
        "email": "taka@valinux.co.jp",
        "time": "Wed Jan 07 18:08:02 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:05 2009 -0800"
      },
      "message": "memcg: add mem_cgroup_disabled()\n\nWe check mem_cgroup is disabled or not by checking\nmem_cgroup_subsys.disabled.  I think it has more references than expected,\nnow.\n\nreplacing\n   if (mem_cgroup_subsys.disabled)\nwith\n   if (mem_cgroup_disabled())\n\ngive us good look, I think.\n\n[kamezawa.hiroyu@jp.fujitsu.com: fix typo]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@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": "08e552c69c6930d64722de3ec18c51844d06ee28",
      "tree": "a744d57ed4b23401115f1033dcaac9e85d550e09",
      "parents": [
        "8c7c6e34a1256a5082d38c8e9bd1474476912715"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:01 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:05 2009 -0800"
      },
      "message": "memcg: synchronized LRU\n\nA big patch for changing memcg\u0027s LRU semantics.\n\nNow,\n  - page_cgroup is linked to mem_cgroup\u0027s its own LRU (per zone).\n\n  - LRU of page_cgroup is not synchronous with global LRU.\n\n  - page and page_cgroup is one-to-one and statically allocated.\n\n  - To find page_cgroup is on what LRU, you have to check pc-\u003emem_cgroup as\n    - lru \u003d page_cgroup_zoneinfo(pc, nid_of_pc, zid_of_pc);\n\n  - SwapCache is handled.\n\nAnd, when we handle LRU list of page_cgroup, we do following.\n\n\tpc \u003d lookup_page_cgroup(page);\n\tlock_page_cgroup(pc); .....................(1)\n\tmz \u003d page_cgroup_zoneinfo(pc);\n\tspin_lock(\u0026mz-\u003elru_lock);\n\t.....add to LRU\n\tspin_unlock(\u0026mz-\u003elru_lock);\n\tunlock_page_cgroup(pc);\n\nBut (1) is spin_lock and we have to be afraid of dead-lock with zone-\u003elru_lock.\nSo, trylock() is used at (1), now. Without (1), we can\u0027t trust \"mz\" is correct.\n\nThis is a trial to remove this dirty nesting of locks.\nThis patch changes mz-\u003elru_lock to be zone-\u003elru_lock.\nThen, above sequence will be written as\n\n        spin_lock(\u0026zone-\u003elru_lock); # in vmscan.c or swap.c via global LRU\n\tmem_cgroup_add/remove/etc_lru() {\n\t\tpc \u003d lookup_page_cgroup(page);\n\t\tmz \u003d page_cgroup_zoneinfo(pc);\n\t\tif (PageCgroupUsed(pc)) {\n\t\t\t....add to LRU\n\t\t}\n        spin_lock(\u0026zone-\u003elru_lock); # in vmscan.c or swap.c via global LRU\n\nThis is much simpler.\n(*) We\u0027re safe even if we don\u0027t take lock_page_cgroup(pc). Because..\n    1. When pc-\u003emem_cgroup can be modified.\n       - at charge.\n       - at account_move().\n    2. at charge\n       the PCG_USED bit is not set before pc-\u003emem_cgroup is fixed.\n    3. at account_move()\n       the page is isolated and not on LRU.\n\nPros.\n  - easy for maintenance.\n  - memcg can make use of laziness of pagevec.\n  - we don\u0027t have to duplicated LRU/Active/Unevictable bit in page_cgroup.\n  - LRU status of memcg will be synchronized with global LRU\u0027s one.\n  - # of locks are reduced.\n  - account_move() is simplified very much.\nCons.\n  - may increase cost of LRU rotation.\n    (no impact if memcg is not configured.)\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@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": "8c7c6e34a1256a5082d38c8e9bd1474476912715",
      "tree": "09f53c7c4bac5532a9ecbdadb4450702c744ea6f",
      "parents": [
        "27a7faa0779dd13729196c1a818c294f44bbd1ee"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:08:00 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:05 2009 -0800"
      },
      "message": "memcg: mem+swap controller core\n\nThis patch implements per cgroup limit for usage of memory+swap.  However\nthere are SwapCache, double counting of swap-cache and swap-entry is\navoided.\n\nMem+Swap controller works as following.\n  - memory usage is limited by memory.limit_in_bytes.\n  - memory + swap usage is limited by memory.memsw_limit_in_bytes.\n\nThis has following benefits.\n  - A user can limit total resource usage of mem+swap.\n\n    Without this, because memory resource controller doesn\u0027t take care of\n    usage of swap, a process can exhaust all the swap (by memory leak.)\n    We can avoid this case.\n\n    And Swap is shared resource but it cannot be reclaimed (goes back to memory)\n    until it\u0027s used. This characteristic can be trouble when the memory\n    is divided into some parts by cpuset or memcg.\n    Assume group A and group B.\n    After some application executes, the system can be..\n\n    Group A -- very large free memory space but occupy 99% of swap.\n    Group B -- under memory shortage but cannot use swap...it\u0027s nearly full.\n\n    Ability to set appropriate swap limit for each group is required.\n\nMaybe someone wonder \"why not swap but mem+swap ?\"\n\n  - The global LRU(kswapd) can swap out arbitrary pages. Swap-out means\n    to move account from memory to swap...there is no change in usage of\n    mem+swap.\n\n    In other words, when we want to limit the usage of swap without affecting\n    global LRU, mem+swap limit is better than just limiting swap.\n\nAccounting target information is stored in swap_cgroup which is\nper swap entry record.\n\nCharge is done as following.\n  map\n    - charge  page and memsw.\n\n  unmap\n    - uncharge page/memsw if not SwapCache.\n\n  swap-out (__delete_from_swap_cache)\n    - uncharge page\n    - record mem_cgroup information to swap_cgroup.\n\n  swap-in (do_swap_page)\n    - charged as page and memsw.\n      record in swap_cgroup is cleared.\n      memsw accounting is decremented.\n\n  swap-free (swap_free())\n    - if swap entry is freed, memsw is uncharged by PAGE_SIZE.\n\nThere are people work under never-swap environments and consider swap as\nsomething bad. For such people, this mem+swap controller extension is just an\noverhead.  This overhead is avoided by config or boot option.\n(see Kconfig. detail is not in this patch.)\n\nTODO:\n - maybe more optimization can be don in swap-in path. (but not very safe.)\n   But we just do simple accounting at this stage.\n\n[nishimura@mxp.nes.nec.co.jp: make resize limit hold mutex]\n[hugh@veritas.com: memswap controller core swapcache fixes]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c077719be8e9e6b55702117513d1b5f41d80404a",
      "tree": "3369f02d87390a40f5867d0482972bac506424a8",
      "parents": [
        "d13d144309d2e5a3e6ad978b16c1d0226ddc9231"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:07:57 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:05 2009 -0800"
      },
      "message": "memcg: mem+swap controller Kconfig\n\nConfig and control variable for mem+swap controller.\n\nThis patch adds CONFIG_CGROUP_MEM_RES_CTLR_SWAP\n(memory resource controller swap extension.)\n\nFor accounting swap, it\u0027s obvious that we have to use additional memory to\nremember \"who uses swap\".  This adds more overhead.  So, it\u0027s better to\noffer \"choice\" to users.  This patch adds 2 choices.\n\nThis patch adds 2 parameters to enable swap extension or not.\n  - CONFIG\n  - boot option\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@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": "d13d144309d2e5a3e6ad978b16c1d0226ddc9231",
      "tree": "37c19902b527823956db969d9428737081b2a94d",
      "parents": [
        "c1e862c1f5ad34771b6d0a528cf681e0dcad7c86"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:07:56 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:05 2009 -0800"
      },
      "message": "memcg: handle swap caches\n\nSwapCache support for memory resource controller (memcg)\n\nBefore mem+swap controller, memcg itself should handle SwapCache in proper\nway.  This is cut-out from it.\n\nIn current memcg, SwapCache is just leaked and the user can create tons of\nSwapCache.  This is a leak of account and should be handled.\n\nSwapCache accounting is done as following.\n\n  charge (anon)\n\t- charged when it\u0027s mapped.\n\t  (because of readahead, charge at add_to_swap_cache() is not sane)\n  uncharge (anon)\n\t- uncharged when it\u0027s dropped from swapcache and fully unmapped.\n\t  means it\u0027s not uncharged at unmap.\n\t  Note: delete from swap cache at swap-in is done after rmap information\n\t        is established.\n  charge (shmem)\n\t- charged at swap-in. this prevents charge at add_to_page_cache().\n\n  uncharge (shmem)\n\t- uncharged when it\u0027s dropped from swapcache and not on shmem\u0027s\n\t  radix-tree.\n\n  at migration, check against \u0027old page\u0027 is modified to handle shmem.\n\nComparing to the old version discussed (and caused troubles), we have\nadvantages of\n  - PCG_USED bit.\n  - simple migrating handling.\n\nSo, situation is much easier than several months ago, maybe.\n\n[hugh@veritas.com: memcg: handle swap caches build fix]\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nTested-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nSigned-off-by: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c1e862c1f5ad34771b6d0a528cf681e0dcad7c86",
      "tree": "e3ac7ca8cfe5ac02b0df83a4aef5f37e59d7d61f",
      "parents": [
        "c8dad2bb6307f5b00f804a686917105206a4d5c9"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:07:55 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:04 2009 -0800"
      },
      "message": "memcg: new force_empty to free pages under group\n\nBy memcg-move-all-accounts-to-parent-at-rmdir.patch, there is no leak of\nmemory usage and force_empty is removed.\n\nThis patch adds \"force_empty\" again, in reasonable manner.\n\nmemory.force_empty file works when\n\n  #echo 0 (or some) \u003e memory.force_empty\n  and have following function.\n\n  1. only works when there are no task in this cgroup.\n  2. free all page under this cgroup as much as possible.\n  3. page which cannot be freed will be moved up to parent.\n  4. Then, memcg will be empty after above echo returns.\n\nThis is much better behavior than old \"force_empty\" which just forget\nall accounts. This patch also check signal_pending() and above \"echo\"\ncan be stopped by \"Ctrl-C\".\n\n[akpm@linux-foundation.org: cleanup]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@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": "c8dad2bb6307f5b00f804a686917105206a4d5c9",
      "tree": "5f1b7dd1fc4ae5789e35e5d0dade0d37be9fe52e",
      "parents": [
        "f817ed48535ac6510ebae7c4116f24a5f9268834"
      ],
      "author": {
        "name": "Jan Blunck",
        "email": "jblunck@suse.de",
        "time": "Wed Jan 07 18:07:53 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:04 2009 -0800"
      },
      "message": "memcg: reduce size of mem_cgroup by using nr_cpu_ids\n\nAs Jan Blunck \u003cjblunck@suse.de\u003e pointed out, allocating per-cpu stat for\nmemcg to the size of NR_CPUS is not good.\n\nThis patch changes mem_cgroup\u0027s cpustat allocation not based on NR_CPUS\nbut based on nr_cpu_ids.\n\nReviewed-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@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": "f817ed48535ac6510ebae7c4116f24a5f9268834",
      "tree": "5ce9cc72c1adc0427f7efeefb3bc51b9b392ea09",
      "parents": [
        "0753b0ef3b301895234fed02bea2c099c7ff4feb"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:07:53 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:04 2009 -0800"
      },
      "message": "memcg: move all acccounting to parent at rmdir()\n\nThis patch provides a function to move account information of a page\nbetween mem_cgroups and rewrite force_empty to make use of this.\n\nThis moving of page_cgroup is done under\n - lru_lock of source/destination mem_cgroup is held.\n - lock_page_cgroup() is held.\n\nThen, a routine which touches pc-\u003emem_cgroup without lock_page_cgroup()\nshould confirm pc-\u003emem_cgroup is still valid or not.  Typical code can be\nfollowing.\n\n(while page is not under lock_page())\n\tmem \u003d pc-\u003emem_cgroup;\n\tmz \u003d page_cgroup_zoneinfo(pc)\n\tspin_lock_irqsave(\u0026mz-\u003elru_lock);\n\tif (pc-\u003emem_cgroup \u003d\u003d mem)\n\t\t...../* some list handling */\n\tspin_unlock_irqrestore(\u0026mz-\u003elru_lock);\n\nOf course, better way is\n\tlock_page_cgroup(pc);\n\t....\n\tunlock_page_cgroup(pc);\n\nBut you should confirm the nest of lock and avoid deadlock.\n\nIf you treats page_cgroup from mem_cgroup\u0027s LRU under mz-\u003elru_lock,\nyou don\u0027t have to worry about what pc-\u003emem_cgroup points to.\nmoved pages are added to head of lru, not to tail.\n\nExpected users of this routine is:\n  - force_empty (rmdir)\n  - moving tasks between cgroup (for moving account information.)\n  - hierarchy (maybe useful.)\n\nforce_empty(rmdir) uses this move_account and move pages to its parent.\nThis \"move\" will not cause OOM (I added \"oom\" parameter to try_charge().)\n\nIf the parent is busy (not enough memory), force_empty calls try_to_free_page()\nand reduce usage.\n\nPurpose of this behavior is\n  - Fix \"forget all\" behavior of force_empty and avoid leak of accounting.\n  - By \"moving first, free if necessary\", keep pages on memory as much as\n    possible.\n\nAdding a switch to change behavior of force_empty to\n  - free first, move if necessary\n  - free all, if there is mlocked/busy pages, return -EBUSY.\nis under consideration. (I\u0027ll add if someone requtests.)\n\nThis patch also removes memory.force_empty file, a brutal debug-only interface.\n\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nTested-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Paul Menage \u003cmenage@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": "01b1ae63c2270cbacfd43fea94578c17950eb548",
      "tree": "ab0275f32e8548c4413014d43cab1f52f03c9c5c",
      "parents": [
        "bced0520fe462bb94021dcabd32e99630c171be2"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:07:50 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:04 2009 -0800"
      },
      "message": "memcg: simple migration handling\n\nNow, management of \"charge\" under page migration is done under following\nmanner. (Assume migrate page contents from oldpage to newpage)\n\n before\n  - \"newpage\" is charged before migration.\n at success.\n  - \"oldpage\" is uncharged at somewhere(unmap, radix-tree-replace)\n at failure\n  - \"newpage\" is uncharged.\n  - \"oldpage\" is charged if necessary (*1)\n\nBut (*1) is not reliable....because of GFP_ATOMIC.\n\nThis patch tries to change behavior as following by charge/commit/cancel ops.\n\n before\n  - charge PAGE_SIZE (no target page)\n success\n  - commit charge against \"newpage\".\n failure\n  - commit charge against \"oldpage\".\n    (PCG_USED bit works effectively to avoid double-counting)\n  - if \"oldpage\" is obsolete, cancel charge of PAGE_SIZE.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bced0520fe462bb94021dcabd32e99630c171be2",
      "tree": "6fa234f4a25bc8231742aea13e7cc2664b0a69a6",
      "parents": [
        "7a81b88cb53e335ff7d019e6398c95792c817d93"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:07:49 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:04 2009 -0800"
      },
      "message": "memcg: fix gfp_mask of callers of charge\n\nFix misuse of gfp_kernel.\n\nNow, most of callers of mem_cgroup_charge_xxx functions uses GFP_KERNEL.\n\nI think that this is from the fact that page_cgroup *was* dynamically\nallocated.\n\nBut now, we allocate all page_cgroup at boot.  And\nmem_cgroup_try_to_free_pages() reclaim memory from GFP_HIGHUSER_MOVABLE +\nspecified GFP_RECLAIM_MASK.\n\n  * This is because we just want to reduce memory usage.\n    \"Where we should reclaim from ?\" is not a problem in memcg.\n\nThis patch modifies gfp masks to be GFP_HIGUSER_MOVABLE if possible.\n\nNote: This patch is not for fixing behavior but for showing sane information\n      in source code.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7a81b88cb53e335ff7d019e6398c95792c817d93",
      "tree": "6ebca4d509a541ac707e10f9369916549e90c0ad",
      "parents": [
        "0b82ac37b889ec881b645860da3775118effb3ca"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Jan 07 18:07:48 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 08 08:31:04 2009 -0800"
      },
      "message": "memcg: introduce charge-commit-cancel style of functions\n\nThere is a small race in do_swap_page().  When the page swapped-in is\ncharged, the mapcount can be greater than 0.  But, at the same time some\nprocess (shares it ) call unmap and make mapcount 1-\u003e0 and the page is\nuncharged.\n\n      CPUA \t\t\tCPUB\n       mapcount \u003d\u003d 1.\n   (1) charge if mapcount\u003d\u003d0     zap_pte_range()\n                                (2) mapcount 1 \u003d\u003e 0.\n\t\t\t        (3) uncharge(). (success)\n   (4) set page\u0027s rmap()\n       mapcount 0\u003d\u003e1\n\nThen, this swap page\u0027s account is leaked.\n\nFor fixing this, I added a new interface.\n  - charge\n   account to res_counter by PAGE_SIZE and try to free pages if necessary.\n  - commit\n   register page_cgroup and add to LRU if necessary.\n  - cancel\n   uncharge PAGE_SIZE because of do_swap_page failure.\n\n     CPUA\n  (1) charge (always)\n  (2) set page\u0027s rmap (mapcount \u003e 0)\n  (3) commit charge was necessary or not after set_pte().\n\nThis protocol uses PCG_USED bit on page_cgroup for avoiding over accounting.\nUsual mem_cgroup_charge_common() does charge -\u003e commit at a time.\n\nAnd this patch also adds following function to clarify all charges.\n\n  - mem_cgroup_newpage_charge() ....replacement for mem_cgroup_charge()\n\tcalled against newly allocated anon pages.\n\n  - mem_cgroup_charge_migrate_fixup()\n        called only from remove_migration_ptes().\n\twe\u0027ll have to rewrite this later.(this patch just keeps old behavior)\n\tThis function will be removed by additional patch to make migration\n\tclearer.\n\nGood for clarifying \"what we do\"\n\nThen, we have 4 following charge points.\n  - newpage\n  - swap-in\n  - add-to-cache.\n  - migration.\n\n[akpm@linux-foundation.org: add missing inline directives to stubs]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d38d2a7582012ecf53aac33683ca5c689093cf65",
      "tree": "ceb0262a1478a2fa26ffa89e26bef0a80d1bb9ca",
      "parents": [
        "2bc7273b0e3a509fb598abfc5b9fe50158b830d2"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Tue Jan 06 14:39:44 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jan 06 15:59:04 2009 -0800"
      },
      "message": "mm: make mem_cgroup_resize_limit() static\n\nSparse output following warnings.\n\nmm/memcontrol.c:782:5: warning: symbol \u0027mem_cgroup_resize_limit\u0027 was not\ndeclared.  Should it be static?\n\ncleanup here.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "94b6da5ab8293b04a300ba35c72eddfa94db8b02",
      "tree": "8ca1c8abb7934ab51657fffeb26a5f5aabd34743",
      "parents": [
        "be07c4ed4043ab8c26f222348136141335e47a2f"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Wed Oct 22 14:15:05 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Oct 23 08:55:02 2008 -0700"
      },
      "message": "memcg: fix page_cgroup allocation\n\npage_cgroup_init() is called from mem_cgroup_init(). But at this\npoint, we cannot call alloc_bootmem().\n(and this caused panic at boot.)\n\nThis patch moves page_cgroup_init() to init/main.c.\n\nTime table is following:\n\u003d\u003d\n  parse_args(). # we can trust mem_cgroup_subsys.disabled bit after this.\n  ....\n  cgroup_init_early()  # \"early\" init of cgroup.\n  ....\n  setup_arch()         # memmap is allocated.\n  ...\n  page_cgroup_init();\n  mem_init();   # we cannot call alloc_bootmem after this.\n  ....\n  cgroup_init() # mem_cgroup is initialized.\n\u003d\u003d\n\nBefore page_cgroup_init(), mem_map must be initialized. So,\nI added page_cgroup_init() to init/main.c directly.\n\n(*) maybe this is not very clean but\n    - cgroup_init_early() is too early\n    - in cgroup_init(), we have to use vmalloc instead of alloc_bootmem().\n    use of vmalloc area in x86-32 is important and we should avoid very large\n    vmalloc() in x86-32. So, we want to use alloc_bootmem() and added page_cgroup_init()\n    directly to init/main.c\n\n[akpm@linux-foundation.org: remove unneeded/bad mem_cgroup_subsys declaration]\n[akpm@linux-foundation.org: fix build]\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nTested-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "52d4b9ac0b985168009c2a57098324e67bae171f",
      "tree": "b3e3b854166930af893be90ea30a7ab0d65c59e7",
      "parents": [
        "c05555b572921c464d064d9267f7f7bc06d424fa"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Sat Oct 18 20:28:16 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:52:39 2008 -0700"
      },
      "message": "memcg: allocate all page_cgroup at boot\n\nAllocate all page_cgroup at boot and remove page_cgroup poitner from\nstruct page.  This patch adds an interface as\n\n struct page_cgroup *lookup_page_cgroup(struct page*)\n\nAll FLATMEM/DISCONTIGMEM/SPARSEMEM  and MEMORY_HOTPLUG is supported.\n\nRemove page_cgroup pointer reduces the amount of memory by\n - 4 bytes per PAGE_SIZE.\n - 8 bytes per PAGE_SIZE\nif memory controller is disabled. (even if configured.)\n\nOn usual 8GB x86-32 server, this saves 8MB of NORMAL_ZONE memory.\nOn my x86-64 server with 48GB of memory, this saves 96MB of memory.\nI think this reduction makes sense.\n\nBy pre-allocation, kmalloc/kfree in charge/uncharge are removed.\nThis means\n  - we\u0027re not necessary to be afraid of kmalloc faiulre.\n    (this can happen because of gfp_mask type.)\n  - we can avoid calling kmalloc/kfree.\n  - we can avoid allocating tons of small objects which can be fragmented.\n  - we can know what amount of memory will be used for this extra-lru handling.\n\nI added printk message as\n\n\t\"allocated %ld bytes of page_cgroup\"\n        \"please try cgroup_disable\u003dmemory option if you don\u0027t want\"\n\nmaybe enough informative for users.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c05555b572921c464d064d9267f7f7bc06d424fa",
      "tree": "48d4dbc315eeb4c851c6c484ef75bc816360d510",
      "parents": [
        "addb9efebb2ee2202d324e75b593b39868528f68"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Sat Oct 18 20:28:11 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:52:39 2008 -0700"
      },
      "message": "memcg: atomic ops for page_cgroup-\u003eflags\n\nThis patch makes page_cgroup-\u003eflags to be atomic_ops and define functions\n(and macros) to access it.\n\nBefore trying to modify memory resource controller, this atomic operation\non flags is necessary.  Most of flags in this patch is for LRU and modfied\nunder mz-\u003elru_lock but we\u0027ll add another flags which is not for LRU soon.\nFor example, we\u0027ll place LOCK bit on flags field.  We need atomic\noperation to modify LRU bit without LOCK.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "addb9efebb2ee2202d324e75b593b39868528f68",
      "tree": "0d0a6b3c4ce3e3b668adab9f463957e506e9b733",
      "parents": [
        "5b4e655e948d8b6e9b0d001616d4c9d7e7ffe924"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Sat Oct 18 20:28:10 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:52:39 2008 -0700"
      },
      "message": "memcg: optimize per-cpu statistics\n\nSome obvious optimization to memcg.\n\nI found mem_cgroup_charge_statistics() is a little big (in object) and\ndoes unnecessary address calclation.  This patch is for optimization to\nreduce the size of this function.\n\nAnd res_counter_charge() is \u0027likely\u0027 to succeed.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b7abea9630bc8ffc663a751e46680db25c4cdf8d",
      "tree": "b37d5ba073ccea31328812c74598872d49a85735",
      "parents": [
        "073e587ec2cc377867e53d8b8959738a8e16cff6"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Sat Oct 18 20:28:09 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:52:38 2008 -0700"
      },
      "message": "memcg: make page-\u003emapping NULL before uncharge\n\nThis patch tries to make page-\u003emapping to be NULL before\nmem_cgroup_uncharge_cache_page() is called.\n\n\"page-\u003emapping \u003d\u003d NULL\" is a good check for \"whether the page is still\nradix-tree or not\".  This patch also adds BUG_ON() to\nmem_cgroup_uncharge_cache_page();\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7b854121eb3e5ba0241882ff939e2c485228c9c5",
      "tree": "e553bc3b3c2be3b36cfcce5219b2ef85646ea495",
      "parents": [
        "bbfd28eee9fbd73e780b19beb3dc562befbb94fa"
      ],
      "author": {
        "name": "Lee Schermerhorn",
        "email": "Lee.Schermerhorn@hp.com",
        "time": "Sat Oct 18 20:26:40 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:50:26 2008 -0700"
      },
      "message": "Unevictable LRU Page Statistics\n\nReport unevictable pages per zone and system wide.\n\nKosaki Motohiro added support for memory controller unevictable\nstatistics.\n\n[riel@redhat.com: fix printk in show_free_areas()]\n[akpm@linux-foundation.org: fix units in /proc/vmstats]\nSigned-off-by: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nDebugged-by: Hiroshi Shimamoto \u003ch-shimamoto@ct.jp.nec.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "894bc310419ac95f4fa4142dc364401a7e607f65",
      "tree": "15d56a7333b41620016b845d2323dd06e822b621",
      "parents": [
        "8a7a8544a4f6554ec2d8048ac9f9672f442db5a2"
      ],
      "author": {
        "name": "Lee Schermerhorn",
        "email": "Lee.Schermerhorn@hp.com",
        "time": "Sat Oct 18 20:26:39 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:50:26 2008 -0700"
      },
      "message": "Unevictable LRU Infrastructure\n\nWhen the system contains lots of mlocked or otherwise unevictable pages,\nthe pageout code (kswapd) can spend lots of time scanning over these\npages.  Worse still, the presence of lots of unevictable pages can confuse\nkswapd into thinking that more aggressive pageout modes are required,\nresulting in all kinds of bad behaviour.\n\nInfrastructure to manage pages excluded from reclaim--i.e., hidden from\nvmscan.  Based on a patch by Larry Woodman of Red Hat.  Reworked to\nmaintain \"unevictable\" pages on a separate per-zone LRU list, to \"hide\"\nthem from vmscan.\n\nKosaki Motohiro added the support for the memory controller unevictable\nlru list.\n\nPages on the unevictable list have both PG_unevictable and PG_lru set.\nThus, PG_unevictable is analogous to and mutually exclusive with\nPG_active--it specifies which LRU list the page is on.\n\nThe unevictable infrastructure is enabled by a new mm Kconfig option\n[CONFIG_]UNEVICTABLE_LRU.\n\nA new function \u0027page_evictable(page, vma)\u0027 in vmscan.c tests whether or\nnot a page may be evictable.  Subsequent patches will add the various\n!evictable tests.  We\u0027ll want to keep these tests light-weight for use in\nshrink_active_list() and, possibly, the fault path.\n\nTo avoid races between tasks putting pages [back] onto an LRU list and\ntasks that might be moving the page from non-evictable to evictable state,\nthe new function \u0027putback_lru_page()\u0027 -- inverse to \u0027isolate_lru_page()\u0027\n-- tests the \"evictability\" of a page after placing it on the LRU, before\ndropping the reference.  If the page has become unevictable,\nputback_lru_page() will redo the \u0027putback\u0027, thus moving the page to the\nunevictable list.  This way, we avoid \"stranding\" evictable pages on the\nunevictable list.\n\n[akpm@linux-foundation.org: fix fallout from out-of-order merge]\n[riel@redhat.com: fix UNEVICTABLE_LRU and !PROC_PAGE_MONITOR build]\n[nishimura@mxp.nes.nec.co.jp: remove redundant mapping check]\n[kosaki.motohiro@jp.fujitsu.com: unevictable-lru-infrastructure: putback_lru_page()/unevictable page handling rework]\n[kosaki.motohiro@jp.fujitsu.com: kill unnecessary lock_page() in vmscan.c]\n[kosaki.motohiro@jp.fujitsu.com: revert migration change of unevictable lru infrastructure]\n[kosaki.motohiro@jp.fujitsu.com: revert to unevictable-lru-infrastructure-kconfig-fix.patch]\n[kosaki.motohiro@jp.fujitsu.com: restore patch failure of vmstat-unevictable-and-mlocked-pages-vm-events.patch]\nSigned-off-by: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nDebugged-by: Benjamin Kidwell \u003cbenjkidwell@yahoo.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4f98a2fee8acdb4ac84545df98cccecfd130f8db",
      "tree": "035a2937f4c3e2f7b4269412041c073ac646937c",
      "parents": [
        "b2e185384f534781fd22f5ce170b2ad26f97df70"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Sat Oct 18 20:26:32 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:50:25 2008 -0700"
      },
      "message": "vmscan: split LRU lists into anon \u0026 file sets\n\nSplit the LRU lists in two, one set for pages that are backed by real file\nsystems (\"file\") and one for pages that are backed by memory and swap\n(\"anon\").  The latter includes tmpfs.\n\nThe advantage of doing this is that the VM will not have to scan over lots\nof anonymous pages (which we generally do not want to swap out), just to\nfind the page cache pages that it should evict.\n\nThis patch has the infrastructure and a basic policy to balance how much\nwe scan the anon lists and how much we scan the file lists.  The big\npolicy changes are in separate patches.\n\n[lee.schermerhorn@hp.com: collect lru meminfo statistics from correct offset]\n[kosaki.motohiro@jp.fujitsu.com: prevent incorrect oom under split_lru]\n[kosaki.motohiro@jp.fujitsu.com: fix pagevec_move_tail() doesn\u0027t treat unevictable page]\n[hugh@veritas.com: memcg swapbacked pages active]\n[hugh@veritas.com: splitlru: BDI_CAP_SWAP_BACKED]\n[akpm@linux-foundation.org: fix /proc/vmstat units]\n[nishimura@mxp.nes.nec.co.jp: memcg: fix handling of shmem migration]\n[kosaki.motohiro@jp.fujitsu.com: adjust Quicklists field of /proc/meminfo]\n[kosaki.motohiro@jp.fujitsu.com: fix style issue of get_scan_ratio()]\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Lee Schermerhorn \u003cLee.Schermerhorn@hp.com\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b69408e88bd86b98feb7b9a38fd865e1ddb29827",
      "tree": "b19277c29fe624870ba776cc6ada59928cd2796d",
      "parents": [
        "62695a84eb8f2e718bf4dfb21700afaa7a08e0ea"
      ],
      "author": {
        "name": "Christoph Lameter",
        "email": "cl@linux-foundation.org",
        "time": "Sat Oct 18 20:26:14 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 20 08:50:25 2008 -0700"
      },
      "message": "vmscan: Use an indexed array for LRU variables\n\nCurrently we are defining explicit variables for the inactive and active\nlist.  An indexed array can be more generic and avoid repeating similar\ncode in several places in the reclaim code.\n\nWe are saving a few bytes in terms of code size:\n\nBefore:\n\n   text    data     bss     dec     hex filename\n4097753  573120 4092484 8763357  85b7dd vmlinux\n\nAfter:\n\n   text    data     bss     dec     hex filename\n4097729  573120 4092484 8763333  85b7c5 vmlinux\n\nHaving an easy way to add new lru lists may ease future work on the\nreclaim code.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nSigned-off-by: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "31a78f23bac0069004e69f98808b6988baccb6b6",
      "tree": "edca8cffb4682de6be2e79b0b8d381dbb1b70964",
      "parents": [
        "bf5cb66447e7d9f7f111c1d0ebb6d7c90ec24b4d"
      ],
      "author": {
        "name": "Balbir Singh",
        "email": "balbir@linux.vnet.ibm.com",
        "time": "Sun Sep 28 23:09:31 2008 +0100"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Sep 29 08:41:47 2008 -0700"
      },
      "message": "mm owner: fix race between swapoff and exit\n\nThere\u0027s a race between mm-\u003eowner assignment and swapoff, more easily\nseen when task slab poisoning is turned on.  The condition occurs when\ntry_to_unuse() runs in parallel with an exiting task.  A similar race\ncan occur with callers of get_task_mm(), such as /proc/\u003cpid\u003e/\u003cmmstats\u003e\nor ptrace or page migration.\n\nCPU0                                    CPU1\n                                        try_to_unuse\n                                        looks at mm \u003d task0-\u003emm\n                                        increments mm-\u003emm_users\ntask 0 exits\nmm-\u003eowner needs to be updated, but no\nnew owner is found (mm_users \u003e 1, but\nno other task has task-\u003emm \u003d task0-\u003emm)\nmm_update_next_owner() leaves\n                                        mmput(mm) decrements mm-\u003emm_users\ntask0 freed\n                                        dereferencing mm-\u003eowner fails\n\nThe fix is to notify the subsystem via mm_owner_changed callback(),\nif no new owner is found, by specifying the new task as NULL.\n\nJiri Slaby:\nmm-\u003eowner was set to NULL prior to calling cgroup_mm_owner_callbacks(), but\nmust be set after that, so as not to pass NULL as old owner causing oops.\n\nDaisuke Nishimura:\nmm_update_next_owner() may set mm-\u003eowner to NULL, but mem_cgroup_from_task()\nand its callers need to take account of this situation to avoid oops.\n\nHugh Dickins:\nLockdep warning and hang below exec_mmap() when testing these patches.\nexit_mm() up_reads mmap_sem before calling mm_update_next_owner(),\nso exec_mmap() now needs to do the same.  And with that repositioning,\nthere\u0027s now no point in mm_need_new_owner() allowing for NULL mm.\n\nReported-by: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Jiri Slaby \u003cjirislaby@gmail.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Hugh Dickins \u003chugh@veritas.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@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": "a10cebf56ca7e7c034d1b6646230c6553e478967",
      "tree": "80f92bd693b7a6079be2814b01c14649b5f82217",
      "parents": [
        "b4d19cc84e8e6838f4aa0b26b3afcdc8c7f71505"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Mon Sep 22 13:57:52 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 23 08:09:14 2008 -0700"
      },
      "message": "memcg: check under limit at shrink_usage\n\nCurrent memory cgroup(both in mainline and -mm) doesn\u0027t account swap\ncaches as memory(swap cache support is dropped temporarily now).\n\nSo try_to_free_mem_cgroup_pages doesn\u0027t reflect the count of pages that\nhave been moved to swap cache.\n\nBut this makes mem_cgroup_shrink_usage fail easily if most of the pages\nare anon/shmem, and then shmem_getpage returns -ENOMEM and the process\nwill be killed.\n\nThis patch adds res_counter_check_under_limit to avoid these cases.\n\nBTW, even if swap cache support is enabled again, if a process is moved to\nanother cgroup, which has been just made, between precharge and\nshrink_usage in shmem_getpage, shrink_usage may fail just because there is\nno pages to reclaim.\n\nSo this change would make sense anyway.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9623e078c1f4692a91531af2f639ec8aff8f0472",
      "tree": "ee2ab90d674accd462600d52b14b386df5d748a1",
      "parents": [
        "3ee1062b4ee82a56294808a065b64f4bc6781a56"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh@veritas.com",
        "time": "Tue Aug 12 15:08:41 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Aug 12 16:07:28 2008 -0700"
      },
      "message": "memcg: fix oops in mem_cgroup_shrink_usage\n\nGot an oops in mem_cgroup_shrink_usage() when testing loop over tmpfs:\nyes, of course, loop0 has no mm: other entry points check but this didn\u0027t.\n\nSigned-off-by: Hugh Dickins \u003chugh@veritas.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4ef1b0fd61333b3b81ebe29283898c6c84b15c9f",
      "tree": "673b8a3a724c7da185a3507f63843aa694b43ec8",
      "parents": [
        "55b6fd0162ace1e0f1b52c8c092565c115127ef6"
      ],
      "author": {
        "name": "Li Zefan",
        "email": "lizf@cn.fujitsu.com",
        "time": "Tue Jul 29 22:33:20 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jul 30 09:41:44 2008 -0700"
      },
      "message": "memcg: remove redundant check in move_task()\n\nIt\u0027s guaranteed by cgroup that old_cgrp !\u003d cgrp.\n\nSigned-off-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Cedric Le Goater \u003cclg@fr.ibm.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.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": "628f42355389cfb596ca3a5a5f64fb9054a2a06a",
      "tree": "a1a19788e554f4345f80ae835edcb5ad2402533a",
      "parents": [
        "12b9804419cfb1c1bdac413f6c373af3b88d154b"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Fri Jul 25 01:47:20 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jul 25 10:53:37 2008 -0700"
      },
      "message": "memcg: limit change shrink usage\n\nShrinking memory usage at limit change.\n\n[akpm@linux-foundation.org: coding-style fixes]\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Paul Menage \u003cmenage@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": "cede86acd8bd5d2205dec28db8ac86410a3a19e8"
}
