Skip to content

net: rps/rfs improvements

Eric Dumazet netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 15 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net: napi_schedule_rps() cleanupnet/core/dev.c+12 -60 repliesApplied
2/4net: add softnet_data.in_net_rx_actioninclude/linux/netdevice.h net/core/dev.c+5 -00 repliesApplied
3/4net: optimize napi_schedule_rps()net/core/dev.c+5 -30 repliesApplied
4/4net: optimize ____napi_schedule() to avoid extra NET_RX_SOFTIRQnet/core/dev.c+18 -410 repliesApplied

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJason Xing
SeriesR-b T-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/4] net: rps/rfs improvements

Jason Xing attempted to optimize napi_schedule_rps() by avoiding unneeded NET_RX_SOFTIRQ raises: [1], [2]

This is quite complex to implement properly. I chose to implement the idea, and added a similar optimization in ____napi_schedule()

Overall, in an intensive RPC workload, with 32 TX/RX queues with RFS I was able to observe a ~10% reduction of NET_RX_SOFTIRQ invocations.

While this had no impact on throughput or cpu costs on this synthetic benchmark, we know that firing NET_RX_SOFTIRQ from softirq handler can force __do_softirq() to wakeup ksoftirqd when need_resched() is true. This can have a latency impact on stressed hosts.

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/

Eric Dumazet (4):
net: napi_schedule_rps() cleanup
net: add softnet_data.in_net_rx_action
net: optimize napi_schedule_rps()
net: optimize ____napi_schedule() to avoid extra NET_RX_SOFTIRQ

 include/linux/netdevice.h |  1 +
 net/core/dev.c            | 46 ++++++++++++++++++++++++++++++---------
 2 files changed, 37 insertions(+), 10 deletions(-)
Signature · 1 line
2.40.0.348.gf938b09366-goog