Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2880779rwo; Mon, 24 Jul 2023 02:48:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEishaLQhh19yVKTe/x0DlOjWqBCB1kgu/fBRer4Z703rSFyywIo7EfAuj/j7K3nYLu1Jk4 X-Received: by 2002:a17:906:cc16:b0:992:d013:1132 with SMTP id ml22-20020a170906cc1600b00992d0131132mr8583534ejb.1.1690192127816; Mon, 24 Jul 2023 02:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690192127; cv=none; d=google.com; s=arc-20160816; b=AhBuJMUM+OQyrbDMqcDlEfdfwt2Fsk9BVwCV4ZouP3/sg9/iEAmrkQODbb88EjOU+b cI6GVQszsRgz7+vhp9j1dFKMcjvj42xxSqBlZ/M1GeV65bSAHE+m7QC1SQ1ipyMh9kvh cTbcxpjGVvT/JqjEsLYuGp9WsXDPDC/7zmyErlRlSpqPyyB6HvDz/jscdEHnT/c90Lxg +M0oCnT+0Rn+fR0qEVPfCC5Eqpn4mrnwkGVLKCYei7ooKtT+D8Py+plDm0jrzW35MUgU nAIlmhYi1BZL6jEyyOb1u6jkxIOH0G7fLosKUEjYOPutEDLEKswnv5rrAbC3XjkpN9m7 EwkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=JfEU2ZBwaAPSdHcxYxp7PZGApqbwJO+Vmtwst6/ID84=; fh=zY1yALn7stPY5/QMzZ3Lo7pEH6VUEa0MDhxupRLYHSo=; b=KYvQlRBbY7C0l3OBwcwHP180j0VkEdozcGtZTH0vnjQqd31jItCCxIUTAZyj0VVpbu 1PJGqJUFhMMXBZtQhSXDebu4kLeBqu/xBqY064VKj042lmHn6Sh9Oof2lvuFLuSZ2DcP DNrHSZrmIFxEElmT1q/Aa68TEp4lijAUcb3HHjOSuiJGDpPDO8Q3OT0acewYnFqLEBaJ rfXmdIXx2ur2jY0u6hLWhHETJlIIxuz9IBnCCIi2WuGsp9K1Gy69rpDTtWPjPkSzkBAO CLRve7+FCwtEqtWZjRP+GFTuk6GjovOcH+XLdJycDH6BNor/Gku0krs0TmVAwUPctWMe udJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=glTr1mip; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xo18-20020a170907bb9200b0098947f89083si6219183ejc.390.2023.07.24.02.48.22; Mon, 24 Jul 2023 02:48:47 -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=@gmail.com header.s=20221208 header.b=glTr1mip; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232047AbjGXJAj (ORCPT + 99 others); Mon, 24 Jul 2023 05:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232096AbjGXJA2 (ORCPT ); Mon, 24 Jul 2023 05:00:28 -0400 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A02210F9; Mon, 24 Jul 2023 02:00:06 -0700 (PDT) Received: by mail-qk1-x730.google.com with SMTP id af79cd13be357-767ca28fb32so224453185a.1; Mon, 24 Jul 2023 02:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690189205; x=1690794005; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JfEU2ZBwaAPSdHcxYxp7PZGApqbwJO+Vmtwst6/ID84=; b=glTr1mipvYA7wtVO4+xo/elfVcJjXMQ/oHe/E2B4y+ZWYyDtkhqIzwd/S3TgoGNfQM Q8SyuyohY3WlPcj/x8SnZv45xB5TjquFb8S9ygF0ZkGEkuqHOGHVEzcBtxBL1MrhTE8f 2hSoz98bFVs/ZCyOsshYz/znMgDAw0n0KL89pfzt/8v1W4yzzj/UlD8SGIaUqiKh0XXw ca4xoWXHhItVCoj8qXnTgdIn/DaT1ioI3L8IFamDJfc0eclh77YPboOaMdHtlFMdVMIK FaeGip+xKdWMwJP9YhaCyadXL74KfvxrURieCh6CU7k1LZ7v9kRYy5ZZMKDTamp02M34 9aoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690189205; x=1690794005; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JfEU2ZBwaAPSdHcxYxp7PZGApqbwJO+Vmtwst6/ID84=; b=Z5m1Fr8P0PT2xIQGNnxZWhvDGfKIlCPybVjC3x/BXESb2LYF/UcEits76t0VjelsRc V0PLUvY8RvOixmDBF9me360TnNIoBMW5Q5X6x4Kks/OZhg/da4/3OAgO7ob7JycwaQ9D R0VXZJdGYKQBu03/m7R5KwSYwiISXmuJJ/v+sQdnlTN2M+J02Mo9BzSlrKSQ1nk74U7/ fwBYd27ZiETnb+MYMAxGuFIG8iUnthFLwowqAbTqWn7/PF/nUTHxnIQ6sNTrxCoc9kta M9kNf28DX4owSRBp+0pqzdWidoi4LWCn9lRBfepLGuyCKABzIS0x2/7E/WMKAqlJb/SX cOTQ== X-Gm-Message-State: ABy/qLbb6DMI5JPh1yWoFsBg+OyegwogY70ULF+RY128hfPAbCy6+FNc rWlJQpnfjMaJriVpZ5IvJixJvqxwfFk458APPnw= X-Received: by 2002:a05:620a:4405:b0:767:82e8:eb7a with SMTP id v5-20020a05620a440500b0076782e8eb7amr7825847qkp.17.1690189205279; Mon, 24 Jul 2023 02:00:05 -0700 (PDT) MIME-Version: 1.0 References: <20230721121534.44328-1-ppbuk5246@gmail.com> <05e98227-77f4-4918-8f8e-2170a158e350@paulmck-laptop> <31070aab-8665-44c4-8950-0631a777ef44@paulmck-laptop> In-Reply-To: From: Yun Levi Date: Mon, 24 Jul 2023 09:59:54 +0100 Message-ID: Subject: Re: [PATCH] rcu: remove unnecessary check cpu_no_qs.norm on rcu_report_qs_rdp To: Z qiang Cc: paulmck@kernel.org, frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org, boqun.feng@gmail.com, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Hi, Z qiang. > Maybe this "start new gp" note misunderstood you. > For built with CONFIG_RCU_STRICT_GRACE_PERIOD=3Dy and CONFIG_PREEMPT=3Dn = kernels=EF=BC=8C > if the gp kthread start a new GP before we exit the RCU read critical sec= tion, > and just before we call rcu_report_qs_rdp() in > rcu_read_unlock_strict(), at this time if the clock irq > happens and find that the "rcu_seq_current(&rnp->gp_seq) !=3D > rdp->gp_seq" is true in rcu_pening(), > will trigger RCU softirq and find that the rcu_seq_new_gp(rdp->gp_seq, > rnp->gp_seq) is true, > will set rdp->cpu_no_qs.b.norm is true. when we return from the > softirq and call rcu_report_qs_rdp() > in rcu_read_unlock_strict(), find that the rdp->cpu_no_qs.b.norm is true. > so there is a situation where the rdp->cpu_no_qs.b.norm is true. Thanks for making me out from my misunderstanding..! and even the not in STRICT_GRACE_PERIOD, old grace period's qs could be reported though rcu_gp_kthread start new gp by first rcu_report_qs_rdp, will be clear soon by continuous rcu_report_qs_= rdp which is triggered by interrupting before the first rcu_report_qs_rdp. Many thanks..! And sorry to make noise...!