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 147CD3AA1B5 for ; Tue, 16 Jun 2026 11:14:24 +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=1781608465; cv=none; b=oDjyq05kXge7iDmJ5Q8h0Tkwjsqxhh2tRKHzdpreS7fQuC/73yJSwQC7x3CYyI/SsHOrSuftb9sEvZv718BtdpCxN6hNI3eWnkoqDmWpjLDQZSldPAKOkKu5T+CEeeRNpZvQCIfOT8INq6pI8trNz+16d7vDl61hsAQqdcPstNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781608465; c=relaxed/simple; bh=AemR9iwk7VLpx+DxdESEd9Bpa8Mxx+NmvQ/u7MWkZ+4=; h=Subject:Message-Id:In-Reply-To:From:Content-Type:To:Cc:References: Date:Mime-Version; b=H7gULZUmIYugoXPa3Amb6XdnTH3dIH7J0XAN99OAqB0X5EtVWFyJdYAPciji2EFzu7slQPmMU+PYNlX2znWMpHzS3h7RQxejVhQdY9YKNXPjgqKBFL/BwJP286mQzYBwoZt3OVvodyFmxGeXrijzIYTTno2b47YxwiJBH/Y0jJE= 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=nrg0gObV; 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="nrg0gObV" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1781608459; 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=nrg0gObV2zl7Qv5q+hc8kKpFJkx3TzTpIHE+X4noSgFTPGzOBlHgK5kGrv4klFH9vSfWqg x9zOwTer9Eennzop3RqQqhRrO2tlhqrIgITNBzyRSJ9QZ3N/+bXoBfUiqex6hIpcZw4c5I fXRk1uQrvCQDjRzjF63JbhmQr5QVkz4TGeFNJsTaXXelJuwcANcLXxM+Tc/rgdUnu28cq2 MKTlgMvuEdE5upTyct3VtHJTw0UNCvsP+W3XdjdQlUZBINEftytJiKZzIDA7BtsCmtdna5 oR4cHa80rWCpg45EovvnjCj9OWiAfKLFlzgiVmm06OVc4YD48tpM+eUG2IeGRQ== Subject: [PATCH v8 07/14] smp: Remove preempt_disable() from smp_call_function() Message-Id: <20260616111127.966468-8-zhouchuyi@bytedance.com> X-Lms-Return-Path: X-Original-From: Chuyi Zhou In-Reply-To: <20260616111127.966468-1-zhouchuyi@bytedance.com> Content-Transfer-Encoding: 7bit From: "Chuyi Zhou" Content-Type: text/plain; charset=UTF-8 To: , , , , , , , , , , , , , Cc: , "Chuyi Zhou" X-Mailer: git-send-email 2.20.1 References: <20260616111127.966468-1-zhouchuyi@bytedance.com> Date: Tue, 16 Jun 2026 19:11:20 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 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