Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077Ab1BDEMV (ORCPT ); Thu, 3 Feb 2011 23:12:21 -0500 Received: from mail-px0-f174.google.com ([209.85.212.174]:38082 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751929Ab1BDEMU (ORCPT ); Thu, 3 Feb 2011 23:12:20 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=PLX0xYjATYpF6Ix9at1LlgwzhKj0uLxXYqxewbgpLmojt5ye4SafDmviKuaqy0ju2P gCS0sWJLPLbOavYAYAzcjQjFBVLYJ1SablApKOx6+4YRrwcjsJtsgXYOdXbx9En9wjY/ 9G/mzZihFsSE9l+6eoqsCWV+BnJcbGAocEWJc= MIME-Version: 1.0 In-Reply-To: <20110203125611.GC2286@cmpxchg.org> References: <1296482635-13421-1-git-send-email-hannes@cmpxchg.org> <1296482635-13421-3-git-send-email-hannes@cmpxchg.org> <20110131144131.6733aa3a.akpm@linux-foundation.org> <20110201000455.GB19534@cmpxchg.org> <20110131162448.e791f0ae.akpm@linux-foundation.org> <20110203125357.GA2286@cmpxchg.org> <20110203125611.GC2286@cmpxchg.org> Date: Fri, 4 Feb 2011 09:42:19 +0530 X-Google-Sender-Auth: 56z-wdzBmAUKi16nxmqX7M0twUE Message-ID: Subject: Re: [patch 2/2] memcg: simplify the way memory limits are checked From: Balbir Singh To: Johannes Weiner Cc: Andrew Morton , kamezawa.hiroyu@jp.fujitsu.com, nishimura@mxp.nes.nec.co.jp, minchan.kim@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1139 Lines: 25 On Thu, Feb 3, 2011 at 6:26 PM, Johannes Weiner wrote: > Since transparent huge pages, checking whether memory cgroups are > below their limits is no longer enough, but the actual amount of > chargeable space is important. > > To not have more than one limit-checking interface, replace > memory_cgroup_check_under_limit() and memory_cgroup_check_margin() > with a single memory_cgroup_margin() that returns the chargeable space > and leaves the comparison to the callsite. > > Soft limits are now checked the other way round, by using the already > existing function that returns the amount by which soft limits are > exceeded: res_counter_soft_limit_excess(). > > Also remove all the corresponding functions on the res_counter side > that are now no longer used. > > Signed-off-by: Johannes Weiner Acked-by: Balbir Singh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/