Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758784AbbKSTBr (ORCPT ); Thu, 19 Nov 2015 14:01:47 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:44672 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754766AbbKSTBp (ORCPT ); Thu, 19 Nov 2015 14:01:45 -0500 Date: Thu, 19 Nov 2015 14:01:34 -0500 From: Johannes Weiner To: Vladimir Davydov Cc: Andrew Morton , Michal Hocko , Tejun Heo , Greg Thelen , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/6] slab: add SLAB_ACCOUNT flag Message-ID: <20151119190134.GD3941@cmpxchg.org> References: <1ce23e932ea53f47a3376de90b21a9db8293bd6c.1447172835.git.vdavydov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1ce23e932ea53f47a3376de90b21a9db8293bd6c.1447172835.git.vdavydov@virtuozzo.com> 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: 1129 Lines: 23 On Tue, Nov 10, 2015 at 09:34:05PM +0300, Vladimir Davydov wrote: > Currently, if we want to account all objects of a particular kmem cache, > we have to pass __GFP_ACCOUNT to each kmem_cache_alloc call, which is > inconvenient. This patch introduces SLAB_ACCOUNT flag which if passed to > kmem_cache_create will force accounting for every allocation from this > cache even if __GFP_ACCOUNT is not passed. > > This patch does not make any of the existing caches use this flag - it > will be done later in the series. > > Note, a cache with SLAB_ACCOUNT cannot be merged with a cache w/o > SLAB_ACCOUNT, i.e. using this flag will probably reduce the number of > merged slabs even if kmem accounting is not used (only compiled in). > > Suggested-by: Tejun Heo > Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner -- 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/