From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753659Ab2ISOOh (ORCPT ); Wed, 19 Sep 2012 10:14:37 -0400 Received: from a194-183.smtp-out.amazonses.com ([199.255.194.183]:7847 "EHLO a194-183.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643Ab2ISOOY (ORCPT ); Wed, 19 Sep 2012 10:14:24 -0400 Date: Wed, 19 Sep 2012 14:14:23 +0000 From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Glauber Costa cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, devel@openvz.org, Tejun Heo , linux-mm@kvack.org, Suleiman Souhlal , Frederic Weisbecker , Mel Gorman , David Rientjes , Pekka Enberg Subject: Re: [PATCH v3 09/16] sl[au]b: always get the cache from its page in kfree In-Reply-To: <5059777E.8060906@parallels.com> Message-ID: <00000139dee12735-6220e641-d91c-446e-a329-ed9389eafa22-000000@email.amazonses.com> References: <1347977530-29755-1-git-send-email-glommer@parallels.com> <1347977530-29755-10-git-send-email-glommer@parallels.com> <00000139d9fe8595-8905906d-18ed-4d41-afdb-f4c632c2d50a-000000@email.amazonses.com> <5059777E.8060906@parallels.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SES-Outgoing: 199.255.194.183 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Sep 2012, Glauber Costa wrote: > > This is an extremely hot path of the kernel and you are adding significant > > processing. Check how the benchmarks are influenced by this change. > > virt_to_cache can be a bit expensive. > Would it be enough for you to have a separate code path for > !CONFIG_MEMCG_KMEM? Yes, at least add an #ifdef around this. > I don't really see another way to do it, aside from deriving the cache > from the object in our case. I am open to suggestions if you do. Rethink the whole memcg approach and find some other way to do it? This whole scheme is very intrusive and is likely to increase instability in the VM given the explosion of lru lists, duplication of slab caches and significantly more complex processing throughout the VM.