From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with SMTP id D7E8060021B for ; Mon, 7 Dec 2009 13:41:19 -0500 (EST) Received: by fxm9 with SMTP id 9so4701017fxm.10 for ; Mon, 07 Dec 2009 10:41:16 -0800 (PST) MIME-Version: 1.0 Date: Mon, 7 Dec 2009 20:41:16 +0200 Message-ID: Subject: [BUG?] [PATCH] soft limits and root cgroups From: "Kirill A. Shutemov" Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org To: linux-mm@kvack.org Cc: KAMEZAWA Hiroyuki , Balbir Singh , Pavel Emelyanov List-ID: 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: email@kvack.org