Received: by 10.223.176.5 with SMTP id f5csp683906wra; Wed, 7 Feb 2018 05:58:11 -0800 (PST) X-Google-Smtp-Source: AH8x225ALcx2bCg3d9fvHWg/kY99BNk+6sxcIlRWyrqKEexh7dtyhCQLc0EiXs8woDpnORak0z65 X-Received: by 10.98.103.83 with SMTP id b80mr6132510pfc.12.1518011891064; Wed, 07 Feb 2018 05:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518011891; cv=none; d=google.com; s=arc-20160816; b=zUy0+uWX48RXob80jAwokhk6QjJutyfR6s6SAkRN/w+Y7k5pah0Enw/dJXpDI7sQ+h kIun0VH70+4hezmDmMvK9wHierPKrbGaoLmpiRxqpBVRoX9TydYcWr2weI73+G8N8exn K3yjNhS8+yjvfxwr+AQ7MKtTjSuJc2yGf+36YfBOjib9RKciGpEBpHbtrrPWSAo0UxEm yP2kDm0HRc13dqZqup/I19Vi2tFMHPPrXvaNVYU75BdERYaPLTtkTCtVn4mlqMSFVB1s /D02sEm7aMH3FFmHIdvlssbplZJJwoV8XjuqVbA5f91Z1htKmHBx1pSEivbUJbcPROtK 4s6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=Lg98JyNKnD6RSPDNQ06qaSzfejg3yiruIEoIXu6QkFw=; b=ldofEUuloBiN1ViQPiltbrpDt1JI/Xtaqx2J19fQRNR8YUrw9Um/rM6R1xfigykoxn dfk21nKmjPJAXguP/UBD2uHsZfkWYqZ6CJSDKBoQv+9rNXW5ggWhpHYfr2OLKybRLd0a LQ7vrC92djyuYA71pc2g9pNSy+PCcWCfyBz/CNvfu15azWCMxeNJh4NcoDG46VvNsdQQ 2gj8wVYrFz9uPkfEt+0QyP9i8wVX4qicGBQLO2UKbTveFEZyQ2szYtmfhUr9asNgZWxT BleVEdgPkuZeaT1+b3tCNhO/2si2Dv5jD8t7dAkiPEG4SrzUZM4nT/GtmhXT6VzdYpuN uj3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16si965064pgu.397.2018.02.07.05.57.57; Wed, 07 Feb 2018 05:58:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754207AbeBGN5F (ORCPT + 99 others); Wed, 7 Feb 2018 08:57:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:48632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753763AbeBGN5E (ORCPT ); Wed, 7 Feb 2018 08:57:04 -0500 Received: from gandalf.local.home (cpe-172-100-180-131.stny.res.rr.com [172.100.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4CC882179F; Wed, 7 Feb 2018 13:57:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CC882179F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Wed, 7 Feb 2018 08:57:00 -0500 From: Steven Rostedt To: "Paul E. McKenney" Cc: Kirill Tkhai , Matthew Wilcox , josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, mingo@redhat.com, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, brouer@redhat.com, rao.shoaib@oracle.com Subject: Re: [PATCH 0/2] rcu: Transform kfree_rcu() into kvfree_rcu() Message-ID: <20180207085700.393f90d0@gandalf.local.home> In-Reply-To: <20180207083104.GK3617@linux.vnet.ibm.com> References: <151791170164.5994.8253310844733420079.stgit@localhost.localdomain> <20180207021703.GC3617@linux.vnet.ibm.com> <20180207042334.GA16175@bombadil.infradead.org> <20180207050200.GH3617@linux.vnet.ibm.com> <20180207083104.GK3617@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Feb 2018 00:31:04 -0800 "Paul E. McKenney" wrote: > I see problems. We would then have two different names for exactly the > same thing. > > Seems like it would be a lot easier to simply document the existing > kfree_rcu() behavior, especially given that it apparently already works. > The really doesn't seem to me to be worth a name change. Honestly, I don't believe this is an RCU sub-system decision. This is a memory management decision. If we have kmalloc(), vmalloc(), kfree(), vfree() and kvfree(), and we want kmalloc() to be freed with kfree(), and vmalloc() to be freed with vfree(), and for strange reasons, we don't know how the data was allocated we have kvfree(). That's an mm decision not an rcu one. We should have kfree_rcu(), vfree_rcu() and kvfree_rcu(), and honestly, they should not depend on kvfree() doing the same thing for everything. Each should call the corresponding member that they represent. Which would change this patch set. Why? Too much coupling between RCU and MM. What if in the future something changes and kvfree() goes away or changes drastically. We would then have to go through all the users of RCU to change them too. To me kvfree() is a special case and should not be used by RCU as a generic function. That would make RCU and MM much more coupled than necessary. -- Steve