Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751898AbbKIUa7 (ORCPT ); Mon, 9 Nov 2015 15:30:59 -0500 Received: from mail-yk0-f173.google.com ([209.85.160.173]:33676 "EHLO mail-yk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbbKIUa5 (ORCPT ); Mon, 9 Nov 2015 15:30:57 -0500 Date: Mon, 9 Nov 2015 15:30:53 -0500 From: Tejun Heo To: Vladimir Davydov Cc: Michal Hocko , Andrew Morton , Johannes Weiner , Greg Thelen , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] memcg/kmem: switch to white list policy Message-ID: <20151109203053.GD28507@mtj.duckdns.org> References: <20151109140832.GE8916@dhcp22.suse.cz> <20151109182840.GJ31308@esperanza> <20151109185401.GB28507@mtj.duckdns.org> <20151109192747.GN31308@esperanza> <20151109193253.GC28507@mtj.duckdns.org> <20151109201218.GP31308@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151109201218.GP31308@esperanza> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1074 Lines: 38 Hello, Vladimir. On Mon, Nov 09, 2015 at 11:12:18PM +0300, Vladimir Davydov wrote: > Because we won't be able to distinguish kmem_cache_alloc calls that > should be accounted from those that shouldn't. The problem is if two > caches > > A = kmem_cache_create(...) > > and > > B = kmem_cache_create(...) > > happen to be merged, A and B will point to the same kmem_cache struct. > As a result, there is no way to distinguish > > kmem_cache_alloc(A) > > which we want to account from > > kmem_cache_alloc(B) > > which we don't. Hmm.... can't we simply merge among !SLAB_ACCOUNT and SLAB_ACCOUNT kmem_caches within themselves? I don't think we'd be losing anything by restricting merge at that level. For anything to be tagged SLAB_ACCOUNT, it has to have a potential to grow enormous after all. 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/