[PATCH v7 net-next 2/5] net: implement support for low latency socket polling

2013-05-30 Thread Eliezer Tamir
-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- Documentation/sysctl/net.txt |7 ++ fs/select.c |7 ++ include/linux/netdevice.h|3 + include/linux/skbuff.h |8 ++ include/net/ll_poll.h

Re: [PATCH v7 net-next 2/5] net: implement support for low latency socket polling

2013-05-30 Thread Eliezer Tamir
On 30/05/2013 18:07, Amir Vadai wrote: On 30/05/2013 14:41, Eliezer Tamir wrote: diff --git a/fs/select.c b/fs/select.c @@ -486,6 +488,8 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time) break; } + if (can_poll_ll

Re: [PATCH v7 net-next 0/5] net: low latency Ethernet device polling

2013-06-02 Thread Eliezer Tamir
On 30/05/2013 14:40, Eliezer Tamir wrote: more fixes. Thank you all for your input. -Eliezer change log: v7 - suggested by Ben Hutchings and Eric Dumazet: type fixes, static for globals in net/core.c, avoid napi_id collisions in napi_hash_add() Dave, Please tell my how you think I

[PATCH v8 net-next 1/7] net: add napi_id and hash

2013-06-03 Thread Eliezer Tamir
Adds a napi_id and a hashing mechanism to lookup a napi by id. This will be used by subsequent patches to implement low latency Ethernet device polling. Based on a code sample by Eric Dumazet. Signed-off-by: Eliezer Tamir --- include/linux/netdevice.h | 29 ++ net/core

[PATCH v8 net-next 0/7] net: low latency Ethernet device polling

2013-06-03 Thread Eliezer Tamir
David, Here is v8 with yet more fixes. Please consider applying. Thanks to everyone for their input. -Eliezer change log: v8 - split out udp and select/poll into seperate patches. what used to be patch 2/5 is now three patches. - type corrections from Amir Vadai and Cong Wang: one unsigned

[PATCH v8 net-next 3/7] udp: add low latency socket poll support

2013-06-03 Thread Eliezer Tamir
tries to read we busy poll. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- net/core/datagram.c |4 net/ipv4/udp.c |6 +- net/ipv6/udp.c |6 +- 3 files changed, 14 insertions(+), 2

[PATCH v8 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-03 Thread Eliezer Tamir
sockets polled is not large. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- fs/select.c |7 +++ net/socket.c | 10 +- 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/fs/select.c b

[PATCH v8 net-next 4/7] tcp: add low latency socket poll support.

2013-06-03 Thread Eliezer Tamir
: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- net/ipv4/tcp.c |5 + net/ipv4/tcp_ipv4.c |2 ++ net/ipv6/tcp_ipv6.c |2 ++ 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4

[PATCH v8 net-next 2/7] net: add low latency socket poll

2013-06-03 Thread Eliezer Tamir
be added by subsequent patches. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- Documentation/sysctl/net.txt |7 ++ include/linux/netdevice.h|3 + include/linux/skbuff.h |8 ++ include/net

[PATCH v8 net-next 6/7] ixgbe: add support for ndo_ll_poll

2013-06-03 Thread Eliezer Tamir
-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 120 + drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c |2 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 63 +++-- 3 files

[PATCH v8 net-next 7/7] ixgbe: add extra stats for ndo_ll_poll

2013-06-03 Thread Eliezer Tamir
Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 14 drivers

Re: [PATCH v8 net-next 2/7] net: add low latency socket poll

2013-06-03 Thread Eliezer Tamir
On 03/06/2013 16:05, Eric Dumazet wrote: On Mon, 2013-06-03 at 11:01 +0300, Eliezer Tamir wrote: --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -19,6 +19,7 @@ #include #include #include +#include static int one = 1; @@ -284,6 +285,15 @@ static struct

Re: [PATCH v8 net-next 5/7] net: simple poll/select low latency socket poll

2013-06-03 Thread Eliezer Tamir
On 03/06/2013 16:15, Eric Dumazet wrote: On Mon, 2013-06-03 at 11:02 +0300, Eliezer Tamir wrote: sock = file->private_data; - return sock->ops->poll(file, sock, wait); + + poll_result = sock->ops->poll(file, sock, wait); + + if (!(poll_result & (P

Re: [PATCH v3 net-next 0/1] net: lls select poll support

2013-06-23 Thread Eliezer Tamir
On 24/06/2013 04:44, David Miller wrote: From: Eliezer Tamir Date: Wed, 19 Jun 2013 13:04:21 +0300 One question: do we need in sock_poll() to test that sock->sk is not null? (Thanks to Willem de Bruijn for pointing this out.) We should not have to. Please clean up various things in t

[PATCH v4 net-next] net: poll/select low latency socket support

2013-06-24 Thread Eliezer Tamir
-off-by: Eliezer Tamir --- Documentation/sysctl/net.txt| 18 -- fs/select.c | 34 +- include/net/ll_poll.h | 35 ++- include/uapi/asm-generic/poll.h |2 ++ net/core/sock.c

[PATCH v4 net-next 0/1] net: lls select poll support

2013-06-24 Thread Eliezer Tamir
David, Here is a rework of the select/poll patch. When select or poll are used on a lot of sockets the sysctl value needs to be set higher than 50. For 300 sockets a setting of 100 works for me. For 1000 sockets a setting of 200 works well but the gain is very small, probably not worth it. I sho

Re: [PATCH RFC] net: lls epoll support

2013-06-25 Thread Eliezer Tamir
On 25/06/2013 17:26, yaniv saar wrote: On Wed, Jun 19, 2013 at 2:42 PM, Eliezer Tamir wrote: [this patch needs the poll patch to be applied first] with sockperf doing epoll on 1000 sockets I see an avg latency of 6us hi eliezer, please consider the following solution for epoll that is

Re: [PATCH v9 net-next 0/7] net: low latency Ethernet device polling

2013-06-08 Thread Eliezer Tamir
On 08/06/2013 00:48, David Miller wrote: From: Eliezer Tamir Date: Wed, 05 Jun 2013 13:34:00 +0300 And here is v9. Except for typo fixes in comments/description, only 2/7 and 5/7 were changed. Thanks to everyone for their input. Since there is some discussion about the way the poll() bits

[PATCH v10 net-next 1/6] net: add napi_id and hash

2013-06-10 Thread Eliezer Tamir
Adds a napi_id and a hashing mechanism to lookup a napi by id. This will be used by subsequent patches to implement low latency Ethernet device polling. Based on a code sample by Eric Dumazet. Signed-off-by: Eliezer Tamir --- include/linux/netdevice.h | 29 ++ net/core

[PATCH v10 net-next 0/6] net: low latency Ethernet device polling

2013-06-10 Thread Eliezer Tamir
David, I removed the select/poll patch (was 5/7 in v9) from the set. The rest are the same patches that were in v9. Please consider applying. Thanks to everyone for their input. -Eliezer Change log: v10 - removed select/poll support. (we will work on this some more and try again) v9 - correct

[PATCH v10 net-next 2/6] net: add low latency socket poll

2013-06-10 Thread Eliezer Tamir
be added by subsequent patches. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Signed-off-by: Eliezer Tamir --- Documentation/sysctl/net.txt |7 ++ include/linux/netdevice.h|3 + include/linux/skbuff.h |8 ++ include/net/ll_poll.h| 148

[PATCH v10 net-next 3/6] udp: add low latency socket poll support

2013-06-10 Thread Eliezer Tamir
tries to read we busy poll. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Signed-off-by: Eliezer Tamir --- net/core/datagram.c |4 net/ipv4/udp.c |6 +- net/ipv6/udp.c |6 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/net

[PATCH v10 net-next 5/6] ixgbe: add support for ndo_ll_poll

2013-06-10 Thread Eliezer Tamir
-by: Jesse Brandeburg Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 120 + drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c |2 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 63 +++-- 3 files changed, 177 insertions(+), 8

[PATCH v10 net-next 4/6] tcp: add low latency socket poll support.

2013-06-10 Thread Eliezer Tamir
: Alexander Duyck Signed-off-by: Jesse Brandeburg Signed-off-by: Eliezer Tamir --- net/ipv4/tcp.c |5 + net/ipv4/tcp_ipv4.c |2 ++ net/ipv6/tcp_ipv6.c |2 ++ 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index bc42469..46ed9af

[PATCH v10 net-next 6/6] ixgbe: add extra stats for ndo_ll_poll

2013-06-10 Thread Eliezer Tamir
Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 14 drivers/net/ethernet/intel/ixgbe

Re: [PATCH v10 net-next 0/6] net: low latency Ethernet device polling

2013-06-10 Thread Eliezer Tamir
On 10/06/2013 23:41, David Miller wrote: From: Eliezer Tamir Date: Mon, 10 Jun 2013 11:39:30 +0300 I removed the select/poll patch (was 5/7 in v9) from the set. The rest are the same patches that were in v9. Reply to this email with some text to put in the merge commit, including basic

Re: [PATCH v10 net-next 0/6] net: low latency Ethernet device polling

2013-06-10 Thread Eliezer Tamir
On 11/06/2013 07:24, David Miller wrote: From: Eliezer Tamir Date: Tue, 11 Jun 2013 05:25:42 +0300 Here is the text from the RFC and v2 cover letters, updated and merged. If this is too long, please tell me what you think should be removed. It's perfect, and since this went through so

Re: [PATCH v10 net-next 0/6] net: low latency Ethernet device polling

2013-06-11 Thread Eliezer Tamir
On 11/06/2013 10:32, Eric Dumazet wrote: On Tue, 2013-06-11 at 09:49 +0300, Eliezer Tamir wrote: I would like to hear opinions on what needs to be added to make this feature complete. The list I have so far is: 1. add a socket option Yes, please. I do not believe all sockets on the machine

Re: [PATCH v10 net-next 0/6] net: low latency Ethernet device polling

2013-06-11 Thread Eliezer Tamir
On 11/06/2013 11:14, David Miller wrote: From: Eliezer Tamir Date: Tue, 11 Jun 2013 09:49:31 +0300 I would like to hear opinions on what needs to be added to make this feature complete. I actually would like to see the Kconfig option go away, that's my only request. OK, I will s

[PATCH net-next 0/2] net: low latency sockets follow ups

2013-06-11 Thread Eliezer Tamir
David, Here are two more patches. Patch 1 removes the config menu for NET_LL_RX_POLL and defaults to y. Patch 2 adds an SO_LL socket option to allow per-socket control of busy polling. The patches do not depend on each other. If one of them needs more work, please consider applying the other. I

[PATCH net-next 1/2] net: remove NET_LL_RX_POLL config menue

2013-06-11 Thread Eliezer Tamir
Remove NET_LL_RX_POLL from the config menu. Change default to y. Busy polling still needs to be enabled at runtime via sysctl. Signed-off-by: Eliezer Tamir --- net/Kconfig | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/net/Kconfig b/net/Kconfig index d6a9ce6

[PATCH net-next 2/2] net:add socket option for low latency polling

2013-06-11 Thread Eliezer Tamir
adds a socket option for low latency polling. This allows overriding the global sysctl value with a per-socket one. Signed-off-by: Eliezer Tamir --- arch/alpha/include/uapi/asm/socket.h |2 ++ arch/avr32/include/uapi/asm/socket.h |2 ++ arch/cris/include/uapi/asm/socket.h|2

[PATCH] sockperf: add SO_LL socketop support

2013-06-11 Thread Eliezer Tamir
Add lls socket option support to sockperf. Right now we always get the option before set to show the option is working properly. We should probably remove that in an official release. use --lls (value in usecs) to override global setting. --- src/Defs.h |3 +++ src/SockPerf.cpp | 5

Re: [PATCH net-next 2/2] net:add socket option for low latency polling

2013-06-11 Thread Eliezer Tamir
On 11/06/2013 17:45, Eric Dumazet wrote: On Tue, 2013-06-11 at 17:24 +0300, Eliezer Tamir wrote: adds a socket option for low latency polling. This allows overriding the global sysctl value with a per-socket one. Signed-off-by: Eliezer Tamir --- -static inline cycles_t ll_end_time(void

Re: [PATCH net-next 2/2] net:add socket option for low latency polling

2013-06-11 Thread Eliezer Tamir
On 11/06/2013 23:24, Ben Hutchings wrote: On Tue, 2013-06-11 at 17:24 +0300, Eliezer Tamir wrote: adds a socket option for low latency polling. This allows overriding the global sysctl value with a per-socket one. [...] --- a/net/core/sock.c +++ b/net/core/sock.c @@ -913,6 +913,23

Re: [PATCH] sockperf: add SO_LL socketop support

2013-06-12 Thread Eliezer Tamir
On 12/06/2013 11:36, Amir Vadai wrote: On 11/06/2013 17:26, Eliezer Tamir wrote: Add lls socket option support to sockperf. Right now we always get the option before set to show the option is working properly. We should probably remove that in an official release. use --lls (value in usecs) to

[PATCH v2 net-next 3/3] net: add socket option for low latency polling

2013-06-12 Thread Eliezer Tamir
adds a socket option for low latency polling. This allows overriding the global sysctl value with a per-socket one. Signed-off-by: Eliezer Tamir --- arch/alpha/include/uapi/asm/socket.h |2 ++ arch/avr32/include/uapi/asm/socket.h |2 ++ arch/cris/include/uapi/asm/socket.h|2

[PATCH v2 net-next 2/3] net: change sysctl_net_ll_poll into an unsigned int

2013-06-12 Thread Eliezer Tamir
There is no reason for sysctl_net_ll_poll to be an unsigned long. Change it into an unsigned int. Fix the proc handler. Add a cast in ll_end_time() Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h |5 +++-- net/core/sysctl_net_core.c |4 ++-- net/socket.c

[PATCH v2 net-next 0/3] net: low latency sockets follow ups

2013-06-12 Thread Eliezer Tamir
David, Here are two clean up patches, plus one that adds a socket option for LLS. Patch 1 removes the config menu for NET_LL_RX_POLL and defaults to y. Patch 2 converts sysctl_net_ll_poll into an unsigned int Patch 3 adds an SO_LL socket option to allow per-socket control of busy polling. I will

[PATCH v2 net-next 1/3] net: remove NET_LL_RX_POLL config menue

2013-06-12 Thread Eliezer Tamir
Remove NET_LL_RX_POLL from the config menu. Change default to y. Busy polling still needs to be enabled at run time. Signed-off-by: Eliezer Tamir --- net/Kconfig | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/net/Kconfig b/net/Kconfig index d6a9ce6..8fe8845

[PATCH v2 sockperf] sockperf: add SO_LL socketop support

2013-06-12 Thread Eliezer Tamir
Add lls socket option support. use --lls (value in usecs) to override global setting. Right now we always get and print the value of the option before we set, to show that the option works properly. This should be removed in an official release. --- src/Defs.h |3 +++ src/SockPerf.cpp

Re: [PATCH net-next 0/2] net: lls cleanup patches

2013-07-02 Thread Eliezer Tamir
On 02/07/2013 00:08, David Miller wrote: From: Eliezer Tamir Date: Fri, 28 Jun 2013 15:59:18 +0300 Here are two cleanup patches. 1. fix warning from debug_smp_processor_id(). - reported by Cody P Schafer. Applied, but like Ben said perhaps you want to remember the last cpu you got the

Re: [PATCH net-next 0/2] net: lls cleanup patches

2013-07-02 Thread Eliezer Tamir
On 02/07/2013 11:38, Eliezer Tamir wrote: On 02/07/2013 00:08, David Miller wrote: From: Eliezer Tamir Date: Fri, 28 Jun 2013 15:59:18 +0300 Here are two cleanup patches. 1. fix warning from debug_smp_processor_id(). - reported by Cody P Schafer. Applied, but like Ben said perhaps you

[PATCH v2 net-next] net: convert lls to use time_in_range()

2013-07-02 Thread Eliezer Tamir
Time in range will fail safely if we move to a different cpu with an extremely large clock skew. Add time_in_range64() and convert lls to use it. Signed-off-by: Eliezer Tamir --- v1->v2 fixed double call to sched_clock() in can_poll_ll(), checkpatchisms fs/select.c |

[PATCH net-next v2 (repost)] net: convert lls to use time_in_range()

2013-07-02 Thread Eliezer Tamir
Time in range will fail safely if we move to a different cpu with an extremely large clock skew. Add time_in_range64() and convert lls to use it. changelog: v2 - fixed double call to sched_clock in can_poll_ll - fixed checkpatchisms Signed-off-by: Eliezer Tamir --- fs/select.c

Re: [PATCH v2 net-next] net: convert lls to use time_in_range()

2013-07-02 Thread Eliezer Tamir
On 02/07/2013 23:10, Ben Hutchings wrote: On Tue, 2013-07-02 at 12:49 +0300, Eliezer Tamir wrote: Time in range will fail safely if we move to a different cpu with an extremely large clock skew. Add time_in_range64() and convert lls to use it. Signed-off-by: Eliezer Tamir --- v1->v2 fi

[PATCH net-next] net: lls fix build with allnoconfig

2013-07-02 Thread Eliezer Tamir
correct placeholder declarations to prevent build breakage when !CONFIG_NET_LL_RX_POLL Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/ll_poll.h b/include/net/ll_poll.h index b76f004..0d620ba

Re: [PATCH v2 net-next] net: convert lls to use time_in_range()

2013-07-03 Thread Eliezer Tamir
On 02/07/2013 23:42, Ben Hutchings wrote: On Tue, 2013-07-02 at 23:28 +0300, Eliezer Tamir wrote: On 02/07/2013 23:10, Ben Hutchings wrote: On Tue, 2013-07-02 at 12:49 +0300, Eliezer Tamir wrote: Time in range will fail safely if we move to a different cpu with an extremely large clock skew

Re: linux-next: build failure after merge of the final tree (net-next tree related)

2013-07-03 Thread Eliezer Tamir
On 03/07/2013 10:48, Stephen Rothwell wrote: Hi all, After merging the final tree, today's linux-next build (powerpc allnoconfig) failed like this: fs/select.c: In function 'do_select': fs/select.c:408:2: error: implicit declaration of function 'll_start_time' [-Werror=implicit-function-decla

Re: [PATCH v4 net-next] net: poll/select low latency socket support

2013-06-27 Thread Eliezer Tamir
On 28/06/2013 07:43, Andi Kleen wrote: @@ -400,6 +402,8 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time) poll_table *wait; int retval, i, timed_out = 0; unsigned long slack = 0; + unsigned int ll_flag = POLL_LL; + u64 ll_time = ll_end_time(

Re: [PATCH v4 net-next] net: poll/select low latency socket support

2013-06-27 Thread Eliezer Tamir
On 28/06/2013 03:29, Cody P Schafer wrote: On 06/27/2013 05:25 PM, Cody P Schafer wrote: On 06/24/2013 12:28 AM, Eliezer Tamir wrote: select/poll busy-poll support. ... I'm seeing warnings about using smp_processor_id() while preemptable (log included below) due to this patch. I expec

[PATCH net-next 1/2] net: fix LLS debug_smp_processor_id() warning

2013-06-28 Thread Eliezer Tamir
P Schafer Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h | 30 +- 1 files changed, 25 insertions(+), 5 deletions(-) diff --git a/include/net/ll_poll.h b/include/net/ll_poll.h index 5bf2b3a..6d45e6f 100644 --- a/include/net/ll_poll.h +++ b/include/net/ll_poll.h

[PATCH net-next 0/2] net: lls cleanup patches

2013-06-28 Thread Eliezer Tamir
David, Here are two cleanup patches. 1. fix warning from debug_smp_processor_id(). - reported by Cody P Schafer. 2. avoid calling sched_clock() in select and poll when lls is disabled. - reported by Andi Kleen. Thanks to everyone for their comments. -Eliezer -- To unsubscribe from this list: s

[PATCH net-next 2/2] net: avoid calling sched_clock when LLS is off

2013-06-28 Thread Eliezer Tamir
Change Low Latency Sockets code for select and poll so that when LLS is disabled sched_clock() is never called. Also, avoid sending POLL_LL to sockets if disabled. Reported-by: Andi Kleen Signed-off-by: Eliezer Tamir --- fs/select.c | 11 +++ include/net/ll_poll.h | 17

Re: [PATCH net-next 2/2] net: avoid calling sched_clock when LLS is off

2013-06-28 Thread Eliezer Tamir
On 28/06/2013 17:38, Andi Kleen wrote: diff --git a/fs/select.c b/fs/select.c index 79b876e..3654075 100644 --- a/fs/select.c +++ b/fs/select.c @@ -402,7 +402,7 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time) poll_table *wait; int retval, i, timed_out = 0;

Re: Using sched_clock() for polling time limit

2013-06-29 Thread Eliezer Tamir
On 28/06/2013 19:51, Ben Hutchings wrote: On Fri, 2013-06-28 at 15:59 +0300, Eliezer Tamir wrote: Our use of sched_clock is OK because we don't mind the side effects of calling it and occasionally waking up on a different CPU. Sure about that? Jitter matters too. Pretty sure, this

[PATCH net] busy_poll: cleanup do-nothing placeholders

2013-08-04 Thread Eliezer Tamir
placeholder. Signed-off-by: Eliezer Tamir --- include/net/busy_poll.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h index f18b919..8e2dfc1 100644 --- a/include/net/busy_poll.h +++ b/include/net/busy_poll.h @@ -162,11 +162,6

[PATCH RFC net-next] net: epoll support for busy poll

2013-08-21 Thread Eliezer Tamir
e event handling algorithm. Willem de Brujin: advice on style, where to put things, RCU. Special thanks for finding bugs in earlier versions: Julie Cummings. Signed-off-by: Eliezer Tamir --- fs/eventpoll.c | 131 + include/linux/poll.h|2 include

Re: [PATCH RFC net-next] net: epoll support for busy poll

2013-08-21 Thread Eliezer Tamir
On 21/08/2013 16:53, Eric Dumazet wrote: > On Wed, 2013-08-21 at 13:39 +0300, Eliezer Tamir wrote: > >> >> Instead of remembering the napi_id for all the sockets in an epoll, >> we only track the first socket we see with any unique napi_id. >> The rational for this i

Re: [PATCH RFC net-next] net: epoll support for busy poll

2013-08-23 Thread Eliezer Tamir
On 22/08/2013 23:14, David Miller wrote: > From: Eliezer Tamir > Date: Wed, 21 Aug 2013 13:39:54 +0300 > >> +SK_LL_STATE_MISS_2, /* data came through napi poll twice in a row */ > > Please rename this to SK_LL_STATE_MISS_MULTI or something like that. > > Th

Re: [PATCH RFC net-next] net: epoll support for busy poll

2013-08-23 Thread Eliezer Tamir
On 22/08/2013 23:11, Eric Wong wrote: > Eliezer Tamir wrote: >> Performance: >> using sockperf, Intel X520 NICs, >> Supermicro 6026TT-BTF systems with E5-2690 Xeon CPUs >> 100 UDP sockets avg. latency 5.756 (std-dev 0.510) >> 1k UDP sockets avg. latency 5.780 (

[PATCH net] net: rename and move busy poll mib counter

2013-08-06 Thread Eliezer Tamir
Move the low latency mib counter to the ip section. Rename it from low latency to busy poll. Reported-by: Shawn Bohrer Signed-off-by: Eliezer Tamir --- include/net/busy_poll.h |4 ++-- include/uapi/linux/snmp.h |2 +- net/ipv4/proc.c |2 +- 3 files changed, 4

Re: [PATCH net] net: rename and move busy poll mib counter

2013-08-06 Thread Eliezer Tamir
On 06/08/2013 13:14, Eric Dumazet wrote: > On Tue, 2013-08-06 at 12:52 +0300, Eliezer Tamir wrote: >> Move the low latency mib counter to the ip section. >> Rename it from low latency to busy poll. >> >> Reported-by: Shawn Bohrer >> Signed-off-by: Eliezer Tamir &

[PATCH net v2] net: rename busy poll MIB counter

2013-08-07 Thread Eliezer Tamir
Rename mib counter from "low latency" to "busy poll" v1 also moved the counter to the ip MIB (suggested by Shawn Bohrer) Eric Dumazet suggested that the current location is better. So v2 just renames the counter to fit the new naming convention. Signed-off-by: Eliezer Tami

Re: [RFC PATCH 0/5] net: low latency Ethernet device polling

2013-03-02 Thread Eliezer Tamir
On 01/03/2013 23:24, David Miller wrote: From: Eliezer Tamir Date: Wed, 27 Feb 2013 09:55:49 -0800 This patchset adds the ability for the socket layer code to poll directly on an Ethernet device's RX queue. This eliminates the cost of the interrupt and context switch and with proper t

Re: [RFC PATCH 0/5] net: low latency Ethernet device polling

2013-03-04 Thread Eliezer Tamir
On 04/03/2013 09:37, Cong Wang wrote: On 02/28/2013 01:55 AM, Eliezer Tamir wrote: Open issues: 1. Find a way to avoid the need to change the sk and skb structs. One big disadvantage of how we do this right now is that when a device is removed, it's hard to prevent it from getting polled

Re: [RFC PATCH 1/5] net: implement support for low latency socket polling

2013-03-04 Thread Eliezer Tamir
On 03/03/2013 20:35, Eric Dumazet wrote: On Wed, 2013-02-27 at 09:55 -0800, Eliezer Tamir wrote: index 821c7f4..d1d1016 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -408,6 +408,10 @@ struct sk_buff { struct sock *sk; struct net_device

Re: [RFC PATCH 0/5] net: low latency Ethernet device polling

2013-03-04 Thread Eliezer Tamir
A dumb question: is bypassing tcpdump/netfilters/qdisc etc. what we always want? Isn't this a security issue? We are not bypassing any of the regular stack checks/hooks, we call the normal netif_rx_skb(). correction, netif_receive_skb() -- To unsubscribe from this list: send the line "uns

Re: [RFC PATCH 1/5] net: implement support for low latency socket polling

2013-03-04 Thread Eliezer Tamir
On 04/03/2013 16:52, Eric Dumazet wrote: On Mon, 2013-03-04 at 10:43 +0200, Eliezer Tamir wrote: One could for example increment the generation id every time the RTNL is taken. or is this too much? RTNL is taken for a lot of operations, it would be better to have a finer grained increment

Re: [RFC PATCH 1/5] net: implement support for low latency socket polling

2013-03-05 Thread Eliezer Tamir
On 05/03/2013 18:43, Ben Hutchings wrote: On Wed, 2013-02-27 at 09:55 -0800, Eliezer Tamir wrote: Should the units really be cycles or, say, microseconds? I assume that a sysctl setter can do a conversion to cycles so that there's no need to multiply every time the value is used. (If th

[PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-19 Thread Eliezer Tamir
Dave, Please consider applying to net-next. Thanks, Eliezer This is an updated version of the code we posted on February. Patch 1 adds ndo_ll_poll and the IP code to use it. Patch 2 is an example of how TCP can use ndo_ll_poll. Patch 3 shows how this method would be implemented for the ixgbe d

[PATCH v2 net-next 1/4] net: implement support for low latency socket polling

2013-05-19 Thread Eliezer Tamir
: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- Documentation/networking/ip-sysctl.txt |5 ++ include/linux/netdevice.h |3 + include/linux/skbuff.h |8 +++- include/net/ll_poll.h

[PATCH v2 net-next 2/4] tcp: add TCP support for low latency receive poll.

2013-05-19 Thread Eliezer Tamir
an example of how one could add support for ndo_ll_poll to TCP. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- net/ipv4/Kconfig | 11 +++ net/ipv4/tcp.c |9 + net/ipv4/tcp_input.c

[PATCH v2 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-19 Thread Eliezer Tamir
Add the ixgbe driver code implementing ndo_ll_poll. It should be easy for other drivers to do something similar in order to enable support for CONFIG_INET_LL_RX_POLL Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir

[PATCH v2 net-next 4/4] ixgbe: add extra stats for ndo_ll_poll

2013-05-19 Thread Eliezer Tamir
Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 14 drivers

Re: [PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-19 Thread Eliezer Tamir
On 19/05/2013 22:06, Or Gerlitz wrote: On Sun, May 19, 2013 at 1:25 PM, Eliezer Tamir wrote: This is an updated version of the code we posted on February. Last time you've placed a copy of the patchset in the rfc branch of git://github.com/jbrandeb/lls.git - can you repost there V2 too

Re: [PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-19 Thread Eliezer Tamir
On 19/05/2013 22:06, Or Gerlitz wrote: Last time you've placed a copy of the patchset in the rfc branch of git://github.com/jbrandeb/lls.git - can you repost there V2 too? Or. BTW did you try the last version on your HW? -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: [PATCH v2 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread Eliezer Tamir
On 20/05/2013 10:54, David Miller wrote: From: Eliezer Tamir Date: Sun, 19 May 2013 13:25:33 +0300 +#else /* CONFIG_INET_LL_RX_FLUSH */ + +#define sk_valid_ll(sk) 0 +#define sk_poll_ll(sk, nonblock) do {} while (0) +#define skb_mark_ll(napi, skb) do {} while (0) +#define sk_mark_ll(sk, skb

[PATCH v3 net-next 0/4] net: low latency Ethernet device polling

2013-05-20 Thread Eliezer Tamir
updated with the comments I got so far. Thanks, Eliezer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkm

[PATCH v3 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread Eliezer Tamir
: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- Documentation/networking/ip-sysctl.txt |5 ++ include/linux/netdevice.h |3 + include/linux/skbuff.h |8 ++- include/net/ll_poll.h

[PATCH v3 net-next 2/4] tcp: add TCP support for low latency receive poll.

2013-05-20 Thread Eliezer Tamir
an example of how one could add support for ndo_ll_poll to TCP. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- net/ipv4/Kconfig | 11 +++ net/ipv4/tcp.c |9 + net/ipv4/tcp_input.c

[PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-20 Thread Eliezer Tamir
Add the ixgbe driver code implementing ndo_ll_poll. It should be easy for other drivers to do something similar in order to enable support for CONFIG_INET_LL_RX_POLL Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir

[PATCH v3 net-next 4/4] ixgbe: add extra stats for ndo_ll_poll

2013-05-20 Thread Eliezer Tamir
Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 14 drivers

Re: [PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-20 Thread Eliezer Tamir
On 19/05/2013 22:56, Or Gerlitz wrote: On Sun, May 19, 2013 at 10:25 PM, Eliezer Tamir < eliezer.ta...@linux.intel.com> wrote: On 19/05/2013 22:06, Or Gerlitz wrote: Last time you've placed a copy of the patchset in the rfc branch of git://github.com/jbrandeb/lls.**git <htt

Re: [PATCH v2 6/7] PCI: Make sure VF's driver get attached after PF's

2013-05-20 Thread Eliezer Tamir
On 20/05/2013 15:28, Or Gerlitz wrote: On Wed, May 15, 2013 at 7:12 PM, Greg Rose wrote: I'm really not a fan of this. Seems to me the tail is wagging the dog here. Fix the driver to work without a PF driver being present. Greg, Alex, As I wrote over the V1 thread, currently we can't go

Re: [PATCH v3 net-next 2/4] tcp: add TCP support for low latency receive poll.

2013-05-20 Thread Eliezer Tamir
on 20/05/2013 16:49, Eric Dumazet wrote: On Mon, 2013-05-20 at 13:16 +0300, Eliezer Tamir wrote: +config INET_LL_TCP_POLL + bool "Low Latency TCP Receive Poll" + depends on INET_LL_RX_POLL + default n + ---help--- + TCP support for Low Latency TCP

Re: [PATCH v2 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread Eliezer Tamir
On 20/05/2013 19:22, Andi Kleen wrote: diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index f98ca63..cfcf0ea 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt @@ -19,6 +19,11 @@ ip_no_pmtu_disc - BOOLEAN

Re: [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-20 Thread Eliezer Tamir
On 20/05/2013 23:20, Or Gerlitz wrote: On Mon, May 20, 2013 at 1:16 PM, Eliezer Tamir wrote: Add the ixgbe driver code implementing ndo_ll_poll. It should be easy for other drivers to do something similar in order to enable support for CONFIG_INET_LL_RX_POLL I am not sure, Willem ported

Re: [PATCH v3 net-next 1/4] net: implement support for low latency socket polling

2013-05-21 Thread Eliezer Tamir
On 20/05/2013 18:29, Eric Dumazet wrote: On Mon, 2013-05-20 at 13:16 +0300, Eliezer Tamir wrote: --- +static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) +{ + skb->dev_ref = napi; +} + +static inline void sk_mark_ll(struct sock *sk, struct sk_buff *

Re: [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-21 Thread Eliezer Tamir
On 21/05/2013 11:24, Or Gerlitz wrote: On Tue, May 21, 2013 at 10:14 AM, David Miller wrote: From: "Eilon Greenstein" Date: Tue, 21 May 2013 10:06:43 +0300 Hopefully this series will be accepted so we can send follow up support for the bnx2x as well. I think in two or three more iterations

Re: [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-21 Thread Eliezer Tamir
On 21/05/2013 11:39, David Miller wrote: From: Or Gerlitz Date: Tue, 21 May 2013 11:24:41 +0300 On Tue, May 21, 2013 at 10:14 AM, David Miller wrote: From: "Eilon Greenstein" Date: Tue, 21 May 2013 10:06:43 +0300 Hopefully this series will be accepted so we can send follow up support for

Re: [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-21 Thread Eliezer Tamir
On 21/05/2013 11:43, Or Gerlitz wrote: On Tue, May 21, 2013 at 11:39 AM, David Miller wrote: It's one of those "implementation details", I hate it too. Maybe if we bake it on this list little further we can see how to get away from that, or what's the most non ugly way for that? I'm all fo

Re: [PATCH v3 net-next 0/4] net: low latency Ethernet device polling

2013-05-21 Thread Eliezer Tamir
Many of the questions you asked are covered in our RFC cover letter, but I will touch them briefly On 21/05/2013 15:06, Alex Rosenbaum wrote: 1. It seem this patch does not cover epoll/select and such IO muxing APIs? We are thinking about how to implement epoll support as one of the next ste

[PATCH v4 net-next 0/4] net: low latency Ethernet device polling

2013-05-21 Thread Eliezer Tamir
Hello Dave, I believe that I addressed the issues that were raised. Please look and see if you have more comments. Thank you all for your input. To prevent the use of a stale napi pointer, I implemented a global id that should be incremented whenever a napi is freed. I used the free space in skb

[PATCH v4 net-next 2/4] tcp: add TCP support for low latency receive poll.

2013-05-21 Thread Eliezer Tamir
adds busy-poll support for TCP. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- net/ipv4/tcp.c |9 + net/ipv4/tcp_input.c |4 2 files changed, 13 insertions(+), 0 deletions(-) diff --git

[PATCH v4 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-21 Thread Eliezer Tamir
Add the ixgbe driver code implementing ndo_ll_poll. It should be easy for other drivers to do something similar in order to enable support for CONFIG_INET_LL_RX_POLL Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir

[PATCH v4 net-next 1/4] net: implement support for low latency socket polling

2013-05-21 Thread Eliezer Tamir
: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- Documentation/networking/ip-sysctl.txt |6 ++ include/linux/netdevice.h |3 + include/linux/skbuff.h | 13 +++- include/net/ll_poll.h

[PATCH v4 net-next 4/4] ixgbe: add extra stats for ndo_ll_poll

2013-05-21 Thread Eliezer Tamir
Add additional statistics to the ixgbe driver for ndo_ll_poll Defined under LL_EXTENDED_STATS Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Willem de Bruijn Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 14 drivers

Re: [PATCH v4 net-next 1/4] net: implement support for low latency socket polling

2013-05-21 Thread Eliezer Tamir
On 21/05/2013 20:23, Ben Hutchings wrote: On Tue, 2013-05-21 at 17:26 +0300, Eliezer Tamir wrote: Microseconds, not cycles. us, not ms. CONFIG_X86_TSC Should be done before testing ndo_ll_poll above, so you can avoid repeating the indirections. Typo: 'permanent'. Ben

Re: [PATCH v3 net-next 1/4] net: implement support for low latency socket polling

2013-05-21 Thread Eliezer Tamir
On 21/05/2013 20:51, Eric Dumazet wrote: On Tue, 2013-05-21 at 10:48 -0700, Eric Dumazet wrote: We do not keep skb->dev information once a packet leaves the rcu protected region. Once packet is queued to tcp input queues, skb->dev is NULL. This is done in tcp_v4_rcv() & tcp_v6_rcv() So if

<    1   2   3   >