)]}'
{
  "log": [
    {
      "commit": "fce66477578d081f19aef5ea218664ff7758c33a",
      "tree": "ef8914767f7834fcd65c2f72eeee59dd2248076b",
      "parents": [
        "d817cd525589765aa5f6798734e422c867685a58"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Fri Jan 15 17:01:30 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Jan 16 12:15:39 2010 -0800"
      },
      "message": "memcg: ensure list is empty at rmdir\n\nCurrent mem_cgroup_force_empty() only ensures mem-\u003eres.usage \u003d\u003d 0 on\nsuccess.  But this doesn\u0027t guarantee memcg\u0027s LRU is really empty, because\nthere are some cases in which !PageCgrupUsed pages exist on memcg\u0027s LRU.\n\nFor example:\n- Pages can be uncharged by its owner process while they are on LRU.\n- race between mem_cgroup_add_lru_list() and __mem_cgroup_uncharge_common().\n\nSo there can be a case in which the usage is zero but some of the LRUs are not empty.\n\nOTOH, mem_cgroup_del_lru_list(), which can be called asynchronously with\nrmdir, accesses the mem_cgroup, so this access can cause a problem if it\nraces with rmdir because the mem_cgroup might have been freed by rmdir.\n\nActually, I saw a bug which seems to be caused by this race.\n\n\t[1530745.949906] BUG: unable to handle kernel NULL pointer dereference at 0000000000000230\n\t[1530745.950651] IP: [\u003cffffffff810fbc11\u003e] mem_cgroup_del_lru_list+0x30/0x80\n\t[1530745.950651] PGD 3863de067 PUD 3862c7067 PMD 0\n\t[1530745.950651] Oops: 0002 [#1] SMP\n\t[1530745.950651] last sysfs file: /sys/devices/system/cpu/cpu7/cache/index1/shared_cpu_map\n\t[1530745.950651] CPU 3\n\t[1530745.950651] Modules linked in: configs ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp nfsd nfs_acl auth_rpcgss exportfs autofs4 hidp rfcomm l2cap crc16 bluetooth lockd sunrpc ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp bnx2i cnic uio ipv6 cxgb3i cxgb3 mdio libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_multipath scsi_dh video output sbs sbshc battery ac lp kvm_intel kvm sg ide_cd_mod cdrom serio_raw tpm_tis tpm tpm_bios acpi_memhotplug button parport_pc parport rtc_cmos rtc_core rtc_lib e1000 i2c_i801 i2c_core pcspkr dm_region_hash dm_log dm_mod ata_piix libata shpchp megaraid_mbox sd_mod scsi_mod megaraid_mm ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: freq_table]\n\t[1530745.950651] Pid: 19653, comm: shmem_test_02 Tainted: G   M       2.6.32-mm1-00701-g2b04386 #3 Express5800/140Rd-4 [N8100-1065]\n\t[1530745.950651] RIP: 0010:[\u003cffffffff810fbc11\u003e]  [\u003cffffffff810fbc11\u003e] mem_cgroup_del_lru_list+0x30/0x80\n\t[1530745.950651] RSP: 0018:ffff8803863ddcb8  EFLAGS: 00010002\n\t[1530745.950651] RAX: 00000000000001e0 RBX: ffff8803abc02238 RCX: 00000000000001e0\n\t[1530745.950651] RDX: 0000000000000000 RSI: ffff88038611a000 RDI: ffff8803abc02238\n\t[1530745.950651] RBP: ffff8803863ddcc8 R08: 0000000000000002 R09: ffff8803a04c8643\n\t[1530745.950651] R10: 0000000000000000 R11: ffffffff810c7333 R12: 0000000000000000\n\t[1530745.950651] R13: ffff880000017f00 R14: 0000000000000092 R15: ffff8800179d0310\n\t[1530745.950651] FS:  0000000000000000(0000) GS:ffff880017800000(0000) knlGS:0000000000000000\n\t[1530745.950651] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n\t[1530745.950651] CR2: 0000000000000230 CR3: 0000000379d87000 CR4: 00000000000006e0\n\t[1530745.950651] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n\t[1530745.950651] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400\n\t[1530745.950651] Process shmem_test_02 (pid: 19653, threadinfo ffff8803863dc000, task ffff88038612a8a0)\n\t[1530745.950651] Stack:\n\t[1530745.950651]  ffffea00040c2fe8 0000000000000000 ffff8803863ddd98 ffffffff810c739a\n\t[1530745.950651] \u003c0\u003e 00000000863ddd18 000000000000000c 0000000000000000 0000000000000000\n\t[1530745.950651] \u003c0\u003e 0000000000000002 0000000000000000 ffff8803863ddd68 0000000000000046\n\t[1530745.950651] Call Trace:\n\t[1530745.950651]  [\u003cffffffff810c739a\u003e] release_pages+0x142/0x1e7\n\t[1530745.950651]  [\u003cffffffff810c778f\u003e] ? pagevec_move_tail+0x6e/0x112\n\t[1530745.950651]  [\u003cffffffff810c781e\u003e] pagevec_move_tail+0xfd/0x112\n\t[1530745.950651]  [\u003cffffffff810c78a9\u003e] lru_add_drain+0x76/0x94\n\t[1530745.950651]  [\u003cffffffff810dba0c\u003e] exit_mmap+0x6e/0x145\n\t[1530745.950651]  [\u003cffffffff8103f52d\u003e] mmput+0x5e/0xcf\n\t[1530745.950651]  [\u003cffffffff81043ea8\u003e] exit_mm+0x11c/0x129\n\t[1530745.950651]  [\u003cffffffff8108fb29\u003e] ? audit_free+0x196/0x1c9\n\t[1530745.950651]  [\u003cffffffff81045353\u003e] do_exit+0x1f5/0x6b7\n\t[1530745.950651]  [\u003cffffffff8106133f\u003e] ? up_read+0x2b/0x2f\n\t[1530745.950651]  [\u003cffffffff8137d187\u003e] ? lockdep_sys_exit_thunk+0x35/0x67\n\t[1530745.950651]  [\u003cffffffff81045898\u003e] do_group_exit+0x83/0xb0\n\t[1530745.950651]  [\u003cffffffff810458dc\u003e] sys_exit_group+0x17/0x1b\n\t[1530745.950651]  [\u003cffffffff81002c1b\u003e] system_call_fastpath+0x16/0x1b\n\t[1530745.950651] Code: 54 53 0f 1f 44 00 00 83 3d cc 29 7c 00 00 41 89 f4 75 63 eb 4e 48 83 7b 08 00 75 04 0f 0b eb fe 48 89 df e8 18 f3 ff ff 44 89 e2 \u003c48\u003e ff 4c d0 50 48 8b 05 2b 2d 7c 00 48 39 43 08 74 39 48 8b 4b\n\t[1530745.950651] RIP  [\u003cffffffff810fbc11\u003e] mem_cgroup_del_lru_list+0x30/0x80\n\t[1530745.950651]  RSP \u003cffff8803863ddcb8\u003e\n\t[1530745.950651] CR2: 0000000000000230\n\t[1530745.950651] ---[ end trace c3419c1bb8acc34f ]---\n\t[1530745.950651] Fixing recursive fault but reboot is needed!\n\nThe problem here is pages on LRU may contain pointer to stale memcg.  To\nmake res-\u003eusage to be 0, all pages on memcg must be uncharged or moved to\nanother(parent) memcg.  Moved page_cgroup have already removed from\noriginal LRU, but uncharged page_cgroup contains pointer to memcg withou\nPCG_USED bit.  (This asynchronous LRU work is for improving performance.)\nIf PCG_USED bit is not set, page_cgroup will never be added to memcg\u0027s\nLRU.  So, about pages not on LRU, they never access stale pointer.  Then,\nwhat we have to take care of is page_cgroup _on_ LRU list.  This patch\nfixes this problem by making mem_cgroup_force_empty() visit all LRUs\nbefore exiting its loop and guarantee there are no pages on its LRU.\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: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d4220f987cf473c65a342ca69e3eb13dea919a49",
      "tree": "dbb004a9c805d6de3f6e3955398fee1084a29f16",
      "parents": [
        "61cf693159d6a968a7014e24905143f71ed8ddcf",
        "f2c03debdfb387fa2e35cac6382779072b8b9209"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 12:36:49 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 12:36:49 2009 -0800"
      },
      "message": "Merge branch \u0027hwpoison\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6\n\n* \u0027hwpoison\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (34 commits)\n  HWPOISON: Remove stray phrase in a comment\n  HWPOISON: Try to allocate migration page on the same node\n  HWPOISON: Don\u0027t do early filtering if filter is disabled\n  HWPOISON: Add a madvise() injector for soft page offlining\n  HWPOISON: Add soft page offline support\n  HWPOISON: Undefine short-hand macros after use to avoid namespace conflict\n  HWPOISON: Use new shake_page in memory_failure\n  HWPOISON: Use correct name for MADV_HWPOISON in documentation\n  HWPOISON: mention HWPoison in Kconfig entry\n  HWPOISON: Use get_user_page_fast in hwpoison madvise\n  HWPOISON: add an interface to switch off/on all the page filters\n  HWPOISON: add memory cgroup filter\n  memcg: add accessor to mem_cgroup.css\n  memcg: rename and export try_get_mem_cgroup_from_page()\n  HWPOISON: add page flags filter\n  mm: export stable page flags\n  HWPOISON: limit hwpoison injector to known page types\n  HWPOISON: add fs/device filters\n  HWPOISON: return 0 to indicate success reliably\n  HWPOISON: make semantics of IGNORED/DELAYED clear\n  ...\n"
    },
    {
      "commit": "aa20d489ceb024f91aae084ee00c47fc6a12255c",
      "tree": "1fc8e826114b1020d0e938d3b915e8a2016ded57",
      "parents": [
        "9ab322caa347c4b580bcaf08f2253ea4cbd9e9ad"
      ],
      "author": {
        "name": "Bob Liu",
        "email": "lliubbo@gmail.com",
        "time": "Tue Dec 15 16:47:14 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:08 2009 -0800"
      },
      "message": "memcg: code clean, remove unused variable in mem_cgroup_resize_limit()\n\nVariable `progress\u0027 isn\u0027t used in mem_cgroup_resize_limit() any more.\nRemove it.\n\n[akpm@linux-foundation.org: cleanup]\nSigned-off-by: Bob Liu \u003clliubbo@gmail.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\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": "9ab322caa347c4b580bcaf08f2253ea4cbd9e9ad",
      "tree": "3d3344e4ab05fc1047465b439b5cc7f000c44ca2",
      "parents": [
        "d31f56dbf8bafaacb0c617f9a6f137498d5c7aed"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Tue Dec 15 16:47:13 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: remove memcg_tasklist\n\nmemcg_tasklist was introduced at commit 7f4d454d(memcg: avoid deadlock\ncaused by race between oom and cpuset_attach) instead of cgroup_mutex to\nfix a deadlock problem.  The cgroup_mutex, which was removed by the\ncommit, in mem_cgroup_out_of_memory() was originally introduced at commit\nc7ba5c9e (Memory controller: OOM handling).\n\nIIUC, the intention of this cgroup_mutex was to prevent task move during\nselect_bad_process() so that situations like below can be avoided.\n\n  Assume cgroup \"foo\" has exceeded its limit and is about to trigger oom.\n  1. Process A, which has been in cgroup \"baa\" and uses large memory, is just\n     moved to cgroup \"foo\". Process A can be the candidates for being killed.\n  2. Process B, which has been in cgroup \"foo\" and uses large memory, is just\n     moved from cgroup \"foo\". Process B can be excluded from the candidates for\n     being killed.\n\nBut these race window exists anyway even if we hold a lock, because\n__mem_cgroup_try_charge() decides wether it should trigger oom or not\noutside of the lock.  So the original cgroup_mutex in\nmem_cgroup_out_of_memory and thus current memcg_tasklist has no use.  And\nIMHO, those races are not so critical for users.\n\nThis patch removes it and make codes simpler.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d31f56dbf8bafaacb0c617f9a6f137498d5c7aed",
      "tree": "88d095c2208d27362e58ff7431407040ead9d848",
      "parents": [
        "57f9fd7d25ac9a0d7e3a4ced580e780ab4524e3b"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Tue Dec 15 16:47:12 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: avoid oom-killing innocent task in case of use_hierarchy\n\ntask_in_mem_cgroup(), which is called by select_bad_process() to check\nwhether a task can be a candidate for being oom-killed from memcg\u0027s limit,\nchecks \"curr-\u003euse_hierarchy\"(\"curr\" is the mem_cgroup the task belongs\nto).\n\nBut this check return true(it\u0027s false positive) when:\n\n\t\u003csome path\u003e/aa\t\tuse_hierarchy \u003d\u003d 0\t\u003c- hitting limit\n\t  \u003csome path\u003e/aa/00\tuse_hierarchy \u003d\u003d 1\t\u003c- the task belongs to\n\nThis leads to killing an innocent task in aa/00.  This patch is a fix for\nthis bug.  And this patch also fixes the arg for\nmem_cgroup_print_oom_info().  We should print information of mem_cgroup\nwhich the task being killed, not current, belongs to.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "57f9fd7d25ac9a0d7e3a4ced580e780ab4524e3b",
      "tree": "ff95e62e7326ba7e77903f7f767e9650c0d9b3dd",
      "parents": [
        "a3032a2c15c6967f9f0c0c28375b1a5c833a3112"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Tue Dec 15 16:47:11 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: cleanup mem_cgroup_move_parent()\n\nmem_cgroup_move_parent() calls try_charge first and cancel_charge on\nfailure.  IMHO, charge/uncharge(especially charge) is high cost operation,\nso we should avoid it as far as possible.\n\nThis patch tries to delay try_charge in mem_cgroup_move_parent() by\nre-ordering checks it does.\n\nAnd this patch renames mem_cgroup_move_account() to\n__mem_cgroup_move_account(), changes the return value of\n__mem_cgroup_move_account() from int to void, and adds a new\nwrapper(mem_cgroup_move_account()), which checks whether a @pc is valid\nfor moving account and calls __mem_cgroup_move_account().\n\nThis patch removes the last caller of trylock_page_cgroup(), so removes\nits definition 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: 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": "a3032a2c15c6967f9f0c0c28375b1a5c833a3112",
      "tree": "32d279856032fd9d84ebd5d6746b2bd382baaac9",
      "parents": [
        "d8046582d5ee24448800e71c6933fdb6813aa062"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Tue Dec 15 16:47:10 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: add mem_cgroup_cancel_charge()\n\nThere are some places calling both res_counter_uncharge() and css_put() to\ncancel the charge and the refcnt we have got by mem_cgroup_tyr_charge().\n\nThis patch introduces mem_cgroup_cancel_charge() and call it in those\nplaces.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\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": "d8046582d5ee24448800e71c6933fdb6813aa062",
      "tree": "857d014a850deee5ddb6da6550d81ce0122f03b1",
      "parents": [
        "cdec2e4265dfa09490601b00aeabd8a8d4af30f0"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Dec 15 16:47:09 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: make memcg\u0027s file mapped consistent with global VM\n\nIn global VM, FILE_MAPPED is used but memcg uses MAPPED_FILE.  This makes\ngrep difficult.  Replace memcg\u0027s MAPPED_FILE with FILE_MAPPED\n\nAnd in global VM, mapped shared memory is accounted into FILE_MAPPED.\nBut memcg doesn\u0027t. fix it.\nNote:\n  page_is_file_cache() just checks SwapBacked or not.\n  So, we need to check PageAnon.\n\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "cdec2e4265dfa09490601b00aeabd8a8d4af30f0",
      "tree": "d120759b91e3e24d33f3d76010c9da990f115706",
      "parents": [
        "569b846df54ffb2827b83ce3244c5f032394cba4"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Dec 15 16:47:08 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: coalesce charging via percpu storage\n\nThis is a patch for coalescing access to res_counter at charging by percpu\ncaching.  At charge, memcg charges 64pages and remember it in percpu\ncache.  Because it\u0027s cache, drain/flush if necessary.\n\nThis version uses public percpu area.\n 2 benefits for using public percpu area.\n 1. Sum of stocked charge in the system is limited to # of cpus\n    not to the number of memcg. This shows better synchonization.\n 2. drain code for flush/cpuhotplug is very easy (and quick)\n\nThe most important point of this patch is that we never touch res_counter\nin fast path. The res_counter is system-wide shared counter which is modified\nvery frequently. We shouldn\u0027t touch it as far as we can for avoiding\nfalse sharing.\n\nOn x86-64 8cpu server, I tested overheads of memcg at page fault by\nrunning a program which does map/fault/unmap in a loop. Running\na task per a cpu by taskset and see sum of the number of page faults\nin 60secs.\n\n[without memcg config]\n  40156968  page-faults              #      0.085 M/sec   ( +-   0.046% )\n  27.67 cache-miss/faults\n\n[root cgroup]\n  36659599  page-faults              #      0.077 M/sec   ( +-   0.247% )\n  31.58 cache miss/faults\n\n[in a child cgroup]\n  18444157  page-faults              #      0.039 M/sec   ( +-   0.133% )\n  69.96 cache miss/faults\n\n[ + coalescing uncharge patch]\n  27133719  page-faults              #      0.057 M/sec   ( +-   0.155% )\n  47.16 cache miss/faults\n\n[ + coalescing uncharge patch + this patch ]\n  34224709  page-faults              #      0.072 M/sec   ( +-   0.173% )\n  34.69 cache miss/faults\n\nChangelog (since Oct/2):\n  - updated comments\n  - replaced get_cpu_var() with __get_cpu_var() if possible.\n  - removed mutex for system-wide drain. adds a counter instead of it.\n  - removed CONFIG_HOTPLUG_CPU\n\nChangelog (old):\n  - rebased onto the latest mmotm\n  - moved charge size check before __GFP_WAIT check for avoiding unnecesary\n  - added asynchronous flush routine.\n  - fixed bugs pointed out by Nishimura-san.\n\n[akpm@linux-foundation.org: tweak comments]\n[nishimura@mxp.nes.nec.co.jp: don\u0027t do INIT_WORK() repeatedly against the same work_struct]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.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": "569b846df54ffb2827b83ce3244c5f032394cba4",
      "tree": "77c5d373a5edf97710fab8777912971b99e84828",
      "parents": [
        "cd9b45b78a61e8df250e69385c74e729e5b66abf"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Tue Dec 15 16:47:03 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: coalesce uncharge during unmap/truncate\n\nIn massive parallel enviroment, res_counter can be a performance\nbottleneck.  One strong techinque to reduce lock contention is reducing\ncalls by coalescing some amount of calls into one.\n\nConsidering charge/uncharge chatacteristic,\n\t- charge is done one by one via demand-paging.\n\t- uncharge is done by\n\t\t- in chunk at munmap, truncate, exit, execve...\n\t\t- one by one via vmscan/paging.\n\nIt seems we have a chance to coalesce uncharges for improving scalability\nat unmap/truncation.\n\nThis patch is a for coalescing uncharge.  For avoiding scattering memcg\u0027s\nstructure to functions under /mm, this patch adds memcg batch uncharge\ninformation to the task.  A reason for per-task batching is for making use\nof caller\u0027s context information.  We do batched uncharge (deleyed\nuncharge) when truncation/unmap occurs but do direct uncharge when\nuncharge is called by memory reclaim (vmscan.c).\n\nThe degree of coalescing depends on callers\n  - at invalidate/trucate... pagevec size\n  - at unmap ....ZAP_BLOCK_SIZE\n(memory itself will be freed in this degree.)\nThen, we\u0027ll not coalescing too much.\n\nOn x86-64 8cpu server, I tested overheads of memcg at page fault by\nrunning a program which does map/fault/unmap in a loop. Running\na task per a cpu by taskset and see sum of the number of page faults\nin 60secs.\n\n[without memcg config]\n  40156968  page-faults              #      0.085 M/sec   ( +-   0.046% )\n  27.67 cache-miss/faults\n[root cgroup]\n  36659599  page-faults              #      0.077 M/sec   ( +-   0.247% )\n  31.58 miss/faults\n[in a child cgroup]\n  18444157  page-faults              #      0.039 M/sec   ( +-   0.133% )\n  69.96 miss/faults\n[child with this patch]\n  27133719  page-faults              #      0.057 M/sec   ( +-   0.155% )\n  47.16 miss/faults\n\nWe can see some amounts of improvement.\n(root cgroup doesn\u0027t affected by this patch)\nAnother patch for \"charge\" will follow this and above will be improved more.\n\nChangelog(since 2009/10/02):\n - renamed filed of memcg_batch (as pages to bytes, memsw to memsw_bytes)\n - some clean up and commentary/description updates.\n - added initialize code to copy_process(). (possible bug fix)\n\nChangelog(old):\n - fixed !CONFIG_MEM_CGROUP case.\n - rebased onto the latest mmotm + softlimit fix patches.\n - unified patch for callers\n - added commetns.\n - make -\u003edo_batch as bool.\n - removed css_get() at el. We don\u0027t need it.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "cd9b45b78a61e8df250e69385c74e729e5b66abf",
      "tree": "8cb92363dd4b936814de9a0823016889b3441fde",
      "parents": [
        "6be4b78993498c253e99b12c4d0f7684a36955e2"
      ],
      "author": {
        "name": "Kirill A. Shutemov",
        "email": "kirill@shutemov.name",
        "time": "Tue Dec 15 16:47:01 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 07:20:07 2009 -0800"
      },
      "message": "memcg: fix memory.memsw.usage_in_bytes for root cgroup\n\nA memory cgroup has a memory.memsw.usage_in_bytes file.  It shows the sum\nof the usage of pages and swapents in the cgroup.  Presently the root\ncgroup\u0027s memsw.usage_in_bytes shows the wrong value - the number of\nswapents are not added.\n\nSo take MEM_CGROUP_STAT_SWAPOUT into account.\n\nSigned-off-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nReviewed-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d324236b3333e87c8825b35f2104184734020d35",
      "tree": "e8ad6b50e50f975b692cc6a15d5812a51d0047ad",
      "parents": [
        "e42d9d5d47961fb5db0be65b56dd52fe7b2421f1"
      ],
      "author": {
        "name": "Wu Fengguang",
        "email": "fengguang.wu@intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "committer": {
        "name": "Andi Kleen",
        "email": "ak@linux.intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "message": "memcg: add accessor to mem_cgroup.css\n\nSo that an outside user can free the reference count grabbed by\ntry_get_mem_cgroup_from_page().\n\nCC: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCC: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCC: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCC: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andi Kleen \u003cak@linux.intel.com\u003e\n"
    },
    {
      "commit": "e42d9d5d47961fb5db0be65b56dd52fe7b2421f1",
      "tree": "6a898c8d43ee0533581076342b9a7a97cca0509e",
      "parents": [
        "478c5ffc0b50527bd2390f2daa46cc16276b8413"
      ],
      "author": {
        "name": "Wu Fengguang",
        "email": "fengguang.wu@intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "committer": {
        "name": "Andi Kleen",
        "email": "ak@linux.intel.com",
        "time": "Wed Dec 16 12:19:59 2009 +0100"
      },
      "message": "memcg: rename and export try_get_mem_cgroup_from_page()\n\nSo that the hwpoison injector can get mem_cgroup for arbitrary page\nand thus know whether it is owned by some mem_cgroup task(s).\n\n[AK: Merged with latest git tree]\n\nCC: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCC: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCC: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCC: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andi Kleen \u003cak@linux.intel.com\u003e\n"
    },
    {
      "commit": "407f9c8b0889ced1dbe2f9157e4e60c61329d5c9",
      "tree": "30c0c9ad224a73de621bc23909cd89cd81eda1aa",
      "parents": [
        "80e148226028257ec0a1909d99b2c40d0ffe17f2"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Dec 14 17:59:30 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 15 08:53:19 2009 -0800"
      },
      "message": "ksm: mem cgroup charge swapin copy\n\nBut ksm swapping does require one small change in mem cgroup handling.\nWhen do_swap_page()\u0027s call to ksm_might_need_to_copy() does indeed\nsubstitute a duplicate page to accommodate a different anon_vma (or a the\n!PageSwapCache check in mem_cgroup_try_charge_swapin().\n\nThat was returning success without charging, on the assumption that\npte_same() would fail after, which is not the case here.  Originally I\nproposed that success, so that an unshrinkable mem cgroup at its limit\nwould not fail unnecessarily; but that\u0027s a minor point, and there are\nplenty of other places where we may fail an overallocation which might\nlater prove unnecessary.  So just go ahead and do what all the other\nexceptions do: proceed to charge current mm.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Chris Wright \u003cchrisw@redhat.com\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": "af901ca181d92aac3a7dc265144a9081a86d8f39",
      "tree": "380054af22521144fbe1364c3bcd55ad24c9bde4",
      "parents": [
        "972b94ffb90ea6d20c589d9a47215df103388ddd"
      ],
      "author": {
        "name": "André Goddard Rosa",
        "email": "andre.goddard@gmail.com",
        "time": "Sat Nov 14 13:09:05 2009 -0200"
      },
      "committer": {
        "name": "Jiri Kosina",
        "email": "jkosina@suse.cz",
        "time": "Fri Dec 04 15:39:55 2009 +0100"
      },
      "message": "tree-wide: fix assorted typos all over the place\n\nThat is \"success\", \"unknown\", \"through\", \"performance\", \"[re|un]mapping\"\n, \"access\", \"default\", \"reasonable\", \"[con]currently\", \"temperature\"\n, \"channel\", \"[un]used\", \"application\", \"example\",\"hierarchy\", \"therefore\"\n, \"[over|under]flow\", \"contiguous\", \"threshold\", \"enough\" and others.\n\nSigned-off-by: André Goddard Rosa \u003candre.goddard@gmail.com\u003e\nSigned-off-by: Jiri Kosina \u003cjkosina@suse.cz\u003e\n"
    },
    {
      "commit": "21ae2956ce289f61f11863cc67080f9a28101ae0",
      "tree": "c6f66176b5f151a1326879de334a94201eeb0f26",
      "parents": [
        "0e6779bbcb78b434efdc84fff1809e342684d6b3"
      ],
      "author": {
        "name": "Uwe Kleine-König",
        "email": "u.kleine-koenig@pengutronix.de",
        "time": "Wed Oct 07 15:21:09 2009 +0200"
      },
      "committer": {
        "name": "Jiri Kosina",
        "email": "jkosina@suse.cz",
        "time": "Mon Nov 09 09:40:57 2009 +0100"
      },
      "message": "tree-wide: fix typos \"aquire\" -\u003e \"acquire\", \"cumsumed\" -\u003e \"consumed\"\n\nThis patch was generated by\n\n\tgit grep -E -i -l \u0027[Aa]quire\u0027 | xargs -r perl -p -i -e \u0027s/([Aa])quire/$1cquire/\u0027\n\nand the cumsumed was found by checking the diff for aquire.\n\nSigned-off-by: Uwe Kleine-König \u003cu.kleine-koenig@pengutronix.de\u003e\nSigned-off-by: Jiri Kosina \u003cjkosina@suse.cz\u003e\n"
    },
    {
      "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"
    }
  ],
  "next": "7a81b88cb53e335ff7d019e6398c95792c817d93"
}
