linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [BUG?] [PATCH] soft limits and root cgroups
@ 2009-12-07 18:41 Kirill A. Shutemov
  2009-12-08  1:09 ` [cleanup][PATCH mmotm]memcg: don't call mem_cgroup_soft_limit_check() against root cgroup (Re: [BUG?] [PATCH] soft limits and root cgroups) Daisuke Nishimura
  2009-12-09  9:37 ` [BUG?] [PATCH] soft limits and root cgroups Kirill A. Shutemov
  0 siblings, 2 replies; 7+ messages in thread
From: Kirill A. Shutemov @ 2009-12-07 18:41 UTC (permalink / raw)
  To: linux-mm; +Cc: KAMEZAWA Hiroyuki, Balbir Singh, Pavel Emelyanov

Currently, mem_cgroup_update_tree() on root cgroup calls only on
uncharge, not on charge.

Is it a bug or not?

Patch to fix, if it's a bug:

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 8aa6026..6babef1 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1366,13 +1366,15 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm
                        goto nomem;
                }
        }
+
+done:
        /*
         * Insert ancestor (and ancestor's ancestors), to softlimit RB-tree.
         * if they exceeds softlimit.
         */
        if (mem_cgroup_soft_limit_check(mem))
                mem_cgroup_update_tree(mem, page);
-done:
+
        return 0;
 nomem:
        css_put(&mem->css);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-09 11:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-07 18:41 [BUG?] [PATCH] soft limits and root cgroups Kirill A. Shutemov
2009-12-08  1:09 ` [cleanup][PATCH mmotm]memcg: don't call mem_cgroup_soft_limit_check() against root cgroup (Re: [BUG?] [PATCH] soft limits and root cgroups) Daisuke Nishimura
2009-12-08  1:47   ` Balbir Singh
2009-12-08  2:13     ` Daisuke Nishimura
2009-12-09  0:24   ` KAMEZAWA Hiroyuki
2009-12-09  9:37 ` [BUG?] [PATCH] soft limits and root cgroups Kirill A. Shutemov
2009-12-09 11:30   ` Daisuke Nishimura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox