From nobody Fri Jul 24 21:53:24 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 72501414DDD; Thu, 23 Jul 2026 10:21:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784802080; cv=none; b=HvB8FZBWIEiGZuRE3IlaempVQUujRBe31BVhIerIxqiovWCfsmDS9QfuQCv4zscgLLjqo+sr9HFoNQLob/+4LTo3Zp1U4mvh6ZwN7FN4/J0UFg5CluxLXgZo0oPMkVK9udPuti9wBnRD3fKeCnAY2xga5aMnfEgOOc3gbZD0yt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784802080; c=relaxed/simple; bh=nQPasydl9NT02r+hRSvNGX/RgndDDMvUUW5Jys+1h7g=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=MUEah25veIWDUsS+TGIEeJ7IyuYN07g9Z2gi9342Sa33lx+JFI1pTqmwRYppImnmyIzdAEfEC/HLdYgfvTuxdfu5pJYYOcui2JWNmUa1xN8oE7VGIHuX6ef8uQfCILpKJitfXs1dR5V9UVWrIz3XYrF8BLJwNn7n1R5kE1ycZH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0JDLYIrz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JcgzNh9D; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0JDLYIrz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JcgzNh9D" Date: Thu, 23 Jul 2026 10:21:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784802077; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xCX28/hzYJd5noPnTw+BtIFLjK9Px4BTVk9QcKzKdwo=; b=0JDLYIrz1L+UDVxqsRhRRNdcFQeA9bYs3K2eGArh8O+QGiBnaKjijEvYQ7pFOaVFExjM+7 85qwXujWGzOB4I8vQf50jT5UHvIaa+laWvOLVoFLnkUsvR0aRsZMhAPQbOQFUeErC7e0Gk fg/wJxnoYITdNb4iSF5TWwZfKF7W6p6+wPdYE4ftt9YG2lrXTLHokAbwDi77Cblj0f699b jkVT9QYYgl501Nqyxa05sLVWAy2hgIIYZxZAT2PylgLwIazRCzluELIDymArwKGjvmO7mZ qaEaKzbmQuBKvfux3au0XPhj1Xs1ZjYmOhTp5iiwjXxqNfH6r+4c1nEndWNlig== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784802077; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xCX28/hzYJd5noPnTw+BtIFLjK9Px4BTVk9QcKzKdwo=; b=JcgzNh9Dh3DSzFduStkMqAQ3g/Tdj3NDbagdSv5zsrNEkwtM45kZyFo3ril800WQgHqSOu xYc5VhK0LR0RI3Cg== From: "tip-bot2 for Chuyi Zhou" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/core] smp: Remove preempt_disable() from on_each_cpu_cond_mask() Cc: Chuyi Zhou , Thomas Gleixner , "Paul E. McKenney" , Muchun Song , Sebastian Andrzej Siewior , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260709122933.4021501-9-zhouchuyi@bytedance.com> References: <20260709122933.4021501-9-zhouchuyi@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178480207617.2943223.7510646033810160583.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the smp/core branch of tip: Commit-ID: 947c397f5991b8ba9b5de2a5d3fb109ce663e75c Gitweb: https://git.kernel.org/tip/947c397f5991b8ba9b5de2a5d3fb109ce= 663e75c Author: Chuyi Zhou AuthorDate: Thu, 09 Jul 2026 20:29:27 +08:00 Committer: Thomas Gleixner CommitterDate: Thu, 16 Jul 2026 09:24:55 +02:00 smp: Remove preempt_disable() from on_each_cpu_cond_mask() smp_call_function_many_cond() handles the preemption and CPU pinning requirements internally. on_each_cpu_cond_mask() only builds the call flags and forwards the request to that helper. Remove the outer preempt_disable() and preempt_enable() pair from on_each_cpu_cond_mask(). Signed-off-by: Chuyi Zhou Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Reviewed-by: Muchun Song Reviewed-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20260709122933.4021501-9-zhouchuyi@bytedance= .com --- kernel/smp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 6c4c93e..6f8f4c9 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -1126,12 +1126,14 @@ void __init smp_init(void) * @func: The function to run on all applicable CPUs. * This must be fast and non-blocking. * @info: An arbitrary pointer to pass to both functions. - * @wait: If true, wait (atomically) until function has - * completed on other CPUs. + * @wait: If true, wait until function has completed on other CPUs. * @mask: The set of cpus to run on (only runs on online subset). * - * Preemption is disabled to protect against CPUs going offline but not on= line. - * CPUs going online during the call will not be seen or sent an IPI. + * Target CPU selection and work queueing are done with preemption + * disabled. This protects against CPUs going offline, but not against + * CPUs coming online concurrently; newly online CPUs are not guaranteed + * to be seen or sent an IPI. If @wait is true, the final wait for remote + * completion happens after that preemption-disabled section. * * You must not call this function with disabled interrupts or * from a hardware interrupt handler or from a bottom half handler. @@ -1144,9 +1146,7 @@ void on_each_cpu_cond_mask(smp_cond_func_t cond_func,= smp_call_func_t func, if (wait) scf_flags |=3D SCF_WAIT; =20 - preempt_disable(); smp_call_function_many_cond(mask, func, info, scf_flags, cond_func); - preempt_enable(); } EXPORT_SYMBOL(on_each_cpu_cond_mask); =20