From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 506CFC32793 for ; Wed, 18 Jan 2023 17:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=72LwLxshdYbiMEFG+My9lAGtrv5vopM1o5a9UY1VV1E=; b=W7PYf0/5IIkE3c 8csS+kUaRDafQMExGYexIHFrQFhEuIzmO6wLpuOvJ737Ca2LKbg1uFj7blxqCRiYutDMSSdc7Q5/K uzaoOtbRJPqSvls0s6E0pH1MCoj7/z60Ievd7N+PDkOg2BmQAdvReVM4EAe3PPDDAHdcdWL1AESLl 1kugAaNrlaIsS+W2KVUfP5vRNy5nFvqPf9RxfnMUfzqoaXEFHSPS4sK4bRpKR9bB24ZDUmSveIgp9 cEM9fnvjEkXAAWC4M4yOSqLPCGjO2tnRBEfwdb3wL/mTC+KHjcwqiCy1yBwITpt4NxHU+IXCjLSI/ X2EPgt2yE7hpHNMaGrgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pICfw-0028P0-AY; Wed, 18 Jan 2023 17:56:40 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pICfs-0028O8-T5 for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 17:56:38 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3E3126191D; Wed, 18 Jan 2023 17:56:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99AD1C433D2; Wed, 18 Jan 2023 17:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674064595; bh=cmDhZpFOMrK2I3PDHm2cpre02sim6FNy5tmvNkl/WTk=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=OYr1GVWgvWe3ev4FRHZhkr7AiwxKf1BmuDeRwmueAVvAMjO8NIH4qdD6xl3QHKgQ9 1SGR7wi8lJ46DDfl+NLEQTfUmPCI8JUcn16/HS127kNkoC12sSyx3vSSCJHzSyGDvf sTMpX8dDbr2uDAtwWfSQ07nvv+VYA33HU6wAGQdSxORK1ttewUbxdtvUgZeANmC77X 4J6xayR+xlkTA7F1KZNjIJ+QNPkyj/Stmucgs8lSj5AXVGQxRtkrlnQ/6Y3LORnGZk cPiW3r6AqeaqlDwB7WbHvmUpm+fDmonT5DWMt7dbF78pp4rLzTwY86cGf6jV3RtSdY L+TL/H0PBSokQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 2ECA45C0920; Wed, 18 Jan 2023 09:56:35 -0800 (PST) Date: Wed, 18 Jan 2023 09:56:35 -0800 From: "Paul E. McKenney" To: Will Deacon Cc: Joel Fernandes , Zhouyi Zhou , "moderated list:ARM/STM32 ARCHITECTURE" , Marc Zyngier , Mark Rutland , Catalin Marinas , rcu , Frederic Weisbecker Subject: Re: arm64 torture test hotplug failures (offlining causes -EBUSY) Message-ID: <20230118175635.GC2948950@paulmck-ThinkPad-P17-Gen-1> References: <20230117043011.GD2948950@paulmck-ThinkPad-P17-Gen-1> <24953EEA-5B3E-4046-B106-7A7FBE8B8995@joelfernandes.org> <20230117045456.GG2948950@paulmck-ThinkPad-P17-Gen-1> <20230117204231.GP2948950@paulmck-ThinkPad-P17-Gen-1> <20230118040058.GV2948950@paulmck-ThinkPad-P17-Gen-1> <20230118165121.GB19026@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230118165121.GB19026@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_095637_038719_43553305 X-CRM114-Status: GOOD ( 27.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: paulmck@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 18, 2023 at 04:51:22PM +0000, Will Deacon wrote: > On Tue, Jan 17, 2023 at 08:00:58PM -0800, Paul E. McKenney wrote: > > On Wed, Jan 18, 2023 at 02:17:06AM +0000, Joel Fernandes wrote: > > > > I would be happier to forgive failure to offline housekeeping CPUs than > > blanket forgiveness of CPU 0. Especially given that I recently got > > burned by a non-zero boot cpu. ;-) > > > > But wouldn't it be even better for cpu_is_hotpluggable() to know the > > NO_HZ_FULL rules of the road? > > > > > Adding Frederic to CC as well as we are talking about > > > housekeeping/isolation stuff. > > > > But as you say, perhaps Frederic has a better idea. > > > > > > And topology_init() sets this based on platform_can_hotplug_cpu(cpu). > > > > And this function sets CPU 0 as !cpu_is_hotpluggable() unless the > > > > architecture specifies a .cpu_can_disable() function. > > > > > > Ah, that is 32-bit ARM code only. This issue is on 64-bit ARM (arch/arm64/). > > > > Apologies! I will look more carefully at the pathnames next time! > > > > But maybe arm64 needs something similar? > > Just chiming quickly from the arm64 side here, but there's nothing in the > architecture that precludes offlining CPU 0 and it certainly works on some > platforms, so I'd be hesitant to rule it out entirely for testing. > > One reason why hotplug can fail in practice is if a trusted OS (i.e. code > running on the secure side of the fence outside of Linux's view of the > world) is resident on a core and rejects firmware requests to power it > off. The PSCI code (drivers/firmware/psci/) should detect this and return > -EPERM, although earlier in this thread there was mention of -EBUSY so it > sounds like something else... We can certainly special-case -EPERM in rcutorture. But what should we expect? Would this be a random encounter with a trusted OS, or should we expect that a given trusted OS instance would grab a giving CPU long-term? My guess is the former, but I do feel the need to ask. ;-) Thanx, Paul _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel