Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753126Ab2JOWde (ORCPT ); Mon, 15 Oct 2012 18:33:34 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]:58275 "EHLO mail-oa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917Ab2JOWdc (ORCPT ); Mon, 15 Oct 2012 18:33:32 -0400 MIME-Version: 1.0 In-Reply-To: <20121015144736.GI29069@dhcp22.suse.cz> References: <20121010141142.GG23011@dhcp22.suse.cz> <507BD33C.4030209@jp.fujitsu.com> <20121015094907.GE29069@dhcp22.suse.cz> <20121015144736.GI29069@dhcp22.suse.cz> From: KOSAKI Motohiro Date: Mon, 15 Oct 2012 18:33:12 -0400 X-Google-Sender-Auth: 0CuliqVcSANDxxwjtOU5tUA2Uvg Message-ID: Subject: Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0 To: Michal Hocko Cc: Kamezawa Hiroyuki , linux-mm@kvack.org, David Rientjes , Johannes Weiner , LKML 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: 2006 Lines: 48 >> I think this only correct when memcg. Even if swappiness==0, global reclaim swap >> out anon pages before oom. > > Right you are (we really do swap when the file pages are really > low)! Sorry about the confusion. I kind of became if(global_reclaim) > block blind... > > Then this really needs a memcg specific documentation fix. What about > the following? > --- > From 59a60705abd2faf9e266a4270bbf302001845588 Mon Sep 17 00:00:00 2001 > From: Michal Hocko > Date: Mon, 15 Oct 2012 11:43:56 +0200 > Subject: [PATCH] doc: describe memcg swappiness more precisely > > since fe35004f (mm: avoid swapping out with swappiness==0) memcg reclaim > stopped swapping out anon pages completely when 0 value is used. > Although this is somehow expected it hasn't been done for a really long > time this way and so it is probably better to be explicit about the > effect. Moreover global reclaim swapps out even when swappiness is 0 > to prevent from OOM killer. > > Signed-off-by: Michal Hocko > --- > Documentation/cgroups/memory.txt | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt > index c07f7b4..71c4da4 100644 > --- a/Documentation/cgroups/memory.txt > +++ b/Documentation/cgroups/memory.txt > @@ -466,6 +466,10 @@ Note: > 5.3 swappiness > > Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. > +Please note that unlike the global swappiness, memcg knob set to 0 > +really prevents from any swapping even if there is a swap storage > +available. This might lead to memcg OOM killer if there are no file > +pages to reclaim. Pretty good to me. Thank you! Acked-by: KOSAKI Motohiro -- 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/