Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609076

Re: [net-next PATCH v3 7/8] epoll: Add busy poll support to epoll with socket fds.

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: [net-next PATCH v3 7/8] epoll: Add busy poll support to epoll with socket fds.
Date 2017-03-25 04:40 +0100
Message-ID <toKIx-3l5-3@gated-at.bofh.it> (permalink)
References <toASS-4Ki-5@gated-at.bofh.it> <toB2x-4No-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2017-03-24 at 10:08 -0700, Alexander Duyck wrote:
> From: Sridhar Samudrala <sridhar.samudrala@intel.com>
> 
> 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>
> ---
>  fs/eventpoll.c |   93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 93 insertions(+)

Acked-by: Eric Dumazet <edumazet@google.com>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[net-next PATCH v3 0/8] Add busy poll support for epoll Alexander Duyck <alexander.duyck@gmail.com> - 2017-03-24 18:10 +0100
  [net-next PATCH v3 5/8] net: Track start of busy loop instead of  when it should end Alexander Duyck <alexander.duyck@gmail.com> - 2017-03-24 18:10 +0100
    Re: [net-next PATCH v3 5/8] net: Track start of busy loop instead  of when it should end Eric Dumazet <eric.dumazet@gmail.com> - 2017-03-25 04:40 +0100
  [net-next PATCH v3 3/8] net: Only define skb_mark_napi_id in one  spot instead of two Alexander Duyck <alexander.duyck@gmail.com> - 2017-03-24 18:10 +0100
  [net-next PATCH v3 6/8] net: Commonize busy polling code to focus  on napi_id instead of socket Alexander Duyck <alexander.duyck@gmail.com> - 2017-03-24 18:10 +0100
  [net-next PATCH v3 7/8] epoll: Add busy poll support to epoll with  socket fds. Alexander Duyck <alexander.duyck@gmail.com> - 2017-03-24 18:20 +0100
    Re: [net-next PATCH v3 7/8] epoll: Add busy poll support to epoll  with socket fds. Eric Dumazet <eric.dumazet@gmail.com> - 2017-03-25 04:40 +0100
  [net-next PATCH v3 4/8] net: Change return type of sk_busy_loop  from bool to void Alexander Duyck <alexander.duyck@gmail.com> - 2017-03-24 18:20 +0100
  Re: [net-next PATCH v3 0/8] Add busy poll support for epoll David Miller <davem@davemloft.net> - 2017-03-25 03:30 +0100
  Re: [net-next PATCH v3 0/8] Add busy poll support for epoll David Miller <davem@davemloft.net> - 2017-03-25 05:00 +0100

csiph-web