Received: by 10.223.176.5 with SMTP id f5csp1440049wra; Wed, 7 Feb 2018 20:09:58 -0800 (PST) X-Google-Smtp-Source: AH8x226elayIPq4ZqHHbuOvajbgrc1BovtsO4gErimV0QlomXdNa/XmCUwKOXgWJh1FxSbAveh/2 X-Received: by 2002:a17:902:9343:: with SMTP id g3-v6mr8419562plp.319.1518062998734; Wed, 07 Feb 2018 20:09:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518062998; cv=none; d=google.com; s=arc-20160816; b=OJIn6dLSH5XYh3TDSQPUYfh+tiYkdPcwCivzzzbb2a0KrwBctYcaO8X/gD/fqDqYvh 5nafDC7aTjrhR4zX52T+2N9DITKfARiNLMAFgUMFl23X8JXWP3kqyNBBfg9hmv2P0jfa VmgN2pOSdscheedD2LM31eYlRz9Nad6uDINX8Lx5/O8Fy/HhX4XRF11RhbpN0r2cEjv4 8g+5C/5YOFnhX4KHwLvUHxkF14h/i0txBbIQtLxmjEDMILi3/3o2FY5fTCos4YgFBY1B grSPqFoQt29VejOaCjSqfP596Bq2Ezaor4iL3EZ2bik4sC2Q5K4ukrvcugcUvZMlYi+j jILw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=CExgEXQwGhHmay2Kohl3XU9Z1/UxHgfnJ6t4iIT7xOs=; b=SwlGi3pZwBHQgokIb6043vO04Ampjl7ffZ9WiVsahT4yT+vZQ5wEZyoDOdvNxySlkx lTncApvP6SzDtg6hlhqyo+GLRm2Vyp98zyCSqq3onYCw13CK61WdvodiGU0LyMh3BaGk YlEMYOXughiJq1vlbdXxaDcRxDn/JltH2MyEC1+n8W3aYpGU+OgQA/c9o1yCvzl6rzoa Ve+0X5ZYuiX6+6ppEOEJndv2jNiIZlMq1vqh+QuO2a/47BRXWQK0rA1O9FFM39WAlFPW IKAClt9ZLC0+GM+gn38AhBre9VTT2k/5oy214XAfGUHc0EOWFM0TYOD1FggLiUTwmP2P JsTw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2-v6si2203787plk.478.2018.02.07.20.09.44; Wed, 07 Feb 2018 20:09:58 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751305AbeBHEJG (ORCPT + 99 others); Wed, 7 Feb 2018 23:09:06 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59622 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750806AbeBHEJF (ORCPT ); Wed, 7 Feb 2018 23:09:05 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w18440TL103486 for ; Wed, 7 Feb 2018 23:09:04 -0500 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0b-001b2d01.pphosted.com with ESMTP id 2g0ab69uw4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Feb 2018 23:09:04 -0500 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Feb 2018 23:09:03 -0500 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Feb 2018 23:08:58 -0500 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1848wK146989528; Thu, 8 Feb 2018 04:08:58 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4BEA1B204D; Wed, 7 Feb 2018 23:05:53 -0500 (EST) Received: from paulmck-ThinkPad-W541 (unknown [9.124.31.48]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 0BD4CB2046; Wed, 7 Feb 2018 23:05:53 -0500 (EST) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 1C67416C2CF1; Wed, 7 Feb 2018 20:09:10 -0800 (PST) Date: Wed, 7 Feb 2018 20:09:10 -0800 From: "Paul E. McKenney" To: Steven Rostedt 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() Reply-To: paulmck@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> <20180207085700.393f90d0@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207085700.393f90d0@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18020804-0056-0000-0000-000004178450 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008494; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000249; SDB=6.00986543; UDB=6.00500676; IPR=6.00765907; BA=6.00005819; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019434; XFM=3.00000015; UTC=2018-02-08 04:09:02 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020804-0057-0000-0000-0000084EF46C Message-Id: <20180208040910.GP3617@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-08_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802080035 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 07, 2018 at 08:57:00AM -0500, Steven Rostedt wrote: > 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. I couldn't agree more! To that end, what are your thoughts on this patch? https://lkml.kernel.org/r/1513895570-28640-1-git-send-email-rao.shoaib@oracle.com Advantages include the ability to optimize based on sl[aou]b state, getting rid of the 4K offset hack in __is_kfree_rcu_offset(), better cache localite, and, as you say, putting the naming responsibility in the memory-management domain. > 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. And that is one reason I am viewing the name-change patch with great suspicion, especially given that there seems to be some controversy among the memory-management folks as to exactly what the names should be. Thanx, Paul