From nobody Mon Apr 6 21:18:33 2026 Received: from va-1-114.ptr.blmpb.com (va-1-114.ptr.blmpb.com [209.127.230.114]) (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 32ABA2FB08C for ; Wed, 18 Mar 2026 04:58:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773809941; cv=none; b=XHyK+On0XmT1IoDeDPlOs8xseyDxF9Z6yNj2hUFbtKXSvt8YmcjxWVwyFQTHt4yW2zLDTvPujxmxloeLbt0X7EoX2tswQF/cGVIiMHquSxyMM0JdOp92VzKb0E8ejhy07UO5tyvAbtLAQ9F+uko0AGrQYXpAWQyrSPAe8LTQABA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773809941; c=relaxed/simple; bh=FuGvak24gdR5Ls+ObagKEeNMvUcABQ7pso8x/MZ4Alg=; h=From:In-Reply-To:To:References:Content-Type:Cc:Message-Id:Subject: Date:Mime-Version; b=OR4k62NY9/ghcJmKJ511L9kPghT2ZiLGSYonr6pp2hmon0DQFZoxyNAUbGs1yyQ537pwU1VQnyFrJKJNTFi37UI+//vQbWzuqiZfZBmE2inytAvChIGw/6LVdWMMEgrSa7rD7YCr1gVB47IYW296361WOu0ncWb/zRZXXQDJveo= 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=UXNt2tad; arc=none smtp.client-ip=209.127.230.114 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="UXNt2tad" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1773809935; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=bbF0/0t9FxXUmujvSxbeDHkVrMxui1VTKyTpLx2uW+w=; b=UXNt2tadJtSWdRqVW1n+ngPfUZ+aJ4tZMVmgRheGrHz5n+/bcSh3nqyE6B1+WRVw8hQkAZ KTSLh6ZJnBX8fz/ymDnb2GJKO20xmX9xqcsLR8VNSTjaaS5I3YXkwbDDy8sqgi9kDg2EKz dvIENjaovgNcWDU2Ez+DCvroQFuFLssQDq9UF+rtIfbHTjdhsFSepfcpOaSy0Yzo7kygXs iFPHLANY9AiaPrDSk+Ufjc+IZ/+Sbexbx8qFQsIst/JjQ4fC0g5T3heKoHJWfdLZsow0bc 8BN7GsklBE+QSHaSbHD+aLQABgLV/IBWbUyEoRnyVNLl8oiHhF5U7JCckJ8RTw== From: "Chuyi Zhou" In-Reply-To: <20260318045638.1572777-1-zhouchuyi@bytedance.com> To: , , , , , , , , , , , X-Mailer: git-send-email 2.20.1 X-Lms-Return-Path: References: <20260318045638.1572777-1-zhouchuyi@bytedance.com> Cc: , "Chuyi Zhou" Message-Id: <20260318045638.1572777-8-zhouchuyi@bytedance.com> Content-Transfer-Encoding: quoted-printable Subject: [PATCH v3 07/12] smp: Remove preempt_disable from smp_call_function Date: Wed, 18 Mar 2026 12:56:33 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Original-From: Chuyi Zhou Content-Type: text/plain; charset="utf-8" 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 --- kernel/smp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 18e7e4a8f1b6..f9c0028968ef 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -966,9 +966,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); =20 --=20 2.20.1