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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 AF4A3C433E0 for ; Tue, 30 Jun 2020 17:46:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 73A7F2074D for ; Tue, 30 Jun 2020 17:46:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tjY1jjdE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73A7F2074D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DB26B6B0002; Tue, 30 Jun 2020 13:46:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D3C506B0003; Tue, 30 Jun 2020 13:46:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C02BE6B0006; Tue, 30 Jun 2020 13:46:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 82E776B0002 for ; Tue, 30 Jun 2020 13:46:54 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 265001EE6 for ; Tue, 30 Jun 2020 17:46:54 +0000 (UTC) X-FDA: 76986608748.16.dime47_4a04b7f26e79 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id EBD0E100E690C for ; Tue, 30 Jun 2020 17:46:53 +0000 (UTC) X-HE-Tag: dime47_4a04b7f26e79 X-Filterd-Recvd-Size: 5803 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 30 Jun 2020 17:46:53 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id e4so23629982ljn.4 for ; Tue, 30 Jun 2020 10:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tjMV2HhxwqIY48F0IP3MOiKFidan1PF9zaHZx5HX7l0=; b=tjY1jjdEVyJZGgANPC64TKpHUZrkSS8EEBBY/YSYskUqJ4iHiJyvY/SRKdbUQ+i8A6 mKZGquZKcCYFChv95JDvgtkN3ZV/xibcDqKYEEHIpMJi/A6cAJZGE6pZhE171nGMtmAA nodVM9EiODNeIbtgN3HbrGNAFmMg6N/7B6AzBwFaweyZLIhRUFG+yAwcZWD13JLlh+i0 OZ1CEWk/Wj8zu1vB4nlqcy7Xn1NsxZjROarkiYk+/vU/ui4t6L9I0QuT/GLPP4zUT4cf ZsQtGTxKQOVJoHF5wbc0na/+t70V/horF7+xmrRSJ+LCxEtZNCscsWvKeg5fkcmngreJ JhPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tjMV2HhxwqIY48F0IP3MOiKFidan1PF9zaHZx5HX7l0=; b=hyp2WLhMPTKbAAyzGUEhGjIItvLbcaBZhHalOMXftecioESQWhp1KsRX5bDliadFr7 i/8UzrVW0DwCYArFtzcusrwrrilzSLSy27q5DlXygbiM44qiFBUVa6TeHUJBPWinH6si PJcX/gTS7PQDcb1j+LaUI2x2K1gHiR1OiwFB/kZrg3u18bq+Xo+mkXQpLetS8bxNckuC SFimRo50gvH0i4i7VXiDmQUcy6tCKz29J8KgXQgdeuvkwDMpTWocHiOwSgZLHGRUpCoI LFtcuQWeaBLTo0C5qODZd3/1aSJJHVwXo9HXXWvDrEXHkwTJ+CAuYR4507IXfBWeQT/1 pV/g== X-Gm-Message-State: AOAM530528GjD6UL6guPSuGgucy1Cb9BKdozf0snKNFuatGPS0/qrbvJ Kidzydi6fUhqscYeGQIsfqNMtSmKEhW/HA== X-Google-Smtp-Source: ABdhPJyeD0L2OQDPsATlLehiaJUOlO6qfctubWWbNJHqTUbySuntBVH0jItLh5nWGXKBUGu1EU7PZw== X-Received: by 2002:a2e:9b94:: with SMTP id z20mr9220985lji.404.1593539211578; Tue, 30 Jun 2020 10:46:51 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id y24sm1042122lfy.49.2020.06.30.10.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 10:46:49 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Tue, 30 Jun 2020 19:46:47 +0200 To: linux-mm@kvack.org, Matthew Wilcox , vbabka@suse.cz, mhocko@suse.com Cc: Uladzislau Rezki , linux-mm@kvack.org, Matthew Wilcox , LKML , 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: <20200630174647.GA27057@pc636> References: <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> <20200619162555.GJ2723@paulmck-ThinkPad-P72> <20200622190406.GA3787@pc636> <20200622195329.GN9247@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200622195329.GN9247@paulmck-ThinkPad-P72> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: EBD0E100E690C X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Mon, Jun 22, 2020 at 12:53:29PM -0700, Paul E. McKenney wrote: > On Mon, Jun 22, 2020 at 09:04:06PM +0200, Uladzislau Rezki wrote: > > > > > > > > > > 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. > > > > > I also think that k[v]free_rcu() should reside somewhere under "mm/". > > Currently they are defined as macros under "linux/rcupdate.h". So i > > am not sure if definitions should stay there or moved also. > > I am not as worried about the high-level macros as I am about the code > that does the bulk of the work, but they should still move as well. > Otherwise, changes involving both the macros and the underlying > implementation are harder than needed. > > > Implementation of the k[v]free_rcu() is under rcu/tree.c and for tiny > > variant is under rcutiny.h. It can be moved to the mm/slab_common.c > > or independent files can be created. I think, mm people should consult > > what is the best way to go :) > > > > Any thoughts on it? > > I don't have any opinion on exactly where in mm the underlying > implementation code should go. You suggestion of mm/slab_common.c > seems fine to me. ;-) > OK :) Then i would like to hear an opinion from the "mm" people where kfree_rcu() and friends could potentially be moved. Matthew, Michal, Vlastimil could you please share your view? Thanks! -- Vlad Rezki