From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 A0D403271FD for ; Wed, 24 Dec 2025 16:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766592555; cv=none; b=PRylpcaHRcKxne4aljwC62cu/h9Zquc7t8zkzXioHfhw1/y3QouWOzXr5JirUlxPUIZcv0LyihEJYH++r0/tNOc27nPsBkJ+l1xCGGeMHyApaYDeDj9fcxVYoLfPDzhjD+GZnT1CCkjW/ZEcYX1CX5364HXcJtJTS/LntSA/7jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766592555; c=relaxed/simple; bh=IFU9uz5QUP3yD4B3XcZGnkbQnApGZcecw1InUaYq43k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oaifRfKGlEq72CFMw4refX64JG46V6kSraA9V6QJ2tLHestcpNeDwGTk1/eFD/BRH70eFanKBVlbIE81nVGsWBJpAfGV99ID1od7gaje7mBBrHgGidHFz7rY6tUBXlCEH7B7JDOegTy/vNAk8+tSjAaiHO1th6LWg4J4MNHgty8= 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=ZKPrzF8x; arc=none smtp.client-ip=91.218.175.173 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="ZKPrzF8x" Message-ID: <6063d0da-4053-4f3c-a79a-0985c82e9649@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1766592550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LcGvB85lqMWH0Nt0G9+uApU+PK0cSwRpS80L3p4MWfY=; b=ZKPrzF8xJycnDXPOZII6dzKemfOxGkzCD9jtu+nIHSNmLKbFFXWnO8c1ST4kt1gtK9xxtG z0ktzRyOcBH0vwhyIK6HT9wwBECHYYJ1gabRRctAJMdoW2fcc8xwtSpx94+E45wIkRSFtr 2hk/k6jqMT/23R3vFnv0R2inrWV6viU= Date: Thu, 25 Dec 2025 00:08:44 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] softirq: allow raising NET_RX_SOFTIRQ from SMP call on RT To: K Prateek Nayak , Thomas Gleixner , Sebastian Andrzej Siewior , Ingo Molnar , Peter Zijlstra Cc: Tetsuo Handa , Ryo Takakura , linux-kernel@vger.kernel.org References: <20251219175848.28587-1-wen.yang@linux.dev> <1db9aefe-c9b3-4e9b-b4e3-45c25497e988@amd.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Wen Yang In-Reply-To: <1db9aefe-c9b3-4e9b-b4e3-45c25497e988@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 12/22/25 14:03, K Prateek Nayak wrote: > Hello Wen, > > On 12/19/2025 11:28 PM, wen.yang@linux.dev wrote: >> 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. > > I'm assuming net_rps_send_ipi() is the function responsible for IPIs > and the only two callers - net_rps_action_and_irq_enable() and > dev_cpu_dead() - first check for "!use_backlog_threads()" before > sending the IPI which is always false in case of PREEMPT_RT. > > What is the path where you end up sending this IPI on PREEMPT_RT? > Can you please trace the path of this problematic IPI on the latest > upstream and prevent that instead? > Thank you for your suggestion. Our production environment uses 6.1 and 6.6 kernels, and after porting commit dad6b9770263 ("net: Allow to use SMP threads for backlog NAPI.") and its dependent patches, this issue has indeed been fixed. -- Best wishes, Wen >> >> 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") > > There is also a good justification in 6675ce20046d that idle load > balancing periodically checks need_resched() and will bail out > immediately if it detects a wakeup but the same cannot be expected of > all NET_RX_SOFTIRQ handlers so ignoring the warning isn't a solution. >