Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2379643rdd; Fri, 12 Jan 2024 07:46:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGO2nNkSrR7s//1P/8djGCIUmagNnIzp0Wtkh/x3kaTiqHq4eVCr2MFZS6/4BZtlkKQjcKx X-Received: by 2002:a05:6808:14c3:b0:3bd:276c:8e2e with SMTP id f3-20020a05680814c300b003bd276c8e2emr1257583oiw.68.1705074398334; Fri, 12 Jan 2024 07:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705074398; cv=none; d=google.com; s=arc-20160816; b=MFIpOJIbQHNbxwvlgOv7ONxA+QTSSytKuA9icVdgBW8WBZL6NeVzmbcM88sOyAQyzI pcY1N+eNV/Zv1cL+QT33RMIhxJI3ha3kRft4ltFPfTGzDhqzJY6HCqYj8PA3RAazXYU0 e3NBVEzZnCl20ZDs4j+BTsB1StQtF19UCRubU2P1EVh/i7IR9wHITlVvzZKE6AY5y567 BCIrYoWnpeuYRBFRgpjYpR2iPV+o9V6tG8kgRavlYgqnOiC2Lo3/oiM0B+jNvFtR5Zt+ o4j6LyoeO+jFKS14VmJPWd9Aqg20m1xFA5joB6FaKIsLGGSxYgPhIY/ElV1mVAhZqGfd MsHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=nLPJ6YXinDyZhsFzPaJiDX5yRfV4FS7R3BQ3MEtuTV0=; fh=LxXsyjFlXk8IKpomJhOEuAfMOggTFJag//5BxskdOPA=; b=nnjDZ+OA6QAIjn6vrJhfefGFOYZ/tgKlqoDZc8uwOWTKZ+0URFKwF546geHMMTa7hj 4qZW78UBZqiJMFLUWGjDcCcNmEVd01tGRBenQN5kxQsHStzc1+W6BWTZMSxmCI5MLjRs l9QyTsr9Ij8+4WJBO+LGl1pQLsmulPtplV1twkq4BlTkFVoOuv/b+Oum9CdG1bRoJIFJ 7w+3imck46LcL09lvLMI8o5YuHgdIuIxuJzVq9VJaMLdfzDAmL/B1Ji6GSC/8uSUuNVc XRaeSlyRmFzfj4UyFSMT34PXz4gNQIOv2Jx1N8b93XIv2PqbOWtFX2NGeHUGNR8+Cw4b NFLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s1VHfd28; spf=pass (google.com: domain of linux-kernel+bounces-24818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id po1-20020a05620a384100b0078335f7a170si2975426qkn.6.2024.01.12.07.46.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 07:46:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s1VHfd28; spf=pass (google.com: domain of linux-kernel+bounces-24818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C5AF1C21A3C for ; Fri, 12 Jan 2024 15:46:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 961106EB6C; Fri, 12 Jan 2024 15:46:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="s1VHfd28" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C104D6EB4E; Fri, 12 Jan 2024 15:46:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 614ECC433C7; Fri, 12 Jan 2024 15:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705074391; bh=sqERbnaek2gOhofvXHUtaO6gMYEIXaSQNKqGujdSGJs=; h=From:To:Cc:Subject:Date:From; b=s1VHfd28XLMMWLH27XZJhQJuSKihUO2kfwK8Q0e4CcjbNWEo6bWpYb8hHvli79hrT 1bMHVu1vt2phOwgvIJx6pf2xfgxkfkqaZDf30YgovBRjdFihg5+XJkz07DoN0cvCua Uc+YI973ty5oeC08vyE8MGlx5EdAftM2sQ+x25fjKfpY3lczMAt9shiXT3vIbTadOm TpBtlk47uTEEowBQcN8t0RIC1YmFqMqfVIVl2I21/p0N39YO1U29x4Ylq3Dzs7aSCX Q43T+Lqx5CHF4D03Bwrk6P7yM1l6QtKsxLSceJE/9IwqmAm99oyDz5OwcOOOb6oavy 17LWod7r0pjWA== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , "Paul E . McKenney" , Uladzislau Rezki , rcu Subject: [PATCH 0/7] rcu: Fix expedited GP deadlock Date: Fri, 12 Jan 2024 16:46:14 +0100 Message-Id: <20240112154621.261852-1-frederic@kernel.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Changes since v2 (no functional changes, just renames and reorganization): _ Move nocb cleanups to their own series _ Rename can_queue parameter to use_worker [2/7] _ Better explain the rename of the mutex [3/7] _ New commit with just code move to ease review [4/7] _ Comment declaration of the new rnp->exp_worker field [5/7] Thanks. Frederic Weisbecker (7): 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: Move expedited kthread worker creation functions above rcutree_prepare_cpu() 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 | 175 +++++++++++++++++++++++++++------------ kernel/rcu/tree.h | 11 ++- kernel/rcu/tree_exp.h | 78 +++-------------- kernel/rcu/tree_plugin.h | 52 ++---------- 5 files changed, 142 insertions(+), 179 deletions(-) -- 2.34.1