memcontrol.c (4eaf431f6f71bbed40a4c733ffe93a7e8cedf9d9) memcontrol.c (b93b016313b3ba8003c3b8bb71f569af91f19fc7)
1/* memcontrol.c - Memory Controller
2 *
3 * Copyright IBM Corporation, 2007
4 * Author Balbir Singh <balbir@linux.vnet.ibm.com>
5 *
6 * Copyright 2007 OpenVZ SWsoft Inc
7 * Author: Pavel Emelianov <xemul@openvz.org>
8 *

--- 5960 unchanged lines hidden (view full) ---

5969 if (memcg != swap_memcg) {
5970 if (!mem_cgroup_is_root(swap_memcg))
5971 page_counter_charge(&swap_memcg->memsw, nr_entries);
5972 page_counter_uncharge(&memcg->memsw, nr_entries);
5973 }
5974
5975 /*
5976 * Interrupts should be disabled here because the caller holds the
1/* memcontrol.c - Memory Controller
2 *
3 * Copyright IBM Corporation, 2007
4 * Author Balbir Singh <balbir@linux.vnet.ibm.com>
5 *
6 * Copyright 2007 OpenVZ SWsoft Inc
7 * Author: Pavel Emelianov <xemul@openvz.org>
8 *

--- 5960 unchanged lines hidden (view full) ---

5969 if (memcg != swap_memcg) {
5970 if (!mem_cgroup_is_root(swap_memcg))
5971 page_counter_charge(&swap_memcg->memsw, nr_entries);
5972 page_counter_uncharge(&memcg->memsw, nr_entries);
5973 }
5974
5975 /*
5976 * Interrupts should be disabled here because the caller holds the
5977 * mapping->tree_lock lock which is taken with interrupts-off. It is
5977 * i_pages lock which is taken with interrupts-off. It is
5978 * important here to have the interrupts disabled because it is the
5978 * important here to have the interrupts disabled because it is the
5979 * only synchronisation we have for udpating the per-CPU variables.
5979 * only synchronisation we have for updating the per-CPU variables.
5980 */
5981 VM_BUG_ON(!irqs_disabled());
5982 mem_cgroup_charge_statistics(memcg, page, PageTransHuge(page),
5983 -nr_entries);
5984 memcg_check_events(memcg, page);
5985
5986 if (!mem_cgroup_is_root(memcg))
5987 css_put_many(&memcg->css, nr_entries);

--- 224 unchanged lines hidden ---
5980 */
5981 VM_BUG_ON(!irqs_disabled());
5982 mem_cgroup_charge_statistics(memcg, page, PageTransHuge(page),
5983 -nr_entries);
5984 memcg_check_events(memcg, page);
5985
5986 if (!mem_cgroup_is_root(memcg))
5987 css_put_many(&memcg->css, nr_entries);

--- 224 unchanged lines hidden ---