From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 5A4F81B0432 for ; Wed, 18 Dec 2024 17:27:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734542880; cv=none; b=RyoU1KwBrUiQTrL/dNXkJwUvfgc3u8gIBUMG4LjOojXn/tGa6iRF3VDMt6vyr9ceVKRPXSkMlO3090s3sMg0q6hLTGxX+DtRHEq6guQZeYcKADQB7R7MJ3briilBwFQzcvE74ESwvFhQv2wcqGkqcLTYEljQTCLUuHvMkoDnAuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734542880; c=relaxed/simple; bh=d1bJ8br0U6e6gRkWgJb0YrMpyK1OqqNPjK4MUMfvq6U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mXJsz8mrRkcxs6bxffdNE4jDOOIyYOTgWKqpTFo9UZVvCZtGSdBBBp0stZN/DRA2rf09D0B2R+0mGPTEX6P5boWpUtDJw62n+yvM/QD3mK5CIgCUOxu65pq7Ud3O0t8eDwqsFSGeQPMsb35E3tyAWKVQ/dPO+RGuFOFnNh+zCh8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=N/QnH+sr; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="N/QnH+sr" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=d1bJ8br0U6e6gRkWgJb0YrMpyK1OqqNPjK4MUMfvq6U=; b=N/QnH+srSP/0fDSZA9SsR1UflG y1T9pwM/XrKxX56RFPyqB43Q9J+X5vHmoLjqIwp6fmcPmjNJLvHESrh/+i17XDz00v3QVQ1t+bG7I hYmpaQuLvIDn2OWfPbzOfTKYoRsgpypF0IouiFXfMR+qb4Tq2NsTrlheIwAE0lzWmm6xjWt0i+Uyv axDCMTXqaFsJ1FU8edyDwmHBEaK+c5TErajeQ//b7pNlJCh1dyQTs0yQWPjWyGFh939fLVPMjwprS mNB+I6c6QvlnmFzkXqRCaNd0A++FgrwLjZjatPNzhYyZloqpCVMENAPi/o+YhCpoqDSrPAE/WWuSF ulTxmbvw==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tNxpy-00000005JAO-3jrr; Wed, 18 Dec 2024 17:27:55 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 430F830031E; Wed, 18 Dec 2024 18:27:54 +0100 (CET) Date: Wed, 18 Dec 2024 18:27:54 +0100 From: Peter Zijlstra To: Costa Shulyupin Cc: Thomas Gleixner , Yury Norov , Andrew Morton , Valentin Schneider , Frederic Weisbecker , 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: <20241218172754.GP2354@noisy.programming.kicks-ass.net> References: <20241218171531.2217275-1-costa.shul@redhat.com> 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: <20241218171531.2217275-1-costa.shul@redhat.com> 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.