Received: by 10.223.176.5 with SMTP id f5csp223209wra; Tue, 6 Feb 2018 21:04:56 -0800 (PST) X-Google-Smtp-Source: AH8x227NrKhFm7UtMIcp5piRGGhFAcFcEmPCVkWSUDpmQU96LUR+y1vxjxpCAFsTsMv49Purrizm X-Received: by 10.101.77.134 with SMTP id p6mr3794005pgq.230.1517979896895; Tue, 06 Feb 2018 21:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517979896; cv=none; d=google.com; s=arc-20160816; b=EJ5lmQbSWf+rLyOYVqICh5eDnqBY+O1TrqNPnGHpzgGmdCb9OmwLf3smxc6oZGC5D7 dzmEaUaNm7dsWAExV8wZV0dQdUXOVbKuDB7eAAILaxv0TmEd3/jBR7M70Rwzr3WPdynb pntnhINWtuoxDGRrYpVBKzCZN4z24266eAE6WmkyXV+3TtTfeHqSGsnOvjzXE1MdE/mF gnPSGmrBtRRknmTtoOz1wwqVU5o5Xo+NqCQZH3sRHTmcw09Xfog2qTjJdtmSdYMK3FtS odubyvckXxJNQVLGgitJDUynClc+qh9z5TSSzfC7Dnv1rTeXcDCR3tch5K3OzIsGys7R qSvw== 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=7zwJ/LbsVpRwcBanqOG5vKHUmkbOaIin+hz6MLSszt4=; b=HyuNulAl4UDTuDXUH0CB7Vcv4D39wSCxAX8uydX24baTYuP5H/BBOwO3HQmCOZgPd3 nCf5JFnUPnCiJyIUHFZndUa491qD/+Brp4Sqtf4tTOxDjJe1baWHzG29Rco8UUGG21iL jCrVNIR3Jj/uN/Xku/P1XZdqLdUIAHiqugyZVYSJVWiNYHTnsZ7wytY5i18l8RRpCBHo VLkDkMazqlPGNvUhiPuM9Qh/aZ55DG0Tll6uyS8M+hLwbZlc3V6tdpr6/5pAWeOwsOAw SNm0WGhJVeSLfIJI+1Azcw5izGqR5lydB3UiEYEGR0MnN++qyxBOvlTDqXskh28kzKOr HfTg== 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 s70si541792pfg.255.2018.02.06.21.04.42; Tue, 06 Feb 2018 21:04:56 -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 S1752952AbeBGFB6 (ORCPT + 99 others); Wed, 7 Feb 2018 00:01:58 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45800 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750745AbeBGFB4 (ORCPT ); Wed, 7 Feb 2018 00:01:56 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w174xBEA111657 for ; Wed, 7 Feb 2018 00:01:56 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fyqtvx66q-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Feb 2018 00:01:55 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Feb 2018 00:01:55 -0500 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Feb 2018 00:01:49 -0500 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1751n5540960030; Wed, 7 Feb 2018 05:01:49 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A741EB2065; Tue, 6 Feb 2018 23:58:44 -0500 (EST) Received: from paulmck-ThinkPad-W541 (unknown [9.124.31.48]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 65463B2054; Tue, 6 Feb 2018 23:58:44 -0500 (EST) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 6385516C1835; Tue, 6 Feb 2018 21:02:00 -0800 (PST) Date: Tue, 6 Feb 2018 21:02:00 -0800 From: "Paul E. McKenney" To: Matthew Wilcox Cc: Kirill Tkhai , josh@joshtriplett.org, rostedt@goodmis.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207042334.GA16175@bombadil.infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18020705-0024-0000-0000-0000031FD3BD X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008488; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000248; SDB=6.00986081; UDB=6.00500399; IPR=6.00765448; BA=6.00005813; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019415; XFM=3.00000015; UTC=2018-02-07 05:01:54 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020705-0025-0000-0000-000046E5FD2C Message-Id: <20180207050200.GH3617@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-07_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-1802070061 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 06, 2018 at 08:23:34PM -0800, Matthew Wilcox wrote: > On Tue, Feb 06, 2018 at 06:17:03PM -0800, Paul E. McKenney wrote: > > So it is OK to kvmalloc() something and pass it to either kfree() or > > kvfree(), and it had better be OK to kvmalloc() something and pass it > > to kvfree(). > > > > Is it OK to kmalloc() something and pass it to kvfree()? > > Yes, it absolutely is. > > void kvfree(const void *addr) > { > if (is_vmalloc_addr(addr)) > vfree(addr); > else > kfree(addr); > } > > > If so, is it really useful to have two different names here, that is, > > both kfree_rcu() and kvfree_rcu()? > > I think it's handy to have all three of kvfree_rcu(), kfree_rcu() and > vfree_rcu() available in the API for the symmetry of calling kmalloc() > / kfree_rcu(). > > Personally, I would like us to rename kvfree() to just free(), and have > malloc(x) be an alias to kvmalloc(x, GFP_KERNEL), but I haven't won that > fight yet. But why not just have the existing kfree_rcu() API cover both kmalloc() and kvmalloc()? Perhaps I am not in the right forums, but I am not hearing anyone arguing that the RCU API has too few members. ;-) Thanx, Paul