Received: by 10.223.176.5 with SMTP id f5csp958654wra; Wed, 7 Feb 2018 10:12:36 -0800 (PST) X-Google-Smtp-Source: AH8x224rFCLqYaQ1fnGh8nG/n0FESMVHsI0mIukoSK4cHXai3SUEDpzNXXqBzyENldgw+PzI1VIq X-Received: by 2002:a17:902:b604:: with SMTP id b4-v6mr7021625pls.32.1518027156144; Wed, 07 Feb 2018 10:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518027156; cv=none; d=google.com; s=arc-20160816; b=rq4GedLMJQ1BZ3zIHfnRRCxArDmuR0wG/uww5LLy03Mh51DeiZTG2neGwHjp7CS76c 2ej1OBcq7fVUC9hx8qoL+I26rGftavYvIP7sr5pDo+o2wDpHncRaWj1gbGGBXTkEopbV HtAc1ilCORT0W6xkVnzFxhMKsyg9jfnnuR54B+Op86UmnDr+hU4lcB/Xf5wSdp9/ylNz P6jOsXMrIMIXjkTpMxrLakdRZ05UU8OnOizqyb0S7FvE4HBoEHh0Yo8cbg86Wp2YoWkD maF1WrZNy6NSjxQ2KYNI3kFkJVjd3WtqytQR6TUykzptmRdr+i2ooYCAbcIfFFZt8Ln2 LU3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=zgLeAHi8abErMin1Exft2FYrJiSPDyAsgJQKgxG6jrg=; b=s6clLxQizH95xYcl6qGjqFLAFwauo9jRb05VJi455PLC4IZydkNw7IFu9tIRcAeO7c RdKlQyCA19P0DOyEgm4aEt9i3zQM28YAQZZTMKib+GjzslaIpW9aLYVbirVBU15v979p /+LC2ApcX83FLgo9jDGYpaKRmTozn+GRRjdUvnAn3v8/YCAzhXBuID5qvMqKDNgSmViS Gi0Kl5WXgpdLBM3hRC+K1OPCIs3Bncy8tygYAfZAErgEFykJamNfJoU8+rfecKjFfH/y 9ziSpLIS7X2ZfusCck6pKehaQM2X7cWEuDwgB66n5+aw4SEXF4Ao8KiwH02JstMmxHwB YDHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pQM/XQRa; 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 d2si924705pgo.342.2018.02.07.10.12.17; Wed, 07 Feb 2018 10:12:36 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pQM/XQRa; 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 S1754177AbeBGSLI (ORCPT + 99 others); Wed, 7 Feb 2018 13:11:08 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:49151 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754002AbeBGSLH (ORCPT ); Wed, 7 Feb 2018 13:11:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zgLeAHi8abErMin1Exft2FYrJiSPDyAsgJQKgxG6jrg=; b=pQM/XQRaxQshRfmrLTibQoYnn OWmtiu1rwgBZ27/M5rdOfl3VaVQS7QfUds9Dn6gYpuI+VMvb6K/6z5Pfvft/I/u45grUjOEQZzUJx TPHloO+Fq11emcon/2tIAsPX+ya42iAG6NippQyxh//R8aRdbyHJaEkJm7GG9iJwEvgYc5O4dlpWD 1kK39eReiC8xxzdaZDWUiWjzFSY634+NBtHTkA1nfdMzN901FdelOLuThZigyVjHDAk24wn4/bpHf /1y2K3g3jLEh14cs2jlCzPN1PBWYdzie/Y6AJNIA79srm8bwE0LKvcHHUmXYLm9O+l9Vl7pZCpiYM i4CLowbeA==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1ejUBL-0005O0-Te; Wed, 07 Feb 2018 18:10:55 +0000 Date: Wed, 7 Feb 2018 10:10:55 -0800 From: Matthew Wilcox To: Jesper Dangaard Brouer Cc: Steven Rostedt , "Paul E. McKenney" , Kirill Tkhai , 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, rao.shoaib@oracle.com Subject: Re: [PATCH 0/2] rcu: Transform kfree_rcu() into kvfree_rcu() Message-ID: <20180207181055.GB12446@bombadil.infradead.org> 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> <20180207174513.5cc9b503@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207174513.5cc9b503@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) 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 05:45:13PM +0100, Jesper Dangaard Brouer wrote: > On Wed, 7 Feb 2018 08:57:00 -0500 > Steven Rostedt wrote: > > 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. > > For the record, I fully agree with Steve here. > > And being a performance "fanatic" I don't like to have the extra branch > (and compares) in the free code path... but it's a MM-decision (and > sometimes you should not listen to "fanatics" ;-)) While free_rcu() is not withut its performance requirements, I think it's currently dominated by cache misses and not by branches. By the time RCU gets to run callbacks, memory is certainly L1/L2 cache-cold and probably L3 cache-cold. Also calling the callback functions is utterly impossible for the branch predictor.