From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v3 03/16] slab: Ignore the cflgs bit in cache creation Date: Fri, 21 Sep 2012 10:33:52 -0700 Message-ID: <20120921173352.GE7264@google.com> References: <1347977530-29755-1-git-send-email-glommer@parallels.com> <1347977530-29755-4-git-send-email-glommer@parallels.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=P1j2zFXeAxQPy2AkFIYCXKKs6qSXZJ+LEee57ihFOqA=; b=IA0qRD/mLRzm9AFi3zWiqZ6N9/Lt3FUGcBYQwtJz/OEoPJDxxojewc20q3Oc501IUZ scxAJ9clS5A6Peptk2rY2d65XZ07jv9laRM1l3ouJtMmYeQgot9nFTgFzg1fPT9ndrd9 m8vutgiCxw8LU4N+bmKo4UQet7U8bAHoIgmVRnmFg+nplgWA0bLo7IzHhkB5eoxnMSfJ DEwJHCbg2yOLSV6flTW/50swcx/WV0ksitq4izwhCtWwXTovPBJmOGmOPHE500Blos/z v2sFRUCBqc6tDzZVqHM0CFXqI0PrNHNVN6QZkBgTW/YbjMRsu4nxOnH2W8C8cbj/uvhl iJ8A== Content-Disposition: inline In-Reply-To: <1347977530-29755-4-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Glauber Costa Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org, devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Suleiman Souhlal , Frederic Weisbecker , Mel Gorman , David Rientjes , Christoph Lameter , Pekka Enberg On Tue, Sep 18, 2012 at 06:11:57PM +0400, Glauber Costa wrote: > No cache should ever pass that as a creation flag, since this bit is > used to mark an internal decision of the slab about object placement. We > can just ignore this bit if it happens to be passed (such as when > duplicating a cache in the kmem memcg patches) > > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: David Rientjes > --- > mm/slab.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/slab.c b/mm/slab.c > index a7ed60f..ccf496c 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -2373,6 +2373,7 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags) > int err; > size_t size = cachep->size; > > + flags &= ~CFLGS_OFF_SLAB; A comment explaining why this is necessary wouldn't hurt. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx120.postini.com [74.125.245.120]) by kanga.kvack.org (Postfix) with SMTP id 13E246B0044 for ; Fri, 21 Sep 2012 13:33:58 -0400 (EDT) Received: by pbbro12 with SMTP id ro12so8783749pbb.14 for ; Fri, 21 Sep 2012 10:33:57 -0700 (PDT) Date: Fri, 21 Sep 2012 10:33:52 -0700 From: Tejun Heo Subject: Re: [PATCH v3 03/16] slab: Ignore the cflgs bit in cache creation Message-ID: <20120921173352.GE7264@google.com> References: <1347977530-29755-1-git-send-email-glommer@parallels.com> <1347977530-29755-4-git-send-email-glommer@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1347977530-29755-4-git-send-email-glommer@parallels.com> Sender: owner-linux-mm@kvack.org List-ID: To: Glauber Costa Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, devel@openvz.org, linux-mm@kvack.org, Suleiman Souhlal , Frederic Weisbecker , Mel Gorman , David Rientjes , Christoph Lameter , Pekka Enberg On Tue, Sep 18, 2012 at 06:11:57PM +0400, Glauber Costa wrote: > No cache should ever pass that as a creation flag, since this bit is > used to mark an internal decision of the slab about object placement. We > can just ignore this bit if it happens to be passed (such as when > duplicating a cache in the kmem memcg patches) > > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: David Rientjes > --- > mm/slab.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/slab.c b/mm/slab.c > index a7ed60f..ccf496c 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -2373,6 +2373,7 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags) > int err; > size_t size = cachep->size; > > + flags &= ~CFLGS_OFF_SLAB; A comment explaining why this is necessary wouldn't hurt. Thanks. -- tejun -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932216Ab2IURd7 (ORCPT ); Fri, 21 Sep 2012 13:33:59 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:65060 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932072Ab2IURd5 (ORCPT ); Fri, 21 Sep 2012 13:33:57 -0400 Date: Fri, 21 Sep 2012 10:33:52 -0700 From: Tejun Heo To: Glauber Costa Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, devel@openvz.org, linux-mm@kvack.org, Suleiman Souhlal , Frederic Weisbecker , Mel Gorman , David Rientjes , Christoph Lameter , Pekka Enberg Subject: Re: [PATCH v3 03/16] slab: Ignore the cflgs bit in cache creation Message-ID: <20120921173352.GE7264@google.com> References: <1347977530-29755-1-git-send-email-glommer@parallels.com> <1347977530-29755-4-git-send-email-glommer@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1347977530-29755-4-git-send-email-glommer@parallels.com> 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 On Tue, Sep 18, 2012 at 06:11:57PM +0400, Glauber Costa wrote: > No cache should ever pass that as a creation flag, since this bit is > used to mark an internal decision of the slab about object placement. We > can just ignore this bit if it happens to be passed (such as when > duplicating a cache in the kmem memcg patches) > > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: David Rientjes > --- > mm/slab.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/slab.c b/mm/slab.c > index a7ed60f..ccf496c 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -2373,6 +2373,7 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags) > int err; > size_t size = cachep->size; > > + flags &= ~CFLGS_OFF_SLAB; A comment explaining why this is necessary wouldn't hurt. Thanks. -- tejun