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 7579BC433E0 for ; Mon, 22 Jun 2020 19:04:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A33020767 for ; Mon, 22 Jun 2020 19:04:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PLEkuxtC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A33020767 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 71D486B0026; Mon, 22 Jun 2020 15:04:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CC866B0027; Mon, 22 Jun 2020 15:04:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BACF6B0028; Mon, 22 Jun 2020 15:04:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 3CA256B0026 for ; Mon, 22 Jun 2020 15:04:20 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EBBF2181AC9CB for ; Mon, 22 Jun 2020 19:04:19 +0000 (UTC) X-FDA: 76957773438.20.crush49_480b16326e35 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id D6BF8180D0796 for ; Mon, 22 Jun 2020 19:04:13 +0000 (UTC) X-HE-Tag: crush49_480b16326e35 X-Filterd-Recvd-Size: 4904 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Mon, 22 Jun 2020 19:04:13 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id a9so20582336ljn.6 for ; Mon, 22 Jun 2020 12:04:13 -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=3+Q10qt8h6Nrtshd/+6BaS9xbma8WBq1l3GqLQ3g9zk=; b=PLEkuxtCGWVu8bw6YQoApNcPFROdWEnrIoL8HXnC8uHxWJKZaCSZMvJu/dpBuNPNfj ZiH1nSWVhdAb+AsiYQRX6cUwyTMLa31GxjGBoVxcnJdNf2ChtPAjMhuhybgRtBlbM+cO IXvKOvSZ2dn7CVKRCykSDEruFvXf0IVVMwF2gTOQCS+QzahGy9p+1X4LZAtaxJGRnZsx bEokVax2t1kSB5a+owJ1E/rO4zRZ2Xqh6TOIH/e47zGKVYvNH6IQyWRGDHZPN4sPDMt1 NjY+LqI3c8o6hrHJ/uVJMq88OcsalNqpM3gO2A0GCxqrHp7HAbWHSl2RvLWc/7eacGYH hE7A== 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=3+Q10qt8h6Nrtshd/+6BaS9xbma8WBq1l3GqLQ3g9zk=; b=qIDtY8OpCbGJEQIBCH2T4jCTAZ/sl1yNMHyegbWVGXTQ1bUd4lm1xIt3WnrnnlSWSY dVkPiE++/4zG5tpKwF9dOfEYnudSJ2/tWvdtrhtngISOWdueB7NOKyyVpUTY/QM7DdYq xMfmw+iD544Ndai9ueciQHl7kj0OtsQIuzcKYrxHSsdDbnVJAjvVGkyQBBOFpwFU2scm jTIU5YoxRKLmYqIG+ASCOJJza36C3C/aFdhUkSpdpJD385Z+bsYdwbdXDtVZ3PrVPiqp 1lKfA9g/B5Ft6+qzQN5DjAdeiYj5ycr/Gp/iIsKQb1vwKNTm25B3c+Gr3dIu6m1mmLEK ODTA== X-Gm-Message-State: AOAM533biEDNTmSJoklPcF0SGujYvWOJwm9cG4MBVkP0RQ460Muuo0tA VEc2D9wKrUQctfA/xtLNfXw= X-Google-Smtp-Source: ABdhPJymrWqdaIU+iC8VNpY5u5S7OUXo2EJQGI3nm60R5cTpbsubsHBVOhanO8uqlG3MaSE8D3frSw== X-Received: by 2002:a05:651c:149:: with SMTP id c9mr9563782ljd.441.1592852651856; Mon, 22 Jun 2020 12:04:11 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id a17sm3639985lfo.73.2020.06.22.12.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 12:04:09 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 22 Jun 2020 21:04:06 +0200 To: "Paul E. McKenney" , linux-mm@kvack.org Cc: Uladzislau Rezki , 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: <20200622190406.GA3787@pc636> References: <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> <20200619162555.GJ2723@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200619162555.GJ2723@paulmck-ThinkPad-P72> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: D6BF8180D0796 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: > > > > > > 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. 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? Thank you! -- Vlad Rezki