Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp888540rdb; Sat, 7 Oct 2023 03:25:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFchimZT4gsBw86Sq4TDQXk3hM5gw7qnyI1dQ4OZ2nPjo3IAv2u/vIa0EAfkRUVwcZE+rDO X-Received: by 2002:a05:6358:8810:b0:143:a0bf:9a49 with SMTP id hv16-20020a056358881000b00143a0bf9a49mr10808632rwb.3.1696674314937; Sat, 07 Oct 2023 03:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696674314; cv=none; d=google.com; s=arc-20160816; b=zs1JLQ/qkU4eBMv0iBNqSW9P/wJfq13RvsFRA3srALwdXUj8ApwUwm+dCdT+uybPdG BM+B7incstkOs0URc8KpgEX/DBpGETGk/b5fFVqs83fPnt4RNCCDQkKwe+PNuuOj/ZVL 21pCgnCSe98Dz12/mJlzEpxkr2Pqd4sRos24gw0Z/v+k/qp2B2A5dyx1p4/PLcPkfkbA uzxpAMThAhGMUk0qD5BzniHRJasbMIdCX7zt0rlIQ1WWCjJZ3AvAD3P8Jcks5rAqT29C z0qQ5VTVnTL5qGTCVSPMpfPqKBtANZkChaUp02g7yKakT2+NgZJtzJfUCKBintItsl1n 0CFw== 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=oZrX+dTB7po/SFyO4VmNLR/v/7IkFcGD0fZTbD+Yg6I=; fh=bOhH2iGAci7rYoCgg+Dv13Po7ijNs5qSe7/+Q+zs0aI=; b=PJrnuX4uxaANODaliWIP11LnxNhv0cYGEMQVLJLaeND4EEJsbHrMPM6QRzd/F/dxeP Ja8fIeWIQCxu/NU+JJw52ZX7Z5k15Qv7mhHGuTuLawgZKBn/9DAqRBC+ktDxj8/YpduI MlbBhUL7ejSY5SjUaebnQNwUyn++rl5s4I68Nk+Ua904jPmjvcdrCKYMAGjx1g00W9EX IHMZbQPYQ05Ebst8t916LD3+rOpVIV+tWJV58Fxpjfed913n9TEZy1u+y8wU5wN0EU+o Hx/i1+O6yqJ8uVkVMD89Fag5EgxtpR94n0nmYVqQFbQDrFpfP9tzC/G2IrvsSw8jV0dc 1jBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OJ+njM1d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q7-20020a17090aa00700b002764fc15dd3si5558381pjp.37.2023.10.07.03.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 03:25:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OJ+njM1d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 02AFB8029AE6; Sat, 7 Oct 2023 03:25:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343825AbjJGKZH (ORCPT + 99 others); Sat, 7 Oct 2023 06:25:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343783AbjJGKZG (ORCPT ); Sat, 7 Oct 2023 06:25:06 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6731193; Sat, 7 Oct 2023 03:25:05 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2773523b2b6so1941109a91.2; Sat, 07 Oct 2023 03:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696674305; x=1697279105; darn=vger.kernel.org; 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=oZrX+dTB7po/SFyO4VmNLR/v/7IkFcGD0fZTbD+Yg6I=; b=OJ+njM1dFP/ZorHh3Mzlf1jEIX7P22pEq03dvKLj4x49vtNGekE3ofD1rEKqU1h3RW uDBFNlxFpExXuS2oyFRBk1uIYffgWhwqbLiXDEndLc+9zQoXVuYyvuMyWaPCTFCACLXR ptzCbMcMSj+sHn1MwtQ5JaqzUOAePcMbMS7Ik1uCmuX3vFaVGew0lm6huhO/yGxcA5V0 aUqHG8PvAnokT+vZJ77ghVwRtXvDOHnAqTeTPVCR0JmQNQC4B8ucMtvf3wiqyc/UnAGE Z+2f5eQU1uAs+KRhAmNeK0ODJUT7IIanHZiIW5agHmXoLsbFTh55x8TpfmCVczQj5SjN d6cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696674305; x=1697279105; 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=oZrX+dTB7po/SFyO4VmNLR/v/7IkFcGD0fZTbD+Yg6I=; b=i4OPgoJcsMIfVRy2hXLoWj3ZGkfAQHXiEPDYkSiXKwa9IJHGdeqYkYbr+Cow7uEvDH H4g5lS3jKKecYs3fZEQFlXoxNrrhp48aM6G+6lkdssOY31VmXthkIx0ywDqwMbizEvH+ ObaFenQYIhKlQnMdnQfl1ZiHpyIqm4ZwiiUm+mcfbHZ2TVrIF3+hYJ6VL9mqmCo3kus5 e/YLd1cMfkRSgA21StTZI/TDppsOJgEshPs6XomDy2aawTQIvhM27tdSZJeU76cTctWl sXSal7ugkK1u2fkUhx8DkHX6ypQOHlVB5ibpQ9NgB0DufPPaFAqXqgw1C08L2m8+eFBi s16Q== X-Gm-Message-State: AOJu0Yxb1MerWLWkiPeBgLo6w3lKgsdYpEUeeMxJhoMtB1oQL0CEAzGi 8UHlczRqyPsOktHguYKXckg1zrOfTSw9J3fcf8w= X-Received: by 2002:a17:90a:fe17:b0:277:cdc:29cf with SMTP id ck23-20020a17090afe1700b002770cdc29cfmr9865372pjb.46.1696674304734; Sat, 07 Oct 2023 03:25:04 -0700 (PDT) MIME-Version: 1.0 References: <20231003232903.7109-1-frederic@kernel.org> In-Reply-To: From: zhuangel570 Date: Sat, 7 Oct 2023 18:24:53 +0800 Message-ID: Subject: Re: [PATCH 0/5] srcu fixes To: Frederic Weisbecker Cc: "Paul E. McKenney" , LKML , Neeraj upadhyay , Joel Fernandes , Boqun Feng , Uladzislau Rezki , RCU Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 07 Oct 2023 03:25:14 -0700 (PDT) On Wed, Oct 4, 2023 at 5:25=E2=80=AFPM Frederic Weisbecker wrote: > > On Tue, Oct 03, 2023 at 05:35:31PM -0700, Paul E. McKenney wrote: > > On Wed, Oct 04, 2023 at 01:28:58AM +0200, Frederic Weisbecker wrote: > > > Hi, > > > > > > This contains a fix for "SRCU: kworker hung in synchronize_srcu": > > > > > > http://lore.kernel.org/CANZk6aR+CqZaqmMWrC2eRRPY12qAZnDZLwLnHZbNi= =3DxXMB401g@mail.gmail.com > > > > > > And a few cleanups. > > > > > > Passed 50 hours of SRCU-P and SRCU-N. > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks= .git > > > srcu/fixes > > > > > > HEAD: 7ea5adc5673b42ef06e811dca75e43d558cc87e0 > > > > > > Thanks, > > > Frederic > > > > Very good, and a big "Thank You!!!" to all of you! > > > > I queued this series for testing purposes, and have started a bunch of > > SRCU-P and SRCU-N tests on one set of systems, and a single SRCU-P and > > SRCU-N on another system, but with both scenarios resized to 40 CPU eac= h. > > > > While that is in flight, a few questions: > > > > o Please check the Co-developed-by rules. Last I knew, it was > > necessary to have a Signed-off-by after each Co-developed-by. > > Indeed! I'll try to collect the three of them within a few days. If some > are missing, I'll put a Reported-by instead. > > > > > o Is it possible to get a Tested-by from the original reporter? > > Or is this not reproducible? > > It seems that the issue would trigger rarely. But I hope we can get one. There is currently no way to reproduce this problem in our environment. The problem has appeared on 2 machines, and each time it occurred, the test had been running for more than a month. BTW, I will run tests with these patches in our environment. > > > > > o Is it possible to convince rcutorture to find this sort of > > bug? Seems like it should be, but easy to say... > > So at least the part where advance/accelerate fail is observed from time > to time. But then we must meet two more rare events: > > 1) The CPU failing to ACC/ADV must also fail to start the grace period be= cause > another CPU was faster. > > 2) The callbacks invocation must not run until that grace period has ende= d (even > though we had a previous one completed with callbacks ready). > > Or it can run after all but at least the acceleration part of it has to > happen after the end of the new grace period. > > Perhaps all these conditions can me met more often if we overcommit the n= umber > of vCPU. For example run 10 SRCU-P instances within 3 real CPUs. This cou= ld > introduce random breaks within the torture writers... > > Just an idea... > > > > > o Frederic, would you like to include this in your upcoming > > pull request? Or does it need more time? > > At least the first patch yes. It should be easily backported and > it should be enough to solve the race. I'll just wait a bit to collect > more tags. > > Thanks! > > > > > Thanx, Paul > > > > > --- > > > > > > Frederic Weisbecker (5): > > > srcu: Fix callbacks acceleration mishandling > > > srcu: Only accelerate on enqueue time > > > srcu: Remove superfluous callbacks advancing from srcu_start_gp= () > > > srcu: No need to advance/accelerate if no callback enqueued > > > srcu: Explain why callbacks invocations can't run concurrently > > > > > > > > > kernel/rcu/srcutree.c | 55 ++++++++++++++++++++++++++++++++++++-----= ---------- > > > 1 file changed, 39 insertions(+), 16 deletions(-)