From nobody Sun Feb 8 05:27:42 2026 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) (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 CCD0434F497 for ; Fri, 19 Dec 2025 17:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167151; cv=none; b=rrV9pvkoR9LHYu3KSQhILnextk+snYIs3YkTOGwPHm5K1AmR9QhhxeywrSYObKNIihffcmCIExFj+1Y+c7goWNIymp9c6bH9uLT5vcJmioWV2fk7D3+2rgUy9ZOIGHvAyMCaHXNUHavtu1WrlW2VrFlZ2AhMZ/MRegykz66eDpM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167151; c=relaxed/simple; bh=NCjDxnER1RAj56ZlTp7yzAC60TmDM/FA+mXD50YHuA8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VOdniczMBgEtDsQdNzj1nu2cl6AlUOW3HG9A+Lq3nHv2wCiboqRjvwaXILpuRjezaZm8+NcbtMtgoS0n9UXfpRGTilhdv3UQ72mEW1ykZtcBiHnEJRMKwakbW4vN9uchZamX6Cuw37lK6E/kfQ5/u1auC88ptZ/noFC10Gjo3uw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ifI2B/rA; arc=none smtp.client-ip=91.218.175.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ifI2B/rA" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1766167145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=RsqkmheSS82O2or1tdbYsOH9bp5fSeKs+f+i5LN6MB0=; b=ifI2B/rAun6vZ7IUKEqFU5ntKEmz1ybJHSd8Fd/pQoNvg0EhCiWhy5huFEyMn8uh/V0100 5a1RR8ALDm2xFFRC55vHDYnffMKE3vBGoDbmeGe3vuAPInoSxVqckX+zAzsIew5MF+HJgq ts/gkWV4APz60XtFthH/n5sDkHvaZMQ= From: wen.yang@linux.dev To: Thomas Gleixner , Sebastian Andrzej Siewior , Ingo Molnar , Peter Zijlstra Cc: Wen Yang , Tetsuo Handa , Ryo Takakura , K Prateek Nayak , linux-kernel@vger.kernel.org Subject: [PATCH] softirq: allow raising NET_RX_SOFTIRQ from SMP call on RT Date: Sat, 20 Dec 2025 01:58:48 +0800 Message-Id: <20251219175848.28587-1-wen.yang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Wen Yang RPS distributes network processing load across CPUs by enqueuing packets on a remote CPU's backlog and raising NET_RX_SOFTIRQ to process them. This is done via an smp_call_function. On PREEMPT_RT kernels, raising a softirq from an SMP call function can increase preemption-off latencies. A WARN_ON_ONCE() in do_softirq_post_smp_call_flush() enforces this. A previous commit 6675ce20046d ("softirq: Allow raising SCHED_SOFTIRQ from = SMP-call-function on RT kernel") allowed SCHED_SOFTIRQ to be raised for idle load balancing purposes. A similar issue exists for RPS. When RPS targets a remote CPU, it uses an SMP call to raise NET_RX_SOFTIRQ, which triggers the warning. This patch extends the exception to also allow NET_RX_SOFTIRQ, preventing the warning when RPS is active on an RT kernel. Signed-off-by: Wen Yang Cc: Peter Zijlstra (Intel) Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Tetsuo Handa Cc: Ryo Takakura Cc: K Prateek Nayak Cc: linux-kernel@vger.kernel.org --- kernel/softirq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index 5f435c1e48d8..53cccdb29a8f 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -341,15 +341,15 @@ static inline void invoke_softirq(void) wakeup_softirqd(); } =20 -#define SCHED_SOFTIRQ_MASK BIT(SCHED_SOFTIRQ) +#define SCHED_SOFTIRQ_MASK (BIT(SCHED_SOFTIRQ) | BIT(NET_RX_SOFTIRQ)) =20 /* * flush_smp_call_function_queue() can raise a soft interrupt in a function * call. On RT kernels this is undesired and the only known functionalities * are in the block layer which is disabled on RT, and in the scheduler for * idle load balancing. If soft interrupts get raised which haven't been - * raised before the flush, warn if it is not a SCHED_SOFTIRQ so it can be - * investigated. + * raised before the flush, warn if it is not SCHED_SOFTIRQ or NET_RX_SOFT= IRQ + * so it can be investigated. */ void do_softirq_post_smp_call_flush(unsigned int was_pending) { --=20 2.25.1