From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from va-1-115.ptr.blmpb.com (va-1-115.ptr.blmpb.com [209.127.230.115]) (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 DF0F63F39FD for ; Tue, 30 Jun 2026 11:12:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.115 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782817966; cv=none; b=UWTE9XJnmz/4wVUPOJUt5R4y99uM3FaZ03CpssyNjhjJXbAQU9jBIjAZD6nsk7D4TnMXGoWzJD3rRpVZuJQp+owTORlsinJ3tSjvRAC2pgEb+h1y8jWWaD80FsWW6U8rJvzs9clc1pfIqWpWlAPtgdfewM0Rjl/Ma3l7mPgdmrc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782817966; c=relaxed/simple; bh=ukx5HvskabpAZjztpfhL5PkE0u5ZGJBfsBxCe+RGhuA=; h=Message-Id:To:From:Subject:References:In-Reply-To:Content-Type:Cc: Date:Mime-Version; b=Df8JIuodDDt6TFk/IgpkSGJ93NC++uc1GTuyN7dYd0m+xU7Mrha75Pts0BOcdMeEpZ8q1mqkf6gJGhg/zfMi12mdc+qlre+eCkza5sRHwn5ds82b48tTw4DF+KpPhptp55v6g8+4YRir4ECMXS3zOnTi8SizgQ3NZu/8frEJcbw= 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=FybfFnzC; arc=none smtp.client-ip=209.127.230.115 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="FybfFnzC" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1782817960; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=wOml0WtfCwOBElgf5Nw783xfpU6oJdBCsD9zvZyHN6A=; b=FybfFnzCrM9BS4d/3+tny0/LdNo7pPijVX2pITNrS+OsvAHK33MU+GdL5PctxxFT0pS1RW uuax+v/9zOzzqlVMp5jJY7Y7tJ7LkzaeNs4FWkDuGqrpt4iZRXKy6VqWNpcyuIBM/gKa6P 0ApLRAm+AABt8WacAdpOy8SJN3RATmeC7omRIPyIuS7C2Polpa01L7Q+zhU1b6mw+Sab3s vnV8RoSik6Vvzte6gIkssY+wJtGG+cyV6WjpFM52MIyWCaqNE+cpz+lscUgu3QVBkpbnOp YE/1TzyJqaFtcdoA2OtKviLzrBG3Ld5FxOvrTVRh3jJxqTRd+4fOtx74dGi7TA== Message-Id: <20260630111008.2034376-9-zhouchuyi@bytedance.com> X-Original-From: Chuyi Zhou X-Mailer: git-send-email 2.20.1 To: , , , , , , , , , , , , , Content-Transfer-Encoding: 7bit From: "Chuyi Zhou" Subject: [PATCH v9 08/14] smp: Remove preempt_disable() from on_each_cpu_cond_mask() References: <20260630111008.2034376-1-zhouchuyi@bytedance.com> In-Reply-To: <20260630111008.2034376-1-zhouchuyi@bytedance.com> X-Lms-Return-Path: Content-Type: text/plain; charset=UTF-8 Cc: , "Chuyi Zhou" Date: Tue, 30 Jun 2026 19:10:02 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 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 Tested-by: Paul E. McKenney Reviewed-by: Muchun Song Reviewed-by: Sebastian Andrzej Siewior --- kernel/smp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 933a14dbb8f8..db0a123911d1 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -1131,9 +1131,7 @@ void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func, if (wait) scf_flags |= SCF_WAIT; - preempt_disable(); smp_call_function_many_cond(mask, func, info, scf_flags, cond_func); - preempt_enable(); } EXPORT_SYMBOL(on_each_cpu_cond_mask); -- 2.20.1