Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2629676rdb; Fri, 8 Dec 2023 14:06:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7uguwuIoqhCR0P0QPThBNRlm/RYy1yEy0DA1ZA+gJeurivs2pJ+Th4745gop6/L6g5bNK X-Received: by 2002:a05:6e02:1605:b0:35d:7ac7:359c with SMTP id t5-20020a056e02160500b0035d7ac7359cmr1041457ilu.40.1702073183767; Fri, 08 Dec 2023 14:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702073183; cv=none; d=google.com; s=arc-20160816; b=OdOdbCOTGfKZgIzJE8Ra/RP7aHyGXl4X+RGAjp2IkunEZWk/LyqiMDOp7/LBXJb0uV iChT6LAjqp0bgZJNS4CZFeGWATYYkdufI0+DEO5irFWJ0TWBiFTz8LjMwUReJ8lxUzGz BrgyNL0v+gu5VDY8lXi1sHjrfMI96H+/2S2kRcYdclv4b9f8/Q70DyPYgdsD6i41N25f QHDx1uQ32ng4ICvD0Qgpk6k/eI/3aShDEN/4NZgcIpkS9UUDswhs/QhbFKlkJBjn5wcx RKbriqhkMMS/oKUrrD76+SemP4SMvoIOkkHZTM+TEgbt6q7JnuWqlqCPcSqNFtEmFyjz T2Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NrBM1zEAC6Gp+/xEa0N53l5zIeMXXGWOtf3cqfcWRZs=; fh=ruOaVEkAbEh3t4sLFZXGQmBwM4c1/V/LLnMggyZGb4c=; b=V0XBuvVNDNAEoBk8TxtLXYCbqhE/G2Edf/1E8ToPgdqgwcKXGlaHIR51mgoaUFJBkp AGitcWjJ3q5w9QQiX/+C9Xgs3OmptNhMYbdbKIRc3VkDh4jZXNMd70nq612CWUSlbcYm mNGmD3o5za3lxN1Tj5Fo23Jxy2mL/JB/PvW//8voPOkavKWF+nCzK1CrGW0KPNCn4ziF D46Y2JRCwNWv5TSmnZqXeS4StU2IS2REYEf3eChWKfpn1cucWdAC8hb98NEBD7lEkowJ 6uqckKyekBtgWouBiXv+rOfjwDFAYxxCdmDXCf4VSKKMFB1NUV1t/oybeg/aobrw3p4D oDpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pw+MKktq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id q6-20020a635c06000000b005c6cc76fd44si2064027pgb.101.2023.12.08.14.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 14:06:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pw+MKktq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5113981C09B9; Fri, 8 Dec 2023 14:06:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574840AbjLHWGE (ORCPT + 99 others); Fri, 8 Dec 2023 17:06:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574835AbjLHWFq (ORCPT ); Fri, 8 Dec 2023 17:05:46 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23DDE10E0 for ; Fri, 8 Dec 2023 14:05:53 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A29DC433C7; Fri, 8 Dec 2023 22:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702073152; bh=CgYvOu578AFfLRbBC6EHcv8SUptcV6n5XjcrCPA7nDI=; h=From:To:Cc:Subject:Date:From; b=Pw+MKktqBiWhUgo6VfuY7O/2yoxIeItlKxQdYL8fX1bz1s/zy7Ihk79bC/wo1Bxzi uRBhcWs2U2UYM8pajpvAJQqhLS1aJEJRK3lZWjiB/Kbo2QkALyO58X3A+D0NApzlhs Bn8MOA1bGIAehpbs4DsmTNLqnsEvc+owbWRKAMWST3L6qc9VgdnxnPkdwwF1GDQ9ft Gv8/IyjFjDnOlait/gfqbobtCiex+zCxlqD/+1oAvQaJ8mGK9w38VwSjdMgdTa4A87 lZqYCSKGDMU3PDjsZgd5PKusJFY5k5lUn0Nhnu4KjvGW4OcWko9ekeeaqzdFsFBZ7v jnjrxXCI3aBvA== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , "Paul E . McKenney" , Uladzislau Rezki , Zqiang , rcu Subject: [PATCH 0/8] rcu: Fix expedited GP deadlock (and cleanup some nocb stuff) Date: Fri, 8 Dec 2023 23:05:37 +0100 Message-ID: <20231208220545.7452-1-frederic@kernel.org> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Fri, 08 Dec 2023 14:06:19 -0800 (PST) TREE04 can trigger a writer stall if run with memory pressure. This is due to a circular dependency between waiting for expedited grace period and polling on expedited grace period when workqueues go back to mayday serialization. Here is a proposal fix. Frederic Weisbecker (8): rcu/nocb: Make IRQs disablement symetric rcu/nocb: Re-arrange call_rcu() NOCB specific code rcu/exp: Fix RCU expedited parallel grace period kworker allocation failure recovery rcu/exp: Handle RCU expedited grace period kworker allocation failure rcu: s/boost_kthread_mutex/kthread_mutex rcu/exp: Make parallel exp gp kworker per rcu node rcu/exp: Handle parallel exp gp kworkers affinity rcu/exp: Remove rcu_par_gp_wq kernel/rcu/rcu.h | 5 - kernel/rcu/tree.c | 222 +++++++++++++++++++++++++-------------- kernel/rcu/tree.h | 12 +-- kernel/rcu/tree_exp.h | 81 +++----------- kernel/rcu/tree_nocb.h | 38 ++++--- kernel/rcu/tree_plugin.h | 52 ++------- 6 files changed, 191 insertions(+), 219 deletions(-) -- 2.42.1