projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f241e66
)
memcg: fix thresholds with use_hierarchy == 1
author
Kirill A. Shutemov
<
[email protected]
>
Thu, 7 Oct 2010 19:59:27 +0000
(12:59 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 7 Oct 2010 20:31:21 +0000
(13:31 -0700)
We need to check parent's thresholds if parent has use_hierarchy == 1 to
be sure that parent's threshold events will be triggered even if parent
itself is not active (no MEM_CGROUP_EVENTS).
Signed-off-by: Kirill A. Shutemov <
[email protected]
>
Reviewed-by: Daisuke Nishimura <
[email protected]
>
Acked-by: KAMEZAWA Hiroyuki <
[email protected]
>
Acked-by: Balbir Singh <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/memcontrol.c
patch
|
blob
|
history
diff --git
a/mm/memcontrol.c
b/mm/memcontrol.c
index 3eed583895a6f31eb434a252697371c7daa6bbd4..9be3cf8a5da462d4b1b4103eef61f8d5a9a6e06c 100644
(file)
--- 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)