Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3582026rwb; Fri, 16 Dec 2022 17:53:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf6mITPe+JApwgPQCboHxiP6Z1APReftp5rQ4k0x8yA90PqqIuZq1l0w0RT7ztBi41Mm9BFU X-Received: by 2002:a17:906:b150:b0:7a6:b59c:1e1b with SMTP id bt16-20020a170906b15000b007a6b59c1e1bmr30564235ejb.29.1671242003456; Fri, 16 Dec 2022 17:53:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671242003; cv=none; d=google.com; s=arc-20160816; b=Di8tPXNoOQolmDlThvpFSGp7x0yeRqnsvY1RpwSsJKPiyxI4gTOhaXzK0eH2tfYb6l f0EjXSAqhB5/ldfUf/N2FqKjALMOKjPbnwNuUDvAMfEw4D2VTUrWta44d0GwFLBN8ozl stx4Dau8Ox/ANOpXCOr+IMPGFbZPGXUO5wsM/QpGKQ8BWUOAGnVrSaFgDwyy71j8eYWR hLO8OFSR37lPZRNEkV2k82MCvFJL37BZ5/rV78xcsN2WIjrj8GtLswKzBf5ydqTv/v7u IYlBI0YRsSytdFW0Mv5rv0lEIOjFxqe5IB/KYhvCyEt3Vsg4X0woyYFNBPkcTLxfDDjz /Seg== 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-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ASjB0uFCA+6BrJlAL3R+5pIItdMaoAvGTO0uLKmO4T4=; b=lB3DBFD8bIU1VJ9xh57ZWaH71L9tiLpkbH7k0pFweIeOCwKFMJmjnOr4taoXw1ST+m Y3XFM+Rc+ZLyoWbTamU16hES1EKQcaQta+Y74huAG/mcNsgc/cnvMWYEOlwq7x/CYFDI Hm0TGjD+o8XU3EowyJwyWY3twBFHrE+76gHcmm25l0681rDlWKj7QAR62yyuUmmWkfoh QWxgCwXg265IKE2PytxQuJtM7XXuMgk0lpm2ZvoCTnBGywo+1q26WgMQu0bKx8R8HHQ9 HQi4Em3qzvAK1AUAhOmlOfInJCQQSZryEk1EhPx8qHpCYS0yhCkB3aMuvzbChrUsxqfw 0tMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ac2sr7K4; 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 k1-20020a1709065fc100b0073d9c412570si3021128ejv.785.2022.12.16.17.53.07; Fri, 16 Dec 2022 17:53:23 -0800 (PST) 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=Ac2sr7K4; 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 S230009AbiLQBJY (ORCPT + 68 others); Fri, 16 Dec 2022 20:09:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbiLQBJV (ORCPT ); Fri, 16 Dec 2022 20:09:21 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86B2D26489; Fri, 16 Dec 2022 17:09:20 -0800 (PST) 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 2349362295; Sat, 17 Dec 2022 01:09:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BE18C433EF; Sat, 17 Dec 2022 01:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671239359; bh=8xpp5MLvKY8KzVXKEqfKMt8HVvfyO0C36vgYBC8BXg4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Ac2sr7K4EDW2JK34cSpmEXQmOaOV+p3SSawEjRXnz7IfpjXBn409LfOtFWfQOHYbo 2/YjKiBoS0oE4ZoZ/gtn5ggCIas7gdp6SSOHbdiYGLte+0MOJ4BR/Ub9lZAKiaFq45 ck9DyqI8tPUsviSIrByuXGeOwGP2LKnOWU8O7SOD4le7OCdNEaaET/tMe86ZI6zSTg 1Vq7JWcHT7837HJk/aaERJJPlyO9I8pYsrCS8OYSZrWal6QD48JCRTB6boHfbvpeFD agFaZdDkwN7Ct9cN3vkM4Z55h1eHQXyCvePQ+zn2hSj2wH2RLfmA5KU5CUpm0oE5Wr mVoS5A+J3/eJg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 234F85C0A2D; Fri, 16 Dec 2022 17:09:19 -0800 (PST) Date: Fri, 16 Dec 2022 17:09:19 -0800 From: "Paul E. McKenney" To: Zqiang Cc: frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: Remove duplicate settings for rcu boost kthreads affinity Message-ID: <20221217010919.GG4001@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20221215090029.2972236-1-qiang1.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221215090029.2972236-1-qiang1.zhang@intel.com> 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 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, Dec 15, 2022 at 05:00:29PM +0800, Zqiang wrote: > Currently, when CPUs going offline, the rcu boost kthreads CPU > affinity has been reset in rcutree_offline_cpu(), therefore this > commit remove duplicate settings in rcutree_dead_cpu(). > > Signed-off-by: Zqiang One question... Given that rcutree_offline_cpu() causes rcu_boost_kthread_setaffinity() to be invoked with the number of the outgoing CPU, but rcutree_dead_cpu() instead passes in -1, are these two invocations really redundant? Thanx, paul > --- > kernel/rcu/tree.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 65f3dd2fd3ae..20de83ed0c7e 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -4122,15 +4122,10 @@ static void rcu_cleanup_dead_rnp(struct rcu_node *rnp_leaf) > */ > int rcutree_dead_cpu(unsigned int cpu) > { > - struct rcu_data *rdp = per_cpu_ptr(&rcu_data, cpu); > - struct rcu_node *rnp = rdp->mynode; /* Outgoing CPU's rdp & rnp. */ > - > if (!IS_ENABLED(CONFIG_HOTPLUG_CPU)) > return 0; > > WRITE_ONCE(rcu_state.n_online_cpus, rcu_state.n_online_cpus - 1); > - /* Adjust any no-longer-needed kthreads. */ > - rcu_boost_kthread_setaffinity(rnp, -1); > // Stop-machine done, so allow nohz_full to disable tick. > tick_dep_clear(TICK_DEP_BIT_RCU); > return 0; > -- > 2.25.1 >