From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by kanga.kvack.org (Postfix) with ESMTP id 7C0E86B0038 for ; Thu, 10 Sep 2015 03:38:50 -0400 (EDT) Received: by lbcjc2 with SMTP id jc2so18369210lbc.0 for ; Thu, 10 Sep 2015 00:38:49 -0700 (PDT) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id t5si10012074wia.121.2015.09.10.00.38.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Sep 2015 00:38:48 -0700 (PDT) Subject: Re: Store Buffers (was Re: Is it OK to pass non-acquired objects to kfree?) References: <20150909184415.GJ4029@linux.vnet.ibm.com> <20150909203642.GO4029@linux.vnet.ibm.com> <20150910000847.GV4029@linux.vnet.ibm.com> <20150910011028.GY4029@linux.vnet.ibm.com> From: Vlastimil Babka Message-ID: <55F13387.4030803@suse.cz> Date: Thu, 10 Sep 2015 09:38:47 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Lameter , "Paul E. McKenney" Cc: Dmitry Vyukov , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "linux-mm@kvack.org" , Andrey Konovalov , Alexander Potapenko On 09/10/2015 03:47 AM, Christoph Lameter wrote: > On Wed, 9 Sep 2015, Paul E. McKenney wrote: > >> > But then again kfree() contains a barrier() which would block the compiler >> > from moving anything into the free path. >> >> That barrier() is implicit in the fact that kfree() is an external >> function? Or are my eyes failing me? Is the "external function" not enough? Does it change e.g. with LTO, or is that also subject to the aliasing rules (which I admit not knowing exactly)? > > kfree at some point calls slab_free(). That function has a barrier. All > free operations go through it. SLAB doesn't have such barrier AFAICS. It will put the object on per-cpu cache and that's it. Only flushing the full cache takes a spin lock. > > -- > 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 > -- 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