Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757610Ab2F0UJd (ORCPT ); Wed, 27 Jun 2012 16:09:33 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:49433 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756761Ab2F0UJb (ORCPT ); Wed, 27 Jun 2012 16:09:31 -0400 Date: Wed, 27 Jun 2012 13:09:26 -0700 From: Tejun Heo To: David Rientjes Cc: Michal Hocko , Zhouping Liu , linux-mm@kvack.org, Li Zefan , CAI Qian , LKML , Andrew Morton Subject: Re: memcg: cat: memory.memsw.* : Operation not supported Message-ID: <20120627200926.GR15811@google.com> References: <2a1a74bf-fbb5-4a6e-b958-44fff8debff2@zmail13.collab.prod.int.phx2.redhat.com> <34bb8049-8007-496c-8ffb-11118c587124@zmail13.collab.prod.int.phx2.redhat.com> <20120627154827.GA4420@tiehlicka.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1169 Lines: 27 Hello, Michal, David. On Wed, Jun 27, 2012 at 01:04:51PM -0700, David Rientjes wrote: > I think it's a crappy solution and one that is undocumented in > Documentation/cgroups/memory.txt. If you can only enable swap accounting > at boot either via .config or the command line then these files should > never be added for CONFIG_CGROUP_MEM_RES_CTLR_SWAP=n or when > do_swap_account is 0. It's much easier to test if the feature is enabled > by checking for the presence of these files at the memcg mount point > rather than doing an open(2) and checking for -EOPNOTSUPP, which isn't > even a listed error code. I don't care how much cleaner it makes the > internal memcg code. Yeah, it's kinda ugly. Taking a step back, do we really need be able to configure out memsw? How much vmlinux bloat or runtime overhead are we talking about? I don't think config options need to be this granular. Thanks. -- tejun -- 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/