Re: [PATCH v2] socket.7: add description for SO_BUSY_POLL

2015-02-05 Thread Eliezer Tamir
On 05/02/2015 15:17, Michael Kerrisk (man-pages) wrote: > On 20 January 2014 at 18:28, Eliezer Tamir > wrote: >> On 20/01/2014 18:28, Michael Kerrisk (man-pages) wrote: >>> On 07/10/2013 04:18 PM, Eliezer Tamir wrote: >>>> Add description for the SO_BUSY_P

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-09-03 Thread Eliezer Tamir
On 03/09/2014 10:51, Michael S. Tsirkin wrote: > On Wed, Sep 03, 2014 at 09:49:10AM +0300, Eliezer Tamir wrote: >> On 02/09/2014 11:31, Michael S. Tsirkin wrote: >>> On Tue, Sep 02, 2014 at 09:15:18AM +0300, Eliezer Tamir wrote: >> Busy polling is not a general purpose fea

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-09-02 Thread Eliezer Tamir
On 02/09/2014 11:31, Michael S. Tsirkin wrote: > On Tue, Sep 02, 2014 at 09:15:18AM +0300, Eliezer Tamir wrote: >> On 02/09/2014 06:29, Jason Wang wrote: >>> On 09/01/2014 02:39 PM, Eliezer Tamir wrote: >>>> On 29/08/2014 06:08, Jason Wang wrote: >>>>

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-09-02 Thread Eliezer Tamir
On 02/09/2014 09:31, Jason Wang wrote: > On 09/02/2014 02:03 PM, Eliezer Tamir wrote: >> On 02/09/2014 06:35, Jason Wang wrote: >>> Not sure whether this method will scale considering thousands of sockets >>> and processes. >> There may be millions of sockets, bu

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-09-01 Thread Eliezer Tamir
On 02/09/2014 06:29, Jason Wang wrote: > On 09/01/2014 02:39 PM, Eliezer Tamir wrote: >> On 29/08/2014 06:08, Jason Wang wrote: >>>> Yes, but rx busy polling only works in process context and does not >>>> disable bh, so it may be not an issue. >> sk_busy_loo

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-09-01 Thread Eliezer Tamir
On 02/09/2014 06:35, Jason Wang wrote: > On 09/01/2014 02:55 PM, Eliezer Tamir wrote: >> On 26/08/2014 10:16, Jason Wang wrote: >>> On 08/25/2014 09:16 PM, Eliezer Tamir wrote: >> Think about the case where two processes are busy polling on the >> same CPU and the

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-08-31 Thread Eliezer Tamir
On 26/08/2014 10:16, Jason Wang wrote: > On 08/25/2014 09:16 PM, Eliezer Tamir wrote: >> Here are my 2 cents: >> I think Ingo's suggestion of only yielding to tasks with same or higher >> priority makes sense. > > I'm not sure I get your meaning. Do you

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-08-31 Thread Eliezer Tamir
On 29/08/2014 06:08, Jason Wang wrote: > Yes, but rx busy polling only works in process context and does not > disable bh, so it may be not an issue. sk_busy_loop() uses rcu_read_lock_bh(), so it does run with bh disabled. -Eliezer -- To unsubscribe from this list: send the line "unsubscribe lin

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2014-08-25 Thread Eliezer Tamir
;> >> And add warns to make sure it can only be called in process context. > > > 1) Any reasons Eliezer Tamir is not included in the CC list ? Thanks for remembering me, Eric ;) Here are my 2 cents: I think Ingo's suggestion of only yielding to tasks with same or higher

Re: [PATCH 3.12 078/104] ixgbe: fix qv_lock_napi call in ixgbe_napi_disable_all

2014-08-21 Thread Eliezer Tamir
On 20/08/2014 14:43, Jiri Slaby wrote: > From: Jacob Keller > > 3.12-stable review patch. If anyone has any objections, please let me know. No objection, I am however unable to test this myself at the moment. I would suggest that someone takes a look at other drivers that support busypoll, to

Re: [PATCH v2] socket.7: add description for SO_BUSY_POLL

2014-01-20 Thread Eliezer Tamir
On 20/01/2014 18:28, Michael Kerrisk (man-pages) wrote: > On 07/10/2013 04:18 PM, Eliezer Tamir wrote: >> Add description for the SO_BUSY_POLL socket option to the socket(7) manpage. > > Long after the fact, I've applied this. Thanks, Eliezer. > > Would you be willing

Re: [PATCH 00/15] cleanups and optimizations

2013-12-17 Thread Eliezer Tamir
On 17/12/2013 17:13, Peter Zijlstra wrote: > On Tue, Dec 17, 2013 at 04:03:58PM +0200, Eliezer Tamir wrote: >> >> I'm not sure that subtracting the spin time is the optimal thing to do. >> >> The busy poll time is supposed to be limited to something less than 1ms.

Re: [PATCH 00/15] cleanups and optimizations

2013-12-17 Thread Eliezer Tamir
n 17/12/2013 15:32, Peter Zijlstra wrote: > > Awesomeness.. you'll work on subtracting the spin time from the sleep > time? Me or someone on our team will work on it. I'm not sure that subtracting the spin time is the optimal thing to do. The busy poll time is supposed to be limited to somethin

Re: [PATCH 00/15] cleanups and optimizations

2013-12-16 Thread Eliezer Tamir
On 13/12/2013 15:56, Peter Zijlstra wrote: > On Fri, Dec 13, 2013 at 12:49:01PM +0200, Eliezer Tamir wrote: >> On 12/12/2013 16:08, Peter Zijlstra wrote: >>> This series contains the preempt_enable_no_resched() cleanups that include >>> spin_lock_bh() optimizations and

Re: [PATCH 00/15] cleanups and optimizations

2013-12-13 Thread Eliezer Tamir
On 12/12/2013 16:08, Peter Zijlstra wrote: > This series contains the preempt_enable_no_resched() cleanups that include > spin_lock_bh() optimizations and local_clock() optimizations. I'm trying to test this on tip/master. Patch 3 fails to apply on kenrel/softirq.c Thanks, Eliezer -- To unsubscri

Re: [PATCH 7/8] sched, net: Fixup busy_loop_us_clock()

2013-11-29 Thread Eliezer Tamir
On 28/11/2013 19:40, Peter Zijlstra wrote: > On Thu, Nov 28, 2013 at 06:49:00PM +0200, Eliezer Tamir wrote: >> I have tested this patch and I see a performance regression of about >> 1.5%. > > Cute, can you qualify your metric? Since this is a poll loop the only > metric t

Re: [PATCH 7/8] sched, net: Fixup busy_loop_us_clock()

2013-11-28 Thread Eliezer Tamir
On 26/11/2013 17:57, Peter Zijlstra wrote: > > Replace sched_clock() usage with local_clock() which has a bounded > drift between CPUs (<2 jiffies). > Peter, I have tested this patch and I see a performance regression of about 1.5%. Maybe it would be better, rather then testing in the fast pat

Re: [PATCH 6/7] sched: Clean up preempt_enable_no_resched() abuse

2013-11-25 Thread Eliezer Tamir
On 22/11/2013 13:30, Peter Zijlstra wrote: > On Fri, Nov 22, 2013 at 08:56:00AM +0200, Eliezer Tamir wrote: >> On 21/11/2013 15:39, Peter Zijlstra wrote: >>> On Thu, Nov 21, 2013 at 03:26:17PM +0200, Eliezer Tamir wrote: > > Please use local_clock(), yes its slightly mor

Re: [PATCH 6/7] sched: Clean up preempt_enable_no_resched() abuse

2013-11-21 Thread Eliezer Tamir
On 21/11/2013 15:39, Peter Zijlstra wrote: > On Thu, Nov 21, 2013 at 03:26:17PM +0200, Eliezer Tamir wrote: >> We don't override any limit the user has put on the system call. > > You are in fact, note how the normal select @endtime argument is only > set up _after_ you

Re: [PATCH 6/7] sched: Clean up preempt_enable_no_resched() abuse

2013-11-20 Thread Eliezer Tamir
On 20/11/2013 18:04, Peter Zijlstra wrote: > The only valid use of preempt_enable_no_resched() is if the very next > line is schedule() or if we know preemption cannot actually be enabled > by that statement due to known more preempt_count 'refs'. The reason I used the no resched version is that b

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

2013-08-25 Thread Eliezer Tamir
On 26/08/2013 00:30, Amir Vadai wrote: > I'm on vacation, will test and have some inputs later this week when I be > back. > Hello Amir, Ping me when you get back and I will send you my latest so you can play with it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in t

[PATCH net] net: add cpu_relax to busy poll loop

2013-08-25 Thread Eliezer Tamir
Add a cpu_relaxt to sk_busy_loop. Julie Cummings reported performance issues when hyperthreading is on. Arjan van de Ven observed that we should have a cpu_relax() in the busy poll loop. Reported-by: Julie Cummings Signed-off-by: Eliezer Tamir --- include/net/busy_poll.h |1 + 1 files

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 (

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-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

[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

[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: [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] 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

[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

Re: [PATCH v2] socket.7: add description for SO_BUSY_POLL

2013-07-10 Thread Eliezer Tamir
On 10/07/2013 21:03, Michael Kerrisk wrote: > On 07/10/13 16:18, Eliezer Tamir wrote: >> Add description for the SO_BUSY_POLL socket option to the socket(7) manpage. > > What's the status of this feature. A quick grep seems to show > that the feature is not yet in mainline.

[PATCH net-next v3 3/3] net: rename busy poll socket op and globals

2013-07-10 Thread Eliezer Tamir
Rename LL_SO to BUSY_POLL_SO Rename sysctl_net_ll_{read,poll} to sysctl_busy_{read,poll} Fix up users of these variables. Fix documentation for sysctl. a patch for the socket.7 man page will follow separately, because of limitations of my mail setup. Signed-off-by: Eliezer Tamir

[PATCH v2] socket.7: add description for SO_BUSY_POLL

2013-07-10 Thread Eliezer Tamir
Add description for the SO_BUSY_POLL socket option to the socket(7) manpage. v2 fixed typos reported by Rasmus Villemoes Signed-off-by: Eliezer Tamir --- man7/socket.7 | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/man7/socket.7 b/man7/socket

[PATCH net-next v3 1/3] net: rename include/net/ll_poll.h to include/net/busy_poll.h

2013-07-10 Thread Eliezer Tamir
Rename the file and correct all the places where it is included. Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |2 drivers/net/ethernet/intel/ixgbe/ixgbe.h|2 drivers/net/ethernet/mellanox/mlx4/en_netdev.c |2 drivers/net/ethernet

[PATCH net-next v3 2/3] net: rename ll methods to busy-poll

2013-07-10 Thread Eliezer Tamir
Rename ndo_ll_poll to ndo_busy_poll. Rename sk_mark_ll to sk_mark_napi_id. Rename skb_mark_ll to skb_mark_napi_id. Correct all useres of these functions. Update comments and defines in include/net/busy_poll.h Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

[PATCH net-next v3 0/3] net: finish renaming lls to busy poll

2013-07-10 Thread Eliezer Tamir
David, Here are three patches that complete the rename of lls to busy-poll 1. rename include/net/ll_poll.h to include/net/busy_poll.h 2. Rename ndo_ll_poll to ndo_busy_poll. Rename sk_mark_ll to sk_mark_napi_id. Rename skb_mark_ll to skb_mark_napi_id. Correct all useres of these function

Re: [PATCH net-next v2 1/3] net: rename include/net/ll_poll.h to include/net/busy_poll.h

2013-07-10 Thread Eliezer Tamir
On 10/07/2013 16:17, Arend van Spriel wrote: > On 07/10/2013 02:13 PM, Eliezer Tamir wrote: >> Rename the file and correct all the places where it is included. >> Signed-off-by: Eliezer Tamir >> --- >> include/net/busy_poll.h

[PATCH] socket.7: add description for SO_BUSY_POLL

2013-07-10 Thread Eliezer Tamir
Add description for the SO_BUSY_POLL socket option to the socket(7) manpage. Signed-off-by: Eliezer Tamir --- man7/socket.7 | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/man7/socket.7 b/man7/socket.7 index f2213eb..27603c9 100644 --- a/man7

[PATCH net-next v2 1/3] net: rename include/net/ll_poll.h to include/net/busy_poll.h

2013-07-10 Thread Eliezer Tamir
Rename the file and correct all the places where it is included. Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |2 drivers/net/ethernet/intel/ixgbe/ixgbe.h|2 drivers/net/ethernet/mellanox/mlx4/en_netdev.c |2 drivers/net/ethernet

[PATCH net-next v2 2/3] net: rename ll methods to busy-poll

2013-07-10 Thread Eliezer Tamir
: Eliezer Tamir --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c|4 ++-- drivers/net/ethernet/mellanox/mlx4/en_netdev.c |2 +- drivers/net/ethernet/mellanox/mlx4

[PATCH net-next v2 3/3] net: rename busy poll socket op and globals

2013-07-10 Thread Eliezer Tamir
Rename LL_SO to BUSY_POLL_SO Rename sysctl_net_ll_{read,poll} to sysctl_busy_{read,poll} Fix up users of these variables. Fix documentation for sysctl. a patch for the socket.7 man page will follow separately, because of limitations of my mail setup. Signed-off-by: Eliezer Tamir

[PATCH net-next 2/3] net: rename ll methods to busy-poll

2013-07-10 Thread Eliezer Tamir
Rename ndo_ll_poll to ndo_busy_poll. Rename sk_mark_ll to sk_mark_napi_id. Rename skb_mark_ll to skb_mark_napi_id. Correct all useres of these functions. Update comments and defines in include/net/busy_poll.h Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

[PATCH net-next 1/3] net: rename include/net/ll_poll.h to include/net/busy_poll.h

2013-07-10 Thread Eliezer Tamir
Rename the file and correct all the places where it is included. Signed-off-by: Eliezer Tamir --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |2 drivers/net/ethernet/intel/ixgbe/ixgbe.h|2 drivers/net/ethernet/mellanox/mlx4/en_netdev.c |2 drivers/net/ethernet

[PATCH net-next 3/3] net: rename busy poll socket op and globals

2013-07-10 Thread Eliezer Tamir
Rename LL_SO to BUSY_POLL_SO Rename sysctl_net_ll_{read,poll} to sysctl_busy_{read,poll} Fix up users of these variables. Fix documentation for sysctl. a patch for the socket.7 man page will follow separately, because of limitations of my mail setup. Signed-off-by: Eliezer Tamir

Re: [PATCH net-next] net: rename low latency sockets functions to busy poll

2013-07-09 Thread Eliezer Tamir
On 10/07/2013 07:41, David Miller wrote: > From: Eliezer Tamir > Date: Wed, 10 Jul 2013 06:29:16 +0300 > >> If the following names changes are acceptable I will try to send out >> a patch today. >> 2. ndo_ll_poll -> ndo_busy_poll >> >> - not technicall

Re: [PATCH net-next] net: rename low latency sockets functions to busy poll

2013-07-09 Thread Eliezer Tamir
On 10/07/2013 02:06, David Miller wrote: > From: Jonathan Corbet > Date: Tue, 9 Jul 2013 16:25:14 -0600 > >> On Mon, 08 Jul 2013 16:20:34 +0300 >> Eliezer Tamir wrote: >> >>> Rename POLL_LL to POLL_BUSY_LOOP. >> >> So pardon me if I speak out of

[PATCH net-next v2] net/fs: change busy poll time accounting

2013-07-09 Thread Eliezer Tamir
. Reorder poll/select busy loop conditions: - Clear busy_flag after one time we can't busy-poll. - Only init busy_end if we actually are going to busy-poll. Added one more missing need_resched() test. Signed-off-by: Eliezer Tamir --- fs/select.c |

[PATCH net-next] net/fs: change busy poll time accounting

2013-07-09 Thread Eliezer Tamir
ually are going to busy-poll. Added one more missing need_resched() test. Signed-off-by: Eliezer Tamir --- fs/select.c | 31 ++-- include/net/ll_poll.h | 55 +++-- 2 files changed, 37 insertions(+), 49 dele

Re: [GIT] Networking

2013-07-08 Thread Eliezer Tamir
On 09/07/2013 05:48, Andrew Morton wrote: > The feature should also be documented in the Linux manpages, please. A > way to do that is to Cc linux-...@vger.kernel.org and Michael Kerrisk > , and to work with Michael on developing that > documentation. OK -- To unsubscribe from this list: send th

Re: [PATCH net-next] net: rename low latency sockets functions to busy poll

2013-07-08 Thread Eliezer Tamir
On 08/07/2013 22:37, Linus Torvalds wrote: > On Mon, Jul 8, 2013 at 10:14 AM, Eliezer Tamir > wrote: >> >> I think there is no way for the compiler to know the value of >> can_busy_loop at compile time. It depends on the replies we get >> from polling the sockets.

Re: [PATCH net-next] net: rename low latency sockets functions to busy poll

2013-07-08 Thread Eliezer Tamir
On 08/07/2013 19:37, Linus Torvalds wrote: > On Mon, Jul 8, 2013 at 6:20 AM, Eliezer Tamir > wrote: >> >> - /* only if on, have sockets with POLL_LL and not out of time >> */ >> - if (ll_flag && can_ll && can_poll_ll(ll_

[PATCH net-next] net: rename low latency sockets functions to busy poll

2013-07-08 Thread Eliezer Tamir
the existence of supported sockets with valid queue information. Signed-off-by: Eliezer Tamir --- Documentation/sysctl/net.txt| 12 +--- fs/select.c | 60 --- include/net/ll_poll.h | 46

Re: [GIT] Networking

2013-07-07 Thread Eliezer Tamir
On 08/07/2013 06:14, David Miller wrote: From: Linus Torvalds Date: Sun, 7 Jul 2013 15:33:31 -0700 End result: I think the code is salvageable and people who want this kind of busy-looping can have it. But I really don't want to merge it as-is. I think it was badly done, I think it was badly d

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 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

[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-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 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

[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 |

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

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: 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

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;

[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

[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 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

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

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 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

[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

[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

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 RFC] net: lls epoll support

2013-06-19 Thread Eliezer Tamir
micro-benchmark. [this patch needs the poll patch to be applied first] with sockperf doing epoll on 1000 sockets I see an avg latency of 6us Signed-off-by: Eliezer Tamir --- fs/eventpoll.c | 39 +-- 1 files changed, 33 insertions(+), 6 deletions(-) diff --

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

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

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

2013-06-19 Thread Eliezer Tamir
David, Here is a rework of the select/poll patch. 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.) 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 se

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

2013-06-18 Thread Eliezer Tamir
On 18/06/2013 17:45, Eliezer Tamir wrote: On 18/06/2013 17:35, Eric Dumazet wrote: On Tue, 2013-06-18 at 16:25 +0300, Eliezer Tamir wrote: One other thing, sock_poll() will only ll_poll if the flag was set _and_ the socket has a none-zero value in sk->sk_ll_usec so you still only poll

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

2013-06-18 Thread Eliezer Tamir
On 18/06/2013 17:35, Eric Dumazet wrote: On Tue, 2013-06-18 at 16:25 +0300, Eliezer Tamir wrote: One other thing, sock_poll() will only ll_poll if the flag was set _and_ the socket has a none-zero value in sk->sk_ll_usec so you still only poll on sockets that were enabled for LLS, not on ev

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

2013-06-18 Thread Eliezer Tamir
On 18/06/2013 13:25, Eric Dumazet wrote: On Tue, 2013-06-18 at 11:58 +0300, Eliezer Tamir wrote: @@ -731,7 +755,11 @@ static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait) mask = DEFAULT_POLLMASK; if (f.file->f

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

2013-06-18 Thread Eliezer Tamir
On 18/06/2013 13:25, Eric Dumazet wrote: On Tue, 2013-06-18 at 11:58 +0300, Eliezer Tamir wrote: @@ -393,6 +394,15 @@ static inline void wait_key_set(poll_table *wait, unsigned long in, wait->_key |= POLLOUT_SET; } +static inline void wait_key_set_lls(poll_table *w

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

2013-06-18 Thread Eliezer Tamir
On 18/06/2013 12:08, Eric Dumazet wrote: On Tue, 2013-06-18 at 11:58 +0300, Eliezer Tamir wrote: select/poll busy-poll support. */ -static inline u64 ll_end_time(struct sock *sk) +static inline u64 ll_sk_end_time(struct sock *sk) { - u64 end_time = ACCESS_ONCE(sk->sk_ll_u

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

2013-06-18 Thread Eliezer Tamir
low-level sock_poll() again until we are out of time or we find something. Once the system call finds something, it stops setting POLL_LL, so it can return the result to the user ASAP. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Signed-off-by: Eliezer Tamir --- fs/select.c

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

2013-06-18 Thread Eliezer Tamir
David, Here is a rework of the select/poll patch. (I called this a v2 but we are continuing where we left off in v9 of the original series.) 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.) When select or poll are use

[PATCH v2 sockperf] sockperf: add SO_LL socketop support

2013-06-14 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

[PATCH v5 net-next 3/4] net: remove NET_LL_RX_POLL config menue

2013-06-14 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 e591668..51da839

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

2013-06-14 Thread Eliezer Tamir
adds a socket option for low latency polling. This allows overriding the global sysctl value with a per-socket one. Unexport sysctl_net_ll_poll since for now it's not needed in modules. Signed-off-by: Eliezer Tamir --- arch/alpha/include/uapi/asm/socket.h |2 ++ arch/avr32/include

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

2013-06-14 Thread Eliezer Tamir
David, Here are three clean up patches, plus one that adds a socket option for LLS. Patch 1 converts sysctl_net_ll_poll into an unsigned int Patch 2 converts low latency sockets to sched_clock. Patch 3 removes the config menu for NET_LL_RX_POLL and defaults to y. Patch 4 adds an SO_LL socket opti

[PATCH v5 net-next 2/4] net: convert low latency sockets to sched_clock()

2013-06-14 Thread Eliezer Tamir
Use sched_clock() instead of get_cycles(). We can use sched_clock() because we don't care much about accuracy. Remove the dependency on X86_TSC Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h | 33 + net/Kconfig |1 - 2 files change

[PATCH v5 net-next 1/4] net: change sysctl_net_ll_poll into an unsigned int

2013-06-14 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. Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h |5 +++-- net/core/sysctl_net_core.c |4 ++-- net/socket.c |2 +- 3 files changed, 6

Re: [PATCH v4 net-next 2/4] net: convert low latency sockets to sched_clock()

2013-06-13 Thread Eliezer Tamir
On 14/06/2013 06:12, Eric Dumazet wrote: On Fri, 2013-06-14 at 04:57 +0300, Eliezer Tamir wrote: Use sched_clock() instead of get_cycles(). We can use sched_clock() because we don't care much about accuracy. Remove the dependency on X86_TSC Signed-off-by: Eliezer Tamir --- -static i

[PATCH v2 sockperf] sockperf: add SO_LL socketop support

2013-06-13 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

[PATCH v4 net-next 2/4] net: convert low latency sockets to sched_clock()

2013-06-13 Thread Eliezer Tamir
Use sched_clock() instead of get_cycles(). We can use sched_clock() because we don't care much about accuracy. Remove the dependency on X86_TSC Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h | 32 +--- net/Kconfig |1 - 2 files change

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

2013-06-13 Thread Eliezer Tamir
adds a socket option for low latency polling. This allows overriding the global sysctl value with a per-socket one. Unexport sysctl_net_ll_poll since for now it's not needed in modules. Signed-off-by: Eliezer Tamir --- arch/alpha/include/uapi/asm/socket.h |2 ++ arch/avr32/include

[PATCH v4 net-next 3/4] net: remove NET_LL_RX_POLL config menue

2013-06-13 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 e591668..51da839

[PATCH v4 net-next 1/4] net: change sysctl_net_ll_poll into an unsigned int

2013-06-13 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. Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h |5 +++-- net/core/sysctl_net_core.c |4 ++-- net/socket.c |2 +- 3 files changed, 6

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

2013-06-13 Thread Eliezer Tamir
David, Here are three clean up patches, plus one that adds a socket option for LLS. Patch 1 converts sysctl_net_ll_poll into an unsigned int Patch 2 converts low latency sockets to sched_clock. Patch 3 removes the config menu for NET_LL_RX_POLL and defaults to y. Patch 4 adds an SO_LL socket opti

Re: [PATCH v3 net-next 3/4] net: change sysctl_net_ll_poll into an unsigned int

2013-06-13 Thread Eliezer Tamir
On 13/06/2013 18:31, Eric Dumazet wrote: On Thu, 2013-06-13 at 17:46 +0300, Eliezer Tamir wrote: +extern unsigned int sysctl_net_ll_poll __read_mostly; Oh well, you re-introduce the overflow hint : you defined #define USECS_TO_NS(us) (us << 10) ouch! (thanks) -- To unsubscribe fro

[PATCH corrected v2 sockperf] sockperf: add SO_LL socketop support

2013-06-13 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] sockperf: add SO_LL socketop support

2013-06-13 Thread Eliezer Tamir
On 13/06/2013 17:49, 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 override global setting. Sorry, this

[PATCH] sockperf: add SO_LL socketop support

2013-06-13 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

[PATCH v3 net-next 3/4] net: change sysctl_net_ll_poll into an unsigned int

2013-06-13 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. Signed-off-by: Eliezer Tamir --- include/net/ll_poll.h |2 +- net/core/sysctl_net_core.c |4 ++-- net/socket.c |2 +- 3 files changed, 4

  1   2   3   >