summaryrefslogtreecommitdiffstats
path: root/arch/mn10300
diff options
context:
space:
mode:
authorSridhar Samudrala <sridhar.samudrala@intel.com>2017-03-24 18:08:30 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-25 04:49:31 +0100
commitbf3b9f6372c45b0fbf24d86b8794910d20170017 (patch)
tree64ac79d6480ca248f9dc86a8cf3d41a17dfbb82c /arch/mn10300
parentnet: Commonize busy polling code to focus on napi_id instead of socket (diff)
downloadlinux-bf3b9f6372c45b0fbf24d86b8794910d20170017.tar.xz
linux-bf3b9f6372c45b0fbf24d86b8794910d20170017.zip
epoll: Add busy poll support to epoll with socket fds.
This patch adds busy poll support to epoll. The implementation is meant to be opportunistic in that it will take the NAPI ID from the last socket that is added to the ready list that contains a valid NAPI ID and it will use that for busy polling until the ready list goes empty. Once the ready list goes empty the NAPI ID is reset and busy polling is disabled until a new socket is added to the ready list. In addition when we insert a new socket into the epoll we record the NAPI ID and assume we are going to receive events on it. If that doesn't occur it will be evicted as the active NAPI ID and we will resume normal behavior. An application can use SO_INCOMING_CPU or SO_REUSEPORT_ATTACH_C/EBPF socket options to spread the incoming connections to specific worker threads based on the incoming queue. This enables epoll for each worker thread to have only sockets that receive packets from a single queue. So when an application calls epoll_wait() and there are no events available to report, busy polling is done on the associated queue to pull the packets. Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/mn10300')
0 files changed, 0 insertions, 0 deletions