Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8874576rwr; Thu, 11 May 2023 07:16:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7s6H3403LCaHZSm15TYgbk8ARQB/8DSULs4PS31n0KFcOK25YXj0vcHagBxihtPVGKPIgC X-Received: by 2002:a92:cd07:0:b0:32e:41ce:e521 with SMTP id z7-20020a92cd07000000b0032e41cee521mr14320938iln.8.1683814613622; Thu, 11 May 2023 07:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683814613; cv=none; d=google.com; s=arc-20160816; b=T+1K8lNx2Yh8JpQ0rJ2n6MMErtFVsZneC4UVMKWNhdnraF/NbA3N3VN4rXhzlwhDXX hujScQY1SFK1u5VZa9udFn9fd/twft59K+Ikz5wTfdQSD4Bq9/6qWVaAxR3RZkicY3gv KxjHpAqhIpfA5eCKU2uuSfgztxoT7cFM5mH1r71nBD7Ff68S+rsWrc/myzoNkgHewxwA GYnCchCJlGBfyt440J7PMwYhhED3z4+Rf/JQCQqzF6jr0nsk2TR1vdiGCz/kmOQJeyv0 B+o9dgCi844mJvuTlMq6a1I7i43UJWFwFh0pWeUnE2n80R9TWqI9+mFO1Akt3XXbydY4 XTsg== 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=2PyJscrSs2KcjsGAZAJULR5LisSK8zDEJEEU9T8N/s4=; b=VnU7LJPYZ/H8rgKLkfwhtwunJebJsJzNoB9faQavh9jlRK5fY+wtcTd0qb5zwtudwE xz0TUGuN5IteCK+sA7QPlwaQBD7O6eBpYr7pfEopJqxsCLndU1W0sk5aVk6Vfu85N6L9 1+ccb/zBO6RQnfvDf2u35nCgSZ+ijwCr2FPL00aPZw+KdQWc/6IBh9dCxW5sJ0aYGklb uXD6zQS98Gq+VBXIjBj+Ore7aDwg0GeQ/Y+bYu9idTQQGRwF5AIaQOxGzz45F2oo6qWd VGg8lDHcwWwEqocpJ4DlxtBIWDYNKwn3PinuBydNLoqw0Dn9T5OPqXF8Mh5D3fkVdAPw 5XRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dlWmPM4y; 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 l6-20020a056e0205c600b003348e9468eesi7762209ils.60.2023.05.11.07.16.29; Thu, 11 May 2023 07:16:53 -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=dlWmPM4y; 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 S238193AbjEKN47 (ORCPT + 99 others); Thu, 11 May 2023 09:56:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238043AbjEKN45 (ORCPT ); Thu, 11 May 2023 09:56:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F7275249; Thu, 11 May 2023 06:56:56 -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 A678964DB2; Thu, 11 May 2023 13:56:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00E7DC433D2; Thu, 11 May 2023 13:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683813415; bh=AFYNgBRlkZAIM+XPW/DgpQZP3bXSSbaVQ2TNqPf27Jg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=dlWmPM4ySc1VWnSiCNCDl+iQH1JfRVLKkGL+EsLU8osKL/BmYaWWZNJut3wvKrW8f PwC9CVOJJujizIOrK4k9KFs5+CQWl09x6rdC3O5PQgn+OvQScst25QTZBWC5pJWsMM t0Z8w7rm//o0oFD4pih3jiPdtXB4bCE3LIKnLDXPW7bD36Hjxk9fXRgd5WZVINlRNb cjuo4mwyNEMnJNhfNh34boCMC1G0xtFXITcis56Z+sRYXRaVVlt34VsXH/x3dIfxQL 6+C8Wmj0ZN2TyQIbiF7xQQ/Eb4DqspZNnSQAWnKDAo1l8hUJ11jDuC7YITDPy4SC8s zZIYEPOVZVLhA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 95BE3CE0DB0; Thu, 11 May 2023 06:56:54 -0700 (PDT) Date: Thu, 11 May 2023 06:56:54 -0700 From: "Paul E. McKenney" To: "Zhuo, Qiuxu" Cc: Joel Fernandes , "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: <7a91a10d-3518-4452-b9ca-51240f00d29f@paulmck-laptop> Reply-To: paulmck@kernel.org References: <7ffd4a5d-61e9-4b4c-a312-a85bcde08c39@paulmck-laptop> <20230510171238.2189921-3-paulmck@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 07:01:59AM +0000, Zhuo, Qiuxu wrote: > > From: Joel Fernandes > > Sent: Thursday, May 11, 2023 1:23 PM > > To: Paul E. McKenney > > Cc: rcu@vger.kernel.org; linux-kernel@vger.kernel.org; kernel- > > team@meta.com; rostedt@goodmis.org; Zhuo, Qiuxu > > > > Subject: Re: [PATCH rcu 3/6] rcu/rcuscale: Move rcu_scale_*() after > > kfree_scale_cleanup() > > > > On Wed, May 10, 2023 at 10:12 AM Paul E. McKenney > > wrote: > > > > > > From: Qiuxu Zhuo > > > > > > This code-movement-only commit moves the rcu_scale_cleanup() and > > > rcu_scale_shutdown() functions to follow kfree_scale_cleanup(). > > > This is code movement is in preparation for a bug-fix patch that > > > invokes > > > kfree_scale_cleanup() from rcu_scale_cleanup(). > > > > > > Signed-off-by: Qiuxu Zhuo > > > Signed-off-by: Paul E. McKenney > > > --- > > > kernel/rcu/rcuscale.c | 194 > > > +++++++++++++++++++++--------------------- > > > 1 file changed, 97 insertions(+), 97 deletions(-) > > > > 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. They say that another option is to use "git diff --color-moved", which colors the changes. That it does, but I am hard-pressed to work out exactly what distinguishes a moved hunk from an added or removed hunk. Fall colors vs. winter colors? Exterior vs. interior? Any particular decade in the endless rush of changes to fashion? Perhaps someone with normal color vision (to say nothing of better fashion sense) could try it. On the other hand: "default: Is a synonym for zebra. This may change to a more sensible mode in the future." So maybe it is not just me. ;-) You can also apparently choose colors using "color.diff.newMoved" and "color.diff.oldMoved" when using "--color-moved=plain". But "git diff --color-moved=dimmed-zebra" might be more to the point for someone like me. I would need to experiment with it more in order to confirm my hypotheses about what it is doing. To say nothing of building trust in it. Plus I have to open a color terminal to use it effectively. So maybe "git blame -M" continues to be the tool for me? Thanx, Paul