From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from va-1-111.ptr.blmpb.com (va-1-111.ptr.blmpb.com [209.127.230.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1DCC3EFFA5 for ; Tue, 9 Jun 2026 09:19:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780996776; cv=none; b=ejg35HIfAT24WhrWe8uJ+xzZhbJrcBsORyFwWqIVcvJfw7QLnPxHGQpRA0l5dHzMXz+l2ovH5M+LFfV27Kxb77DEc1esK2vcjSj4O1t+6TM4v9yRbH7HIVH5t1PN2WXQNLMe5YVRV2LnAGYt25R7nryFl8y4FK1sbQpvmzdjhPI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780996776; c=relaxed/simple; bh=AemR9iwk7VLpx+DxdESEd9Bpa8Mxx+NmvQ/u7MWkZ+4=; h=Mime-Version:Date:In-Reply-To:References:Content-Type:Cc:From: Subject:To:Message-Id; b=nzcJRZ6w+vmDpd+1F1zPrbi9gM7UoS2Yfaj7D7O5S9gTTJxOYjUxbKqr4F4JhfQDXjkRsFe7IoLqC6ST1BR19x2socfA4B/SwEj43WiLgI7B80UgN7gW4TWApfDD7W6Zm3gq5bAITM5rfKWeBMhNbyIFugos4RnfasRx03ivlzU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=dEIKiyVx; arc=none smtp.client-ip=209.127.230.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="dEIKiyVx" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1780996768; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=vTZJvD8hE4khuR+UlhrXRdjUapZ6kr9QUGV9VwCRf70=; b=dEIKiyVx8XvwiJOW5lIXRrY+XuX7nlGhfEFDgfIWPuiDxTYAX80uulowoW7Oi1lR/jxmih l9Aym4epTf0WSySJoktrrAS3zLLxgBY89ZTwYRfYEaPA3ceunj0QOoqscOG+yMTJpk5S2c b5NmEebCt2tthfRdq+849+APhU/hwGjtMLeL6kiwltjZSe8xF8O/A68XUIXYFsy3dvaP2s Udyk8uWE43yniEJsawK+ZTDOrI0Z+7th8dtihoDUdUubmfJIaCpfZNpcEK4SxgXbOO989Z GHW6LEsmq0paai5KZcMEgR+wpoNytX6U/iJ+kSz96kQNiqtIYam/abwDD+0IOg== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Date: Tue, 9 Jun 2026 17:17:03 +0800 X-Lms-Return-Path: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20260609091710.404083-1-zhouchuyi@bytedance.com> References: <20260609091710.404083-1-zhouchuyi@bytedance.com> Content-Type: text/plain; charset=UTF-8 Cc: , "Chuyi Zhou" From: "Chuyi Zhou" Subject: [PATCH v7 07/14] smp: Remove preempt_disable() from smp_call_function() Content-Transfer-Encoding: 7bit To: , , , , , , , , , , , , , Message-Id: <20260609091710.404083-8-zhouchuyi@bytedance.com> X-Original-From: Chuyi Zhou Now smp_call_function_many_cond() internally handles the preemption logic, so smp_call_function() does not need to explicitly disable preemption. Remove preempt_{enable, disable} from smp_call_function(). Signed-off-by: Chuyi Zhou Reviewed-by: Muchun Song Reviewed-by: Sebastian Andrzej Siewior Tested-by: Paul E. McKenney --- kernel/smp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 390e6526574c..096d857dc3a5 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -1012,9 +1012,8 @@ EXPORT_SYMBOL(smp_call_function_many); */ void smp_call_function(smp_call_func_t func, void *info, int wait) { - preempt_disable(); - smp_call_function_many(cpu_online_mask, func, info, wait); - preempt_enable(); + smp_call_function_many_cond(cpu_online_mask, func, info, + wait ? SCF_WAIT : 0, NULL); } EXPORT_SYMBOL(smp_call_function); -- 2.20.1