Received: by 2002:ac8:5349:0:b0:427:7d78:cd45 with SMTP id d9csp270042qto; Tue, 19 Dec 2023 07:47:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IE429yHXHDj746qhzCDzbYxjP+AFF2hfJPbNdgEp1gvL+JfJ4/x6NWyaLWf3LJ2kCDXOqYu X-Received: by 2002:ac8:580b:0:b0:423:7ed0:fe6a with SMTP id g11-20020ac8580b000000b004237ed0fe6amr22810900qtg.8.1703000853336; Tue, 19 Dec 2023 07:47:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703000853; cv=none; d=google.com; s=arc-20160816; b=MfAgOjBsEUKa6H/iBKTatcksCQfDkySJNYvOF5fqUsoJDavwmyAi7QxIUJUnVzr5Ds GjY8AXxMArt7xfrWoxMui3SiBfSx/1ohgBrjmZ7RZUIDwHkZqiMFqZN9mRsTZ+XzGs0w 8LwSyeyehVywMqqEL83C9EPGrxkzCjQRIvnuUwY21nMDVwUE8Rg1O6DrgJsrmpbsE4rG nCpVId+nY8PNkEdZPxLbpaqAI+YQKCNj8upL0Hrumdm1dfWM+iB8JiPL2z/YmoNW0FXF kart1AlUgANgAIbTcK1iXGJEyTc3txCJ5ZD/B8gIKutArjrTN6jX0HexGSiig0TZWoYr a5oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=P1I/cbXbkZVmnelj6fIvhxvYOKmvl+ivBnPu07MTPGM=; fh=bMdXzmi9mlSxoA7r5Uw7hN+GFhPrClSZ1y81C9cCd3o=; b=bYbwra5WYUT3msS6qErnAFss9/n8LlDfBRE1fqrdluTyolNYrCOfDiqD5OSrugd2H4 UQcp/6KKyqsGmHIT4BdNjWqzX1Wpyjre+lQODRwWkfSBX+dbkbOIkgbjTe2UzkwPXfuX SLFwu32fCG40dJkbogm5etkQjEbPZKn3DLaC3AgBf5Y5wVP7K1jYth2q2HvzqR3xhj0e rc6XnHsi4oX8GLmC5+tCkVcQh04Gm14ELLBIGbEzr/cJ++I6hh+YX6TRHKIFGxYBNt/c sbhGBRJyBlontRhD39MSVIGxcmgehfyI4bS8mUpFEuVYhwDVOrYmeNPW6yDfZDAy/MOj xVuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kj0CwLgR; spf=pass (google.com: domain of linux-kernel+bounces-5511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5511-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u10-20020ac858ca000000b00423961c8e7csi1138948qta.155.2023.12.19.07.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:47:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kj0CwLgR; spf=pass (google.com: domain of linux-kernel+bounces-5511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5511-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 1C34D1C247B5 for ; Tue, 19 Dec 2023 15:47:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1C951D522; Tue, 19 Dec 2023 15:47:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Kj0CwLgR" X-Original-To: linux-kernel@vger.kernel.org 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) 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: linux-kernel@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.