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 5E49E153BF7 for ; Wed, 18 Dec 2024 17:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734543149; cv=none; b=C7nSn8qh/KQRR0YrST7NWjnHZHyd0FAfhOfmZzrzBZgOhSfFBb/e4VIbhDHTPOIs/CxDaGVkcBF+JLX2m8o9AQkTbA8oYH4OctaQ3htd63kXkyiIGn7O+e2o7veGLMeZ13UcoAIpKSkxUDvE52BVFMkM85hCM0yPFL1vfJdSj+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734543149; c=relaxed/simple; bh=qzgvz48OBFTprrqiUbZtVpIwDheBGn38gDTGqmvTXxM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JYmPEzNAmIcE+vFM4gniwjc10UkA5prOm+VrByRf8GgIIs3BYB8di4huKHYFxmr5+B3enRUr/MQCjXNh6lyhHClp5hoQsJmfyY3gY3o9PUHmy5uh0+BbB7pQL/qH/BGRs2i3LTdNJ7C56D6YVKp9ul4rdSH29R7+6wzNRfgosdk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t7Xc24dt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t7Xc24dt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81026C4CECD; Wed, 18 Dec 2024 17:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734543148; bh=qzgvz48OBFTprrqiUbZtVpIwDheBGn38gDTGqmvTXxM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t7Xc24dtAlwjvGle9rNVAFURdtbRCLwgSeVfJG6VvoMacW0GLPOq2hzNTAXiucK6A Y1ZZR9SXXQgTjjahIHOL7Mhp/mBjVPMSWqkYZ57CNuc1xXcJ+3VqUS82oRO2vR5M8o 3ScBf7oUAVEFWkVmmyGklYZg1rewekpCvfQZo035bCOG2SX8AXscSARqlxd5aHrU3m grAwk0L13EtigU42SuHQLwwszjF9IHWULW2EecujMc8ZLe9NEseKww9xFSg+ak/41N RY4Fwc9LAh/VzhdDVDtGWkQ8HUdxT56bcN5T+uCT0T6BT34MtsmBeBuUW2KkyfaHIH LIyzHjPNLHSIQ== Date: Wed, 18 Dec 2024 18:32:25 +0100 From: Frederic Weisbecker To: Peter Zijlstra Cc: Costa Shulyupin , Thomas Gleixner , Yury Norov , Andrew Morton , Valentin Schneider , Neeraj Upadhyay , linux-kernel@vger.kernel.org, Waiman Long , x86@kernel.org Subject: Re: [RFC PATCH v1] stop_machine: Add stop_housekeeping_cpuslocked() Message-ID: References: <20241218171531.2217275-1-costa.shul@redhat.com> <20241218172754.GP2354@noisy.programming.kicks-ass.net> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241218172754.GP2354@noisy.programming.kicks-ass.net> Le Wed, Dec 18, 2024 at 06:27:54PM +0100, Peter Zijlstra a écrit : > On Wed, Dec 18, 2024 at 07:15:31PM +0200, Costa Shulyupin wrote: > > > Which synchronizations do these functions require instead of stop_machine? > > *sigh*, so you're asking us to do your homework? > > But clearly you're not realizing the scope of the thing: stop_machine() > serializes against every preempt_disable() region in the entire kernel. > > So you're telling me there isn't a single preempt_disable() region in > the kernel that depends on being before stop_machine() in its entirety? > > I know for a fact I've written some in the past 20 years -- what I don't > know if any of them still live and are still relying on it, because I've > also added synchronize_rcu_sched(), which later became synchronize_rcu() > which implies the same, in various parts of the hotplug machinery. > > Anyway, without you doing some proper analysis, your patches are going > exactly nowhere. And so given the cost of such analysis and resulting possible patches, here is an important question: is it worth the effort? What is the usecase of shutting down a CPU while other isolated CPUs run critical isolated stuff? Thanks.