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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AED4BC433EF for ; Fri, 22 Oct 2021 19:22:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 48F936109D for ; Fri, 22 Oct 2021 19:22:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 48F936109D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 92F2B940008; Fri, 22 Oct 2021 15:22:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BA7A940007; Fri, 22 Oct 2021 15:22:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 75878940008; Fri, 22 Oct 2021 15:22:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 60E51940007 for ; Fri, 22 Oct 2021 15:22:51 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1F39B183956D2 for ; Fri, 22 Oct 2021 19:22:51 +0000 (UTC) X-FDA: 78725045742.31.A19641D Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by imf11.hostedemail.com (Postfix) with ESMTP id C1C39F0000BA for ; Fri, 22 Oct 2021 19:22:50 +0000 (UTC) Received: by mail-qk1-f169.google.com with SMTP id g20so5726008qka.1 for ; Fri, 22 Oct 2021 12:22:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JcURMBS9Y8PdDJIxlTdxpTDoglZA5EDZMktU0Iw1H1o=; b=ivbvIOPHFu9LHkpcmDCDs8o0jHxK4Nsmr/nnnB+LW77L248km0UazI5s07RtLtB011 +i8887Sm98Nty1mNcZJ/dGyDo25o4yPYb9RWDEXFcouozyvhC7ws4xWfod1FvmjycEPr /vL2g+kyXCrv2YdNrrL0zxwEJdXU3MPGCHUrSsQaBPfpyKBsLlPw7dcKtbQTMgLCCft0 xJ3P5VeDcSBfI4Pu4JiRHoCScDS1/kXw3dzzhd0bG3EK84GPg67GMnWqeL2U9YSif1y0 LXpZFroX9eqGQ71urRd6fBXergKwqdKJxK+YMjoPtYj5x2JiCRq9txgTQ5+GiBHYKcGk STqQ== X-Gm-Message-State: AOAM531FrlVa/9h2cx23mTQXjRTjQFUAaAMWc6GvkB/EeWUS/woDepZ/ XGJwNFUOi241kInWBgcZ0qM= X-Google-Smtp-Source: ABdhPJwkV0a9KDG599gq/X+geXmTHTk4qkO+qX3DwxEkccPEdGPJJzljJVCeZhNMx2WeC35A2dVILA== X-Received: by 2002:a37:a809:: with SMTP id r9mr1692706qke.50.1634930570074; Fri, 22 Oct 2021 12:22:50 -0700 (PDT) Received: from fedora (pool-173-68-57-129.nycmny.fios.verizon.net. [173.68.57.129]) by smtp.gmail.com with ESMTPSA id m6sm4557267qti.38.2021.10.22.12.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 12:22:49 -0700 (PDT) Date: Fri, 22 Oct 2021 15:22:47 -0400 From: Dennis Zhou To: Pavel Begunkov Cc: Dennis Zhou , linux-block@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christoph Lameter , Tejun Heo Subject: Re: [PATCH v2 1/2] percpu_ref: percpu_ref_tryget_live() version holding RCU Message-ID: References: <3066500d7a6eb3e03f10adf98b87fdb3b1c49db8.1634822969.git.asml.silence@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: 8p4m59ze3i1m5prwiwgz751b75ky9ncy Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf11.hostedemail.com: domain of dennisszhou@gmail.com designates 209.85.222.169 as permitted sender) smtp.mailfrom=dennisszhou@gmail.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C1C39F0000BA X-HE-Tag: 1634930570-657703 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, Oct 22, 2021 at 10:22:30AM +0100, Pavel Begunkov wrote: > On 10/21/21 15:01, Dennis Zhou wrote: > > Hello, > > > > On Thu, Oct 21, 2021 at 02:30:51PM +0100, Pavel Begunkov wrote: > > > Add percpu_ref_tryget_live_rcu(), which is a version of > > > percpu_ref_tryget_live() but the user is responsible for enclosing it in > > > a RCU read lock section. > > > > > > Signed-off-by: Pavel Begunkov > > > --- > > > include/linux/percpu-refcount.h | 33 +++++++++++++++++++++++---------- > > > 1 file changed, 23 insertions(+), 10 deletions(-) > > > > [...] > > > + > > > /** > > > * percpu_ref_tryget_live - try to increment a live percpu refcount > > > * @ref: percpu_ref to try-get > > > > Nit: it's dumb convention at this point, but do you mind copying this > > guy up. I like consistency. > > Looks Jens already took it. If you still want it moved, do you mind > it in a separate patch? > > And I'm not sure I follow where you want it to be, currently it's > right before percpu_ref_tryget_live, which uses it. Don't worry about it. I meant the @ref comment line. Honestly it's not really useful, it's just every other header block has that convention among most of percpu related files. If I have to make any changes in the future, I'll clean it up then. Thanks, Dennis > > -- > Pavel Begunkov