From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35105C433E1 for ; Fri, 19 Jun 2020 16:25:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EE47C217A0 for ; Fri, 19 Jun 2020 16:25:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="gLEfZuWq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE47C217A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 82E478D00EE; Fri, 19 Jun 2020 12:25:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7DDA98D00E9; Fri, 19 Jun 2020 12:25:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CC7E8D00EE; Fri, 19 Jun 2020 12:25:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0180.hostedemail.com [216.40.44.180]) by kanga.kvack.org (Postfix) with ESMTP id 54A238D00E9 for ; Fri, 19 Jun 2020 12:25:58 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E1E4C85303 for ; Fri, 19 Jun 2020 16:25:57 +0000 (UTC) X-FDA: 76946487954.20.owl95_11110f626e1a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id A99F418002315 for ; Fri, 19 Jun 2020 16:25:56 +0000 (UTC) X-HE-Tag: owl95_11110f626e1a X-Filterd-Recvd-Size: 3945 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Fri, 19 Jun 2020 16:25:56 +0000 (UTC) Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (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 439A821707; Fri, 19 Jun 2020 16:25:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592583955; bh=4cT/7aBJ0gbHHMfWq2GsMKBGTtJ30AaC0CtyyiFC1Q0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=gLEfZuWqzaxnPGvf75NZyqxBXjjXQQvHJzhyKqiNePeBOR8dv1VioaTBtwNe6LEEA k6L2pLHcTkkNutWKZKL9Jsbv+/6Q8l5bIbLsFS7AdeRtfT1dPhgTWjZYHSxm2BSxFk 1OzbXraodv4bk9zyLgE58LlbC8kLLSSgwo2mbc80= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 248AE35229B4; Fri, 19 Jun 2020 09:25:55 -0700 (PDT) Date: Fri, 19 Jun 2020 09:25:55 -0700 From: "Paul E. McKenney" To: Uladzislau Rezki Cc: Matthew Wilcox , LKML , linux-mm@kvack.org, Andrew Morton , "Theodore Y . Ts'o" , Joel Fernandes , RCU , Oleksiy Avramchenko Subject: Re: [PATCH v2 09/16] rcu/tree: Maintain separate array for vmalloc ptrs Message-ID: <20200619162555.GJ2723@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200618031823.GQ2723@paulmck-ThinkPad-P72> <20200618173520.GC14613@pc636> <20200618175719.GT2723@paulmck-ThinkPad-P72> <20200618183448.GA15136@pc636> <20200618190359.GU2723@paulmck-ThinkPad-P72> <20200618203557.GB16976@pc636> <20200618203821.GU8681@bombadil.infradead.org> <20200618211709.GA17263@pc636> <20200618213427.GV2723@paulmck-ThinkPad-P72> <20200619154652.GA19990@pc636> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200619154652.GA19990@pc636> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: A99F418002315 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jun 19, 2020 at 05:46:52PM +0200, Uladzislau Rezki wrote: > On Thu, Jun 18, 2020 at 02:34:27PM -0700, Paul E. McKenney wrote: > > On Thu, Jun 18, 2020 at 11:17:09PM +0200, Uladzislau Rezki wrote: > > > > > > > > > > trace_rcu_invoke_kfree_bulk_callback( > > > > > rcu_state.name, bkvhead[i]->nr_records, > > > > > bkvhead[i]->records); > > > > > if (i == 0) > > > > > kfree_bulk(bkvhead[i]->nr_records, > > > > > bkvhead[i]->records); > > > > > else > > > > > vfree_bulk(bkvhead[i]->nr_records, > > > > > bkvhead[i]->records); > > > > > > > > > > > > > > > Matthew, what is your thought? > > > > > > > > That was my thinking too. If we had a kvfree_bulk(), I would expect it to > > > > handle a mixture of vfree and kfree, but you've segregated them already. > > > > So I think this is better. > > > > > > > Yes, the segregation is done. Having vfree_bulk() is enough then. > > > We are on the same page :) > > > > Very good. When does kfree_rcu() and friends move out of kernel/rcu? > > > Do you mean to move the whole logic of kfree_rcu() from top to down to mm/? I do mean exactly that. That was my goal some years back when Rao Shoaib was making the first attempt along these lines, and it remains my goal. After all, if this effort is at all successful, the coupling between kfree_rcu() with slab/slob/slub will become much tighter than that between kfree_rcu() and RCU. There will need to be some additional RCU APIs used by kfree_rcu(), for example, something to tell RCU how many blocks are awaiting a grace period. But these are narrow and easily defined APIs. Thanx, Paul