Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4271493rwl; Sat, 7 Jan 2023 14:50:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXtvariCqSHJDGO1GnLSaxquRXHhfMwPQYR3JIer9bG+H2Ca5TXeTvtTwHH1KjclONYj0Bda X-Received: by 2002:aa7:cf94:0:b0:47b:16f5:61dc with SMTP id z20-20020aa7cf94000000b0047b16f561dcmr52409463edx.37.1673131811202; Sat, 07 Jan 2023 14:50:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673131811; cv=none; d=google.com; s=arc-20160816; b=j9ERXI2FQJgpFUbwlDLaqQsxWYWhvcIivX6kf/a7kd80asMMaDnig8Rv7V3ZWRPXu0 6IHS+rD1KdMJYllWeP904xtvFpYMyXQzB8srWMzHf0pHwPlNLtRnkWF4Kjp93r5xvY7y hhF82SmkdOSvLzHvtGidL0e2FOaDc9tlX5r1r37/pqq8/VJd5afGFyaRHBWxEgBoL/vz OCn/6JqgIAUB1VBOCwDHYCIiEzbalP9q43tvDrJ/X5BPRTCtlRKux/oE4KhkxusQPrru 669hX27KlyojtgOf4z2wWqvQmHsf4ynTao4MqvhRc65/DisGimM7SXgwxYMjWZ2oUjWU +hRA== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=M+/EBt/sWdGB+tEfsnFShXEaSccBFX+MO9MGYX+lhHw=; b=QnPim9R/SF2WlAykigztICuyTs725q/FMNCPOe3JW/VdV276bTEHwqpIhs6rM56OZH B6U9TNqxUns03AJEENj2YCTb88PnUaswTYORY2TlPW52naKyXunPDuq9NtqqY3o5xKc5 hPQ9tigvYlVgCnfhwtj2vC2tXqjfKoQ/PlQSCx3gd3TguUfopNKE10Q40tTlOEpS4OnS T4S4zn4nvgN81R3VOv6lD+10SemyucHxK2smLQHF/f/5xNfIx6ZL5UUpPtkux+j7x9kD PrwlGKa8cC44A4eEj8ndJJ73EIusBdQh0CKRSFRMekuSbB0DsYn276MMk8qIK5Bhjc/T UFxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qi5HlktY; 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 n4-20020a509344000000b0045731196587si5067496eda.64.2023.01.07.14.49.57; Sat, 07 Jan 2023 14:50:11 -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=qi5HlktY; 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 S232909AbjAGWLs (ORCPT + 53 others); Sat, 7 Jan 2023 17:11:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbjAGWLl (ORCPT ); Sat, 7 Jan 2023 17:11:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECD053DBC7; Sat, 7 Jan 2023 14:11:39 -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 ams.source.kernel.org (Postfix) with ESMTPS id 939E3B80184; Sat, 7 Jan 2023 22:11:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE1EAC433EF; Sat, 7 Jan 2023 22:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673129497; bh=M+/EBt/sWdGB+tEfsnFShXEaSccBFX+MO9MGYX+lhHw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qi5HlktYw3sPrJ+4CuJjHoa1SHWvcckTnYmtXlnS9Jxfvf4ZC0pvU7KqQAHlH6dDI eLmMb6OGiGDvQAkkVwm95V8MuF6BA+yxtcmh5baiWNqc8lgAgkOix/lro5+KE8lu5i y660iRBnpRVDRHK4QlRkRJx1GRGjn+lJEmfoC/6Ls6KtkCTIAIENxFi9cJ1YmXitQ/ SwR2Cnppeo6MSx57jpAvh9IuS5I4cL3NVAfRcSva7F+fpgXb7/pfWFAUny9QCgb436 XSJb5LPbo56vJz3miq+er1WcuSIEdTZ6yAsvdsd3iqraEwrX96zs+IdenODcncsIi9 HciIXMkBsq/pQ== Date: Sat, 7 Jan 2023 23:11:34 +0100 From: Frederic Weisbecker To: Joel Fernandes Cc: paulmck@kernel.org, Zqiang , quic_neeraju@quicinc.com, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check Message-ID: References: <20221221201634.GH4001@paulmck-ThinkPad-P17-Gen-1> <344A2A3B-628E-467C-BBDF-11C3AB63D432@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <344A2A3B-628E-467C-BBDF-11C3AB63D432@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 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 Fri, Jan 06, 2023 at 07:01:28PM -0500, Joel Fernandes wrote: > (lost html content) I can't find a place where the exp grace period sends an IPI to CPUs slow to report a QS. But anyway you really need the tick to poll periodically on the CPU to chase a quiescent state. Now arguably it's probably only useful when CONFIG_PREEMPT_COUNT=y and rcu_exp_handler() has interrupted a preempt-disabled or bh-disabled section. Although rcu_exp_handler() sets TIF_RESCHED, which is handled by preempt_enable() and local_bh_enable() when CONFIG_PREEMPT=y. So probably it's only useful when CONFIG_PREEMPT_COUNT=y and CONFIG_PREEMPT=n (and there is also PREEMPT_DYNAMIC to consider). If CONFIG_PREEMPT_COUNT=n, the tick can only report idle and user as QS, but those are already reported explicitly on ct_kernel_exit() -> rcu_preempt_deferred_qs(). Thanks.