Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754628AbbBKWGx (ORCPT ); Wed, 11 Feb 2015 17:06:53 -0500 Received: from resqmta-ch2-07v.sys.comcast.net ([69.252.207.39]:51913 "EHLO resqmta-ch2-07v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753507AbbBKWGw (ORCPT ); Wed, 11 Feb 2015 17:06:52 -0500 Date: Wed, 11 Feb 2015 16:06:50 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Jesper Dangaard Brouer cc: akpm@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, penberg@kernel.org, iamjoonsoo@lge.com Subject: Re: [PATCH 2/3] slub: Support for array operations In-Reply-To: <20150212104316.2d5c32ea@redhat.com> Message-ID: References: <20150210194804.288708936@linux.com> <20150210194811.902155759@linux.com> <20150211174817.44cc5562@redhat.com> <20150212104316.2d5c32ea@redhat.com> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1392 Lines: 36 On Thu, 12 Feb 2015, Jesper Dangaard Brouer wrote: > > > This is quite an expensive lock with irqsave. > > > > Yes but we take it for all partial pages. > > Sure, that is good, but this might be a contention point. In a micro > benchmark, this contention should be visible, but in real use-cases the > given subsystem also need to spend time to use these elements before > requesting a new batch (as long as NIC cleanup cycles don't get too > synchronized) Yes definitely it will be a contention point. There is no way around it. > > Yup the page access is shared but there is one per page. Contention is > > unlikely. > > Yes, contention is unlikely, but every atomic operation is expensive. > On my system the measured cost is 8ns, and a lock/unlock does two, thus > 16ns. Which we then do per page freelist. Not sure what we can do about this. > > We can require that interrupt are off when the functions are called. Then > > we can avoid the "save" part? > > Yes, we could also do so with an "_irqoff" variant of the func call, > but given we are defining the API we can just require this from the > start. Allright. Lets do that then. -- 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/