All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: fix raising a softirq on the current cpu with rps enabled
@ 2023-03-25 15:24 Jason Xing
  2023-03-25 15:56 ` Eric Dumazet
       [not found] ` <20230326013845.2110-1-hdanton@sina.com>
  0 siblings, 2 replies; 9+ messages in thread
From: Jason Xing @ 2023-03-25 15:24 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, therbert
  Cc: netdev, linux-kernel, kerneljasonxing, Jason Xing

From: Jason Xing <kernelxing@tencent.com>

Since we decide to put the skb into a backlog queue of another
cpu, we should not raise the softirq for the current cpu. When
to raise a softirq is based on whether we have more data left to
process later. As to the current cpu, there is no indication of
more data enqueued, so we do not need this action. After enqueuing
to another cpu, net_rx_action() function will call ipi and then
another cpu will raise the softirq as expected.

Also, raising more softirqs which set the corresponding bit field
can make the IRQ mechanism think we probably need to start ksoftirqd
on the current cpu. Actually it shouldn't happen.

Fixes: 0a9627f2649a ("rps: Receive Packet Steering")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
---
 net/core/dev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 1518a366783b..bfaaa652f50c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4594,8 +4594,6 @@ static int napi_schedule_rps(struct softnet_data *sd)
 	if (sd != mysd) {
 		sd->rps_ipi_next = mysd->rps_ipi_list;
 		mysd->rps_ipi_list = sd;
-
-		__raise_softirq_irqoff(NET_RX_SOFTIRQ);
 		return 1;
 	}
 #endif /* CONFIG_RPS */
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-27  2:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25 15:24 [PATCH net] net: fix raising a softirq on the current cpu with rps enabled Jason Xing
2023-03-25 15:56 ` Eric Dumazet
2023-03-26  3:27   ` Jason Xing
2023-03-26  4:04   ` Jason Xing
2023-03-26 10:10     ` Jason Xing
2023-03-26 14:56       ` Jason Xing
2023-03-26 17:35         ` Eric Dumazet
2023-03-27  2:25           ` Jason Xing
     [not found] ` <20230326013845.2110-1-hdanton@sina.com>
2023-03-26  3:30   ` Jason Xing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.