From mboxrd@z Thu Jan 1 00:00:00 1970 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 0F48D1D13C; Tue, 19 Dec 2023 15:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Kj0CwLgR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D07EC433C8; Tue, 19 Dec 2023 15:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703000843; bh=+Jv09aqqB55o8pN1kBnu6kkjl+pN06As0VbU1JQsbLE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kj0CwLgRMiWjB+XF6njqtLdfEWyA8oeacX2dl50oJsjHTWd/UMZWnt/OJLqzrsfHc +Ogk7/8vL4hipt5pNY8JmuuRH50X7F1FivoSnE3Mtma5ec7O2HgV544ADt5pPW1qTN DgyWVI2RG5Uijl3Ozr0cPv2eyyqsxAoUV5NAZmPVUkjsZKQEShrL2rMZ9f5q3XN0mr Anzqa1m4lrM0UkdBYhAtnCyvDACQQfdMhUBZY+Q0UeID5MMfzk1hdeObj2+kpuNuhs CgOslLkaQOz4bT9ZzAtUOFjYq0X+qMcmttUq2rC1qQBaBlfxhwF3i1sjFQTjR9Dl73 w8uXOGlM22J5g== Date: Tue, 19 Dec 2023 16:47:20 +0100 From: Frederic Weisbecker To: "Paul E. McKenney" Cc: LKML , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , Uladzislau Rezki , Zqiang , rcu , Thomas Gleixner , Peter Zijlstra Subject: Re: [PATCH 2/3] rcu: Defer RCU kthreads wakeup when CPU is dying Message-ID: References: <20231218231916.11719-1-frederic@kernel.org> <20231218231916.11719-3-frederic@kernel.org> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 19, 2023 at 07:29:23AM -0800, Paul E. McKenney wrote: > > +static void swake_up_one_online(struct swait_queue_head *wqh) > > +{ > > + int cpu = get_cpu(); > > This works because get_cpu() is currently preempt_disable(). If there are plans to > make get_cpu() be some sort of read lock, we might deadlock when synchronize_rcu() > is invoked from a CPU-hotplug notifier, correct? > > Might this be worth a comment somewhere at some point? Sure, I can add that. Thanks.