Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6789188rwp; Tue, 18 Jul 2023 06:03:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlHotkQlowPcXqJchtWwpRc3vSTds0tqSMXACvGZexuK2xjFp3fM0RkONnqDXR9T2UDg/GtM X-Received: by 2002:a05:6a00:1686:b0:67c:c8e4:8689 with SMTP id k6-20020a056a00168600b0067cc8e48689mr15424755pfc.12.1689685433895; Tue, 18 Jul 2023 06:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689685433; cv=none; d=google.com; s=arc-20160816; b=aUkV+Kia7MfQzRSYd2Opvg+gETf3xwt/+lBOCIqf9+WUHkHz9+iF7nHKSglIE5whCS iGT3itTJGCpUaGI5w6KdxHP/2ZRg4pMpd/RF2x+aLp0LKTAgdTsV8T/hOvgKAsh3O1We g7GtbX75j6jLuzs7mOmiFGSFzLm6auvdPb/roZmEBaYDIUMmW7NnByCW2ksQyN5aXsHN lt45aGS/FiOG5/OkZMy/MNy71YDW1mL+C3SxuqavdcrkAze/f0yX2dEsGJPWqLto8Bmy hC35SZtn6TduUDVSUBe1uiaTdwugsfdOw16i98ppaEVXD+AoxMvnhWd98XyC+1mBfYIB I3oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=s3kTN4YamSI+ko6dM/L7aHZSrCBexbIuSEJDZBtJUAU=; fh=nZJpSKhua9IfaR6782lqdyVAF64l/o5spiVv/OPfAjE=; b=DWOIYWxopfQtZX56dJgWkFvtZMjjvhx85+GiswjZMmFmTF8HVZfkav30sNJl87J/eM NAHc+SBDvimWiqNZlPObKnG18u7mtMGPwKT/AFR0SnWn7eBkUNRCdVLDOwxtNnHQfDgt t3AXgNp1SqDA5iMUpxsva9zzuUXmhZMvf7Oqc1JIjXW8MNYjeCpLJZKpnJdLmM2jjqNK P9XlAI/PODa+B8w+ESRYehk4OxZ6K+MNJqpYp2SAIvL+6gslgkJuOit+IAE/MPbc+dG5 RY+YDQ1zOg3QH39fSv6S2mAsl+zEqR6Qgj8rawY0DVnX8h1SE8xgt5QJmhjCrbzYo2Om 9hEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=V+gPh2q0; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fd18-20020a056a002e9200b00675262821cdsi1579254pfb.113.2023.07.18.06.03.39; Tue, 18 Jul 2023 06:03: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=@joelfernandes.org header.s=google header.b=V+gPh2q0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbjGRM6u (ORCPT + 99 others); Tue, 18 Jul 2023 08:58:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230150AbjGRM6s (ORCPT ); Tue, 18 Jul 2023 08:58:48 -0400 Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C0D6E4C for ; Tue, 18 Jul 2023 05:58:48 -0700 (PDT) Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5636426c1b3so3572379eaf.1 for ; Tue, 18 Jul 2023 05:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1689685127; x=1692277127; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=s3kTN4YamSI+ko6dM/L7aHZSrCBexbIuSEJDZBtJUAU=; b=V+gPh2q0SUEyDUZvPYeclcaF/8fPibKR2Mh4HcvaG7m+e1W9m2jy6j86KjZKJqPyli Ex5mdJMaInMua4Pci1caiiBmH9NhSkantEJiqAe9/wrWVklSVmW1JyJRgMkRKd59QlVM Emtpvet9H93Uwl5XzgunsWYR+Xhp9Ts6EBKlw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689685127; x=1692277127; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s3kTN4YamSI+ko6dM/L7aHZSrCBexbIuSEJDZBtJUAU=; b=H/uIJCkvqGL7FhtmZwyBS31zgfYSlTtsdW9fPREyptLMWnFbwzsiaBSMpuvaQEE7hE BwHSd27iO7DM8zDsUvmiTowT1rqaw8RpJ9f/e48TOyeRzqTnfZ6dflU7ga4TcVNitwms vppaQsr+x+izcswjD3fsYNTrCzh+04mhhHyqFLavF1JdX3FEvfFfdT0N6r8nxGxh/H4X c38FyCTcSB4ajL/uU3SlRxDttfVK3SUz+jC5/rb8JGf81SqHnz83v+IAY+AYJb+ARCg2 TKWiPGcc7ipcSo6I9M15qyfKqJZuoFdJFunHCIgiVIxQkMupkh1PSDYTwce7mKCM31ZP ZbBg== X-Gm-Message-State: ABy/qLamd2IJOc/jWgB2lQbX1L4yxqIiLziuWxLfl2FF7oHps9Rize8X qWeTlqXlE7IYaXErYEaRAt4lKQ== X-Received: by 2002:aca:bd03:0:b0:3a4:1539:afff with SMTP id n3-20020acabd03000000b003a41539afffmr12850777oif.25.1689685127233; Tue, 18 Jul 2023 05:58:47 -0700 (PDT) Received: from [192.168.0.140] (c-98-249-43-138.hsd1.va.comcast.net. [98.249.43.138]) by smtp.gmail.com with ESMTPSA id t8-20020a0cde08000000b00635efe2f65csm709096qvk.30.2023.07.18.05.58.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jul 2023 05:58:46 -0700 (PDT) Message-ID: Date: Tue, 18 Jul 2023 08:58:45 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH rcu 4/6] rcu: Mark __rcu_irq_enter_check_tick() ->rcu_urgent_qs load Content-Language: en-US To: "Paul E. McKenney" , rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org References: <6127192c-da9b-4599-9738-6e8f92e6c75c@paulmck-laptop> <20230717180317.1097590-4-paulmck@kernel.org> From: Joel Fernandes In-Reply-To: <20230717180317.1097590-4-paulmck@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 7/17/23 14:03, Paul E. McKenney wrote: > The rcu_request_urgent_qs_task() function does a cross-CPU store > to ->rcu_urgent_qs, so this commit therefore marks the load in > __rcu_irq_enter_check_tick() with READ_ONCE(). > > Signed-off-by: Paul E. McKenney > --- > kernel/rcu/tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index fae9b4e29c93..aec07f2ec638 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -632,7 +632,7 @@ void __rcu_irq_enter_check_tick(void) > // prevents self-deadlock. So we can safely recheck under the lock. > // Note that the nohz_full state currently cannot change. > raw_spin_lock_rcu_node(rdp->mynode); > - if (rdp->rcu_urgent_qs && !rdp->rcu_forced_tick) { > + if (READ_ONCE(rdp->rcu_urgent_qs) && !rdp->rcu_forced_tick) { > // A nohz_full CPU is in the kernel and RCU needs a > // quiescent state. Turn on the tick! > WRITE_ONCE(rdp->rcu_forced_tick, Reviewed-by: Joel Fernandes (Google) thanks, - Joel