From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by kanga.kvack.org (Postfix) with ESMTP id 7F2906B0078 for ; Sun, 2 Nov 2014 23:22:50 -0500 (EST) Received: by mail-pa0-f47.google.com with SMTP id kx10so11314949pab.6 for ; Sun, 02 Nov 2014 20:22:50 -0800 (PST) Received: from shards.monkeyblade.net (shards.monkeyblade.net. [2001:4f8:3:36:211:85ff:fe63:a549]) by mx.google.com with ESMTP id oc1si11345250pdb.223.2014.11.02.20.22.48 for ; Sun, 02 Nov 2014 20:22:49 -0800 (PST) Date: Sun, 02 Nov 2014 23:22:45 -0500 (EST) Message-Id: <20141102.232245.1502900027200657150.davem@davemloft.net> Subject: Re: [patch 1/3] mm: embed the memcg pointer directly into struct page From: David Miller In-Reply-To: <1414898156-4741-1-git-send-email-hannes@cmpxchg.org> References: <1414898156-4741-1-git-send-email-hannes@cmpxchg.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: hannes@cmpxchg.org Cc: akpm@linux-foundation.org, mhocko@suse.cz, vdavydov@parallels.com, tj@kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org From: Johannes Weiner Date: Sat, 1 Nov 2014 23:15:54 -0400 > Memory cgroups used to have 5 per-page pointers. To allow users to > disable that amount of overhead during runtime, those pointers were > allocated in a separate array, with a translation layer between them > and struct page. > > There is now only one page pointer remaining: the memcg pointer, that > indicates which cgroup the page is associated with when charged. The > complexity of runtime allocation and the runtime translation overhead > is no longer justified to save that *potential* 0.19% of memory. With > CONFIG_SLUB, page->mem_cgroup actually sits in the doubleword padding > after the page->private member and doesn't even increase struct page, > and then this patch actually saves space. Remaining users that care > can still compile their kernels without CONFIG_MEMCG. > > text data bss dec hex filename > 8828345 1725264 983040 11536649 b00909 vmlinux.old > 8827425 1725264 966656 11519345 afc571 vmlinux.new > > Signed-off-by: Johannes Weiner Looks great: Acked-by: David S. Miller -- 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