Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934261AbZIDUnf (ORCPT ); Fri, 4 Sep 2009 16:43:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934082AbZIDUnf (ORCPT ); Fri, 4 Sep 2009 16:43:35 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:54085 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933979AbZIDUnd (ORCPT ); Fri, 4 Sep 2009 16:43:33 -0400 Date: Fri, 4 Sep 2009 13:43:35 -0700 From: "Paul E. McKenney" To: Christoph Lameter Cc: Eric Dumazet , Pekka Enberg , Zdenek Kabelac , Patrick McHardy , Robin Holt , Linux Kernel Mailing List , Jesper Dangaard Brouer , Linux Netdev List , Netfilter Developers Subject: Re: [PATCH] slub: fix slab_pad_check() Message-ID: <20090904204335.GG6751@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <4A9F7283.1090306@gmail.com> <4A9FCDC6.3060003@gmail.com> <4A9FDA72.8060001@gmail.com> <4AA00400.1030005@gmail.com> <20090903231757.GP6761@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2299 Lines: 49 On Fri, Sep 04, 2009 at 11:42:17AM -0400, Christoph Lameter wrote: > On Thu, 3 Sep 2009, Paul E. McKenney wrote: > > > If it were the user of the slab who was invoking some variant of > > call_rcu(), then I would agree with you. > > The user already has to deal with it as explained by Eric. I didn't read his email that way. Perhaps I misinterpreted it. > > However, call_rcu() is instead being invoked by the slab itself in the > > case of SLAB_DESTROY_BY_RCU, so that there is no variation in usage. > > Requiring that the user call rcu_barrier() is asking for subtle bugs. > > Therefore, the best approach is to have kmem_cache_destroy() handle > > the RCU cleanup, given that this cleanup is for actions taken by > > kmem_cache_free(), not by the user. > > The user already has to properly handle barriers and rcu logic in order to > use objects handled with RCU properly. Moreover the user even has to check > that the object is not suddenly checked under it. Its already complex. mm/slab.c has had RCU calls since 2.6.9, so this is not new. > Guess we are doing this ... Sigh. Are you going to add support other rcu > versions to slab as well as time permits and as the need arises? Should > we add you as a maintainer? ;-) I don't see any point in adding anything resembling SLAB_DESTROY_BY_RCU_BH, SLAB_DESTROY_BY_RCU_SCHED, or SLAB_DESTROY_BY_SRCU unless and until someone needs it. And I most especially don't see the point of adding (say) SLAB_DESTROY_BY_RCU_BH_SCHED until someone convinces me of the need for it. I would prefer to put the energy into further streamlining the underlying RCU implementation, maybe someday collapsing RCU-BH back into RCU. ;-) We have gotten along fine with only SLAB_DESTROY_BY_RCU for almost five years, so I think we are plenty fine with what we have. So, as you say, "as the need arises". I don't see any more need to add me as maintainer of slab and friends than of btrfs, netfilter, selinux, decnet, afs, wireless, or any of a number of other subsystems that use RCU. Thanx, Paul -- 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/