aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorH. Peter Anvin <[email protected]>2010-10-12 00:05:11 +0000
committerH. Peter Anvin <[email protected]>2010-10-12 00:05:11 +0000
commit8e4029ee3517084ae00fbfbcb51cc365d8857061 (patch)
tree3d86578dc6160781a0c2fdad461e5195e73bfafc /mm/memcontrol.c
parentmemblock: Annotate memblock functions with __init_memblock (diff)
parentx86, numa: For each node, register the memory blocks actually used (diff)
downloadkernel-8e4029ee3517084ae00fbfbcb51cc365d8857061.tar.gz
kernel-8e4029ee3517084ae00fbfbcb51cc365d8857061.zip
Merge branch 'x86/urgent' into core/memblock
Reason for merge: Forward-port urgent change to arch/x86/mm/srat_64.c to the memblock tree. Resolved Conflicts: arch/x86/mm/srat_64.c Originally-by: Yinghai Lu <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 3eed583895a6..9be3cf8a5da4 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3587,9 +3587,13 @@ unlock:
static void mem_cgroup_threshold(struct mem_cgroup *memcg)
{
- __mem_cgroup_threshold(memcg, false);
- if (do_swap_account)
- __mem_cgroup_threshold(memcg, true);
+ while (memcg) {
+ __mem_cgroup_threshold(memcg, false);
+ if (do_swap_account)
+ __mem_cgroup_threshold(memcg, true);
+
+ memcg = parent_mem_cgroup(memcg);
+ }
}
static int compare_thresholds(const void *a, const void *b)