Skip to content
Commit 8b43fd3d authored by Eric Dumazet's avatar Eric Dumazet Committed by Paolo Abeni
Browse files

net: optimize ____napi_schedule() to avoid extra NET_RX_SOFTIRQ



____napi_schedule() adds a napi into current cpu softnet_data poll_list,
then raises NET_RX_SOFTIRQ to make sure net_rx_action() will process it.

Idea of this patch is to not raise NET_RX_SOFTIRQ when being called indirectly
from net_rx_action(), because we can process poll_list from this point,
without going to full softirq loop.

This needs a change in net_rx_action() to make sure we restart
its main loop if sd->poll_list was updated without NET_RX_SOFTIRQ
being raised.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Jason Xing <kernelxing@tencent.com>
Reviewed-by: default avatarJason Xing <kerneljasonxing@gmail.com>
Tested-by: default avatarJason Xing <kerneljasonxing@gmail.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 821eba96
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment