Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10566484rwr; Fri, 12 May 2023 09:44:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6a5jE45PwqhWkBs2cHKsHPOwUJicUoB17XGjCYfRdidh3HnaRhHIUafGD4ClFTuhqAaEIe X-Received: by 2002:a05:6a20:8f06:b0:ff:e397:a87a with SMTP id b6-20020a056a208f0600b000ffe397a87amr28893425pzk.33.1683909856016; Fri, 12 May 2023 09:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683909856; cv=none; d=google.com; s=arc-20160816; b=YzWeCg/x1q8wU4smBZsnWby0NYuQOrRIZM22JW/K/JYMI5yr6Pu2E/wUVYnNaoNmNT kqM61CwnNjzfsfUdhTZxYt6UyWLdclReT0UijURaP91vDLNErWg7Ydn8BCb8U0iS6gzp kM+5XeJ0/8joBIHIYpZbSTuBy272F+w0MzoJRErN1cv4USRherBzJOq5BmCI29wbdrDN 80zh/Gsx7Im1HFKDbUppDy4m5h0tF/K/ZQ+uniHiM/gbZHNoF4+DydeNTnnjm+7cmVJO j/Dy+W6dUNeg/KIJKiPkeo7Iqi4uOSwNuZKMxSdRo30qsXDyjU/48H0rgdVpuBuBaH1Y ciPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=ZgTGbzz4dZAULIZKMuDx1THOUV2nOpDLlv8JAdE+wsQ=; b=dDwR/TbyxR8d0l7ybSBhhsKvBY8b3Jz+S7whyyuQrBY59zj7muC58lOY0Wn0wtS72/ mujcnKvtOjXW/ycc7KfnkTfLpFZX4SdAvlDoopKEiw5ITY7RoLcZaFo/sCl6wIZcUUtn JvEFAFPe/APV/rS17NO90k9Na/pqW24lzFT01qAny6xQad2xBN6m175h4Jq9o9B5hcbV H7leHotfTM4wrrnEbGXJaPSjSX/gcYuZ+heTLOJAQD1/v01b25x5QXRJZ4z8wM9msc+5 tOIUkR1w/91OHXqKRF9nR5PObeVlIRxTXtwMj+EwEfoP7kEZ874dXKGjgHFBuTqjZ8tP K/8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WKGPZmGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a637a45000000b00518cf8916e2si9997417pgn.415.2023.05.12.09.44.03; Fri, 12 May 2023 09:44:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WKGPZmGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235775AbjELQkL (ORCPT + 99 others); Fri, 12 May 2023 12:40:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbjELQkK (ORCPT ); Fri, 12 May 2023 12:40:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FFAA10F3; Fri, 12 May 2023 09:40:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2D45563A6D; Fri, 12 May 2023 16:40:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BE27C433D2; Fri, 12 May 2023 16:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683909605; bh=mFss654Av6NPd92VYAU9bWcL0SPn6hYIYfGafkyQKig=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=WKGPZmGNT5X7m7XurXJcDmqWlBSe4qJ3Xm9oD3u4XpDGK2OVP2o04h/tJQ/Xj/Ohq jLPfoMuXsv/u96UZFhruCaneaqJ/Uu+yYLDQhNKBE/hZ18Sn0MrhLW9CuKAJwvUyJ3 gR8yzngfAuObAuPExF6lQX8RHOusBD+/Lnx14pirtjn3RFaDaGlQRLg0cFtlhm6POB 3ejebmE0BKMuc64TffNkIAtN8vuIgWkVlUEFtUO2C8QuvExvgJLchlMVO+qlDmztRK EyxkjZtQDf7kuTAJr75tl9mqhJXqmE0ue6CAx7yYbc0ZBGfhv8+Iw+vWvp1zV+3sMz HuQcvdmAvkBWg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0FE5ACE0CCF; Fri, 12 May 2023 09:40:05 -0700 (PDT) Date: Fri, 12 May 2023 09:40:05 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: "Zhuo, Qiuxu" , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org Subject: Re: [PATCH rcu 3/6] rcu/rcuscale: Move rcu_scale_*() after kfree_scale_cleanup() Message-ID: <4d508096-300c-4d16-9c39-18598d00b500@paulmck-laptop> Reply-To: paulmck@kernel.org References: <30F06C03-6950-4E2B-B3CE-3939B3CDD295@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30F06C03-6950-4E2B-B3CE-3939B3CDD295@joelfernandes.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 11, 2023 at 09:15:17PM -0700, Joel Fernandes wrote: > > > > On May 11, 2023, at 8:20 PM, Zhuo, Qiuxu wrote: > > > >  > >> > >> From: Paul E. McKenney > >> ... > >>>> I wish diff was better at showing what really changed. The meld tool > >>>> can help but its gui... > >>>> > >>>> Should I run meld later (I'm out at a conference so no access to > >>>> meld-capable > >>>> machines) or are we sufficiently confident that the lines were moved > >>>> as-is ? :) > >>>> > >>> > >>> Thank you, Joel for this concern. Good to know the meld diff GUI tool. > >>> I just run the command below and confirmed that the lines were moved > >>> as-is: rcu_scale_{cleanup,shutdown}() follows kfree_scale_cleanup(). > >>> You may double check it ;-). > >>> > >>> meld --diff ./rcuscale.c.before ./rcuscale.c.after > >> > >> Nice, thank you both! > >> > >> Another option is to check out the commit corresponding to this patch, then > >> do "git blame -M kernel/rcu/rcuscale.c". Given a move-only commit, there > >> should be no line tagged with this commit's SHA-1. > > > > Just had a good experiment with the "git blame -M" option: > > - Used this option to prove a move-only commit quickly (no line tagged with that commit) (the fastest method to me). > > - Then just only needed to quickly check the positions of the moved code chunk by myself (easy). > > > > Thank you, Paul for sharing this. It's very useful to me. > > Looks good to me as well and thank you both for sharing the tips. Here is one way to script this, where "SHA" identifies the commit to be checked and PATHS the affected pathnames: git checkout SHA^ git show SHA | git apply - git blame -M PATHS | grep '^0* ' If there is no output, there were no non-move changes. Or just do the "git blame -M PATHS | grep '^0* '" before doing the checking. And yes, you can derive PATHS using "git status" if you want. ;-) Thanx, Paul