Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753717AbdLTBxo (ORCPT ); Tue, 19 Dec 2017 20:53:44 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:52872 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbdLTBxm (ORCPT ); Tue, 19 Dec 2017 20:53:42 -0500 Date: Tue, 19 Dec 2017 17:53:36 -0800 From: Matthew Wilcox To: "Paul E. McKenney" Cc: Jesper Dangaard Brouer , rao.shoaib@oracle.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures Message-ID: <20171220015336.GA7748@bombadil.infradead.org> References: <1513705948-31072-1-git-send-email-rao.shoaib@oracle.com> <20171219214158.353032f0@redhat.com> <20171219221206.GA22696@bombadil.infradead.org> <20171220002051.GJ7829@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171220002051.GJ7829@linux.vnet.ibm.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 15 On Tue, Dec 19, 2017 at 04:20:51PM -0800, Paul E. McKenney wrote: > If we are going to make this sort of change, we should do so in a way > that allows the slab code to actually do the optimizations that might > make this sort of thing worthwhile. After all, if the main goal was small > code size, the best approach is to drop kfree_bulk() and get on with life > in the usual fashion. > > I would prefer to believe that something like kfree_bulk() can help, > and if that is the case, we should give it a chance to do things like > group kfree_rcu() requests by destination slab and soforth, allowing > batching optimizations that might provide more significant increases > in performance. Furthermore, having this in slab opens the door to > slab taking emergency action when memory is low. kfree_bulk does sort by destination slab; look at build_detached_freelist.