From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 76D4A4779BE for ; Wed, 29 Jul 2026 12:51:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785329508; cv=none; b=mqvEzKJPQ+tkdKj7jl6A6b5/DpvfIRHjkBltzv4Q5V/SxF9aOtaGjSv1PmWsLzq+8IPpDfh9/fxaOIc+0vyWmpsKwKtR3UGhQuNaiimef8BzZnW5sj39Cdo3rHFlad/7N9CBMVe5KNuayGpujIqN4o6EIqhuHECr3sIyktkg82Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785329508; c=relaxed/simple; bh=xD3xWpEUvS/V/dl1GKDyMNUOsV+8zDMn8NpnfSosutg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MRKUhnPYl/oRzNiJv9Njz+XAUcRKDF28iG+rCrjcQ2mL93Xn12CnhnmSVcXGM475TviUdluXpkqFKNkt6RR0vB6D7R7cAal9yR8JJj41SPASyUEeEXiCH2P6YKqTKQZF3DuhPdJY+P+aT4ObOYfEBm1pXsfk2mqQPSQyfm5LWNE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=JewUkonu; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass 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="JewUkonu" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=VBKBZ520XnnBYIIB/96CoYHYoJxdtEGAyZMIkZ8/ojA=; b=JewUkonuLJ0y7DwVNDrqpEQXEZ 8okBzvI6P4cHckYi+RKlRwE+2EFXWOTKwMuaOQ/Rno2dquUfrbZNFbb0u4qHQXRReA4Ay3tW9lwnw dXvYLohDCXZu2MNMwJ+r+Cc1Uit1pgK5THK3mkKHYU/zB7xBR4FSNA4O0FSog+P1ehwiEPgY9wbDB uLH+3mYKWOMoOMyaaEqShq6kdZtNXHhduL/CKHCCM8iaerx28L+jKIzdUv1XJHi8s4fINW3kHSudu nXiPO9auxV1NznjrFixEA6UAgUa8tx4x0wHW4KzZlKm//fbpBICKlQjQQ4mw1SAiL63t/UOOHWHPj h/rpKavw==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wp3l0-00000004FNq-0pEQ; Wed, 29 Jul 2026 12:51:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 85F2B300882; Wed, 29 Jul 2026 14:51:33 +0200 (CEST) Date: Wed, 29 Jul 2026 14:51:33 +0200 From: Peter Zijlstra To: Yury Norov Cc: linux-kernel@vger.kernel.org, Oleg Nesterov , "Paul E . McKenney" , Phil Auld , Sebastian Andrzej Siewior , Shrikanth Hegde , Tejun Heo , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Valentin Schneider , Yury Norov , Bradley Morgan Subject: Re: [PATCH v2] stop_machine: Make stop_one_cpu_nowait() return void Message-ID: <20260729125133.GA751831@noisy.programming.kicks-ass.net> References: <20260729022355.325058-1-ynorov@nvidia.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: <20260729022355.325058-1-ynorov@nvidia.com> On Tue, Jul 28, 2026 at 10:23:54PM -0400, Yury Norov wrote: > No caller checks the return value from stop_one_cpu_nowait(). All > callers require the callback to run and arrange for the target CPU's > stopper to remain enabled while queuing the work. In particular, commit > f0498d2a54e7 ("sched: Fix stop_one_cpu_nowait() vs hotplug") added > preemption protection to the scheduler callers so that queuing must > succeed once the target CPU has been observed online. > > Therefore, a failure is an unrecoverable violation rather than a condition > individual callers can recover from. Diagnose it with WARN_ON_ONCE() in > stop_one_cpu_nowait(). A check in the common helper covers current and > future callers consistently, while individual checks would duplicate > the same non-recoverable handling at every call site. > > Make the function return void because there is no longer a meaningful > result for callers to consume. > > On UP, warn if the supplied CPU is not the current CPU because the work > cannot be scheduled in that case. > > CC: Bradley Morgan > Signed-off-by: Yury Norov I suppose; you want me to take this through the scheduler tree?