linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: linux-mm@kvack.org
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Pavel Emelyanov <xemul@openvz.org>
Subject: [BUG?] [PATCH] soft limits and root cgroups
Date: Mon, 7 Dec 2009 20:41:16 +0200	[thread overview]
Message-ID: <cc557aab0912071041j5c5731dbj9fd669ef26e6f2ae@mail.gmail.com> (raw)

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>

             reply	other threads:[~2009-12-07 18:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 18:41 Kirill A. Shutemov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc557aab0912071041j5c5731dbj9fd669ef26e6f2ae@mail.gmail.com \
    --to=kirill@shutemov.name \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox