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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDEDDC433EF for ; Thu, 17 Feb 2022 15:50:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC8866B0074; Thu, 17 Feb 2022 10:50:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E76306B0075; Thu, 17 Feb 2022 10:50:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3EE76B0078; Thu, 17 Feb 2022 10:50:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id C2CB66B0074 for ; Thu, 17 Feb 2022 10:50:15 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6FFEC181AC9C6 for ; Thu, 17 Feb 2022 15:50:15 +0000 (UTC) X-FDA: 79152708390.25.29D5746 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by imf21.hostedemail.com (Postfix) with ESMTP id DFE2B1C000D for ; Thu, 17 Feb 2022 15:50:14 +0000 (UTC) Received: by mail-qv1-f54.google.com with SMTP id o5so9016722qvm.3 for ; Thu, 17 Feb 2022 07:50:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TrDQU0wSmJ6gbE5qWNC2HspX1mTvA/w61hnKamurULY=; b=Bjc0C/P8P3VM61dFTCNftf1IoTERJSFiCh6cp97oIk7fgWzNuZ+688kiVF8wS89ArW PJSElY9F/Ndstf4E4cCqluq6d9+x/aV27fLitAhzwSn6dFRPhvcuGsU4MLfBrcZAWlFP Qa/adfQ0pmzUCOSE9s1QwHPmMa9/XxEEMWTaW06DY+f8JM3AAuLlssbqGmD0TG6hY93v kwwJVBmVImOHKpQryqXIbBN0Yz/I237/xO87gxOdwFzslFRjnS+FYJIQcTvG9HiGb+WX H0uN4X6GofFaAemkyoi2WGP9NWfs+YB/Hu9HXd5/wdRKDVBjZ2PpLWEfkfRrJJFpU6kd QW9Q== 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=TrDQU0wSmJ6gbE5qWNC2HspX1mTvA/w61hnKamurULY=; b=gydNOULWunlwgKYaxuAgjJtna1tlExSIYglkGB3wPCR1ug28j05bprLw7gV/rshQkQ SE3SyR1K7sG9D+mgvmBaU+a5HLfZ85oNLL9/sOTJQ/I2VooRkRHkqVnX/TJxlQ2h3gzV ZOC1wiQeeCnmrtExPv+0oOyUx4i/Oq6ph/1kAMOQ7PPew1a4zW1DrO+z3KgUj9JAouwI X33D0GLgVw8TYo0nP55ySTUQocJmd7Q8BNuzGHoisBguq6nusJDwM2Wx0QIzTdOV27eK 9upSfCCBhb6sFLlAF5SOocHMAaX81ZDjp5CZU9uln10rnXNn+0UUoZmCixvqluqY2qLg jHvg== X-Gm-Message-State: AOAM533xIgcpktLX7o94kKdbDDeF+N3bw4It4f/TuqcEnu6Y3jpdZ15z 4DrafGCTjDB+Ip86ssjf07kmsw== X-Google-Smtp-Source: ABdhPJzPCX/BmaO5y5ccTenFCqI0tT7p3C7WedWxRly8fWyyPG9Kcsrdkf1zkVyjGuUFHnnYJ6inHQ== X-Received: by 2002:a05:6214:5a3:b0:42c:2c13:759c with SMTP id by3-20020a05621405a300b0042c2c13759cmr2687720qvb.20.1645113014138; Thu, 17 Feb 2022 07:50:14 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id m5sm20092682qkp.132.2022.02.17.07.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 07:50:13 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nKj2q-0060gp-E5; Thu, 17 Feb 2022 11:50:12 -0400 Date: Thu, 17 Feb 2022 11:50:12 -0400 From: Jason Gunthorpe To: Miaohe Lin Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/mmu_notifiers: use helper function mmu_notifier_synchronize() Message-ID: <20220217155012.GC1037534@ziepe.ca> References: <20220217110948.35477-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220217110948.35477-1-linmiaohe@huawei.com> Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=ziepe.ca header.s=google header.b="Bjc0C/P8"; dmarc=none; spf=pass (imf21.hostedemail.com: domain of jgg@ziepe.ca designates 209.85.219.54 as permitted sender) smtp.mailfrom=jgg@ziepe.ca X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: DFE2B1C000D X-Stat-Signature: 617oama4azg3nmm8m3hjydyb1mfi4zok X-HE-Tag: 1645113014-159047 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000253, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 17, 2022 at 07:09:48PM +0800, Miaohe Lin wrote: > Use helper function mmu_notifier_synchronize() to ensure all mmu_notifiers > are freed. Minor readability improvement. > > Signed-off-by: Miaohe Lin > --- > mm/mmu_notifier.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) I'm not keen on this, the internal synchronize_srcu's don't have the same usage model as described in the comment for mmu_notifier_synchronize(). Instead they are doing what their comments say. Yes, it is the same code, but the purpose is different. Jason