Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Tom Herbert
On Thu, Dec 8, 2016 at 12:05 PM, Hannes Frederic Sowa wrote: > Hello, > > On Thu, Dec 8, 2016, at 20:15, Tom Herbert wrote: >> On Thu, Dec 8, 2016 at 10:02 AM, Eric Dumazet >> wrote: >> > On Thu, 2016-12-08 at 09:49 -0800, Tom Herbert wrote: >> > >> >> Of course that would only help on systems wh

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Tom Herbert
On Thu, Dec 8, 2016 at 12:05 PM, Hannes Frederic Sowa wrote: > Hello, > > On Thu, Dec 8, 2016, at 20:15, Tom Herbert wrote: >> On Thu, Dec 8, 2016 at 10:02 AM, Eric Dumazet >> wrote: >> > On Thu, 2016-12-08 at 09:49 -0800, Tom Herbert wrote: >> > >> >> Of course that would only help on systems wh

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Hannes Frederic Sowa
Hello, On Thu, Dec 8, 2016, at 20:15, Tom Herbert wrote: > On Thu, Dec 8, 2016 at 10:02 AM, Eric Dumazet > wrote: > > On Thu, 2016-12-08 at 09:49 -0800, Tom Herbert wrote: > > > >> Of course that would only help on systems where no one enable encaps, > >> ie. looks good in the the simple benchmar

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Eric Dumazet
On Thu, 2016-12-08 at 19:50 +0100, Paolo Abeni wrote: > UDP GRO will require connected socket - very likely no DNS server. The > use-case is an application using long lived UDP sockets doing a lot of > traffic, like fix protocol feeds over UDP. You mean, the kind of traffic that should use TCP i

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Edward Cree
On 07/12/16 07:57, Paolo Abeni wrote: > We have some experimental patches to implement GRO for plain UDP > connected sockets, using frag_list to preserve the individual skb len, > and deliver the packet to user space individually. With that I got > ~3mpps with a single queue/user space sink - befor

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Tom Herbert
On Thu, Dec 8, 2016 at 10:02 AM, Eric Dumazet wrote: > On Thu, 2016-12-08 at 09:49 -0800, Tom Herbert wrote: > >> Of course that would only help on systems where no one enable encaps, >> ie. looks good in the the simple benchmarks but in real life if just >> one socket enables encap everyone else

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Paolo Abeni
On Wed, 2016-12-07 at 06:29 -0800, Eric Dumazet wrote: > On Wed, 2016-12-07 at 08:57 +0100, Paolo Abeni wrote: > > > We have some experimental patches to implement GRO for plain UDP > > connected sockets, using frag_list to preserve the individual skb len, > > and deliver the packet to user space

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Eric Dumazet
On Thu, 2016-12-08 at 09:49 -0800, Tom Herbert wrote: > Of course that would only help on systems where no one enable encaps, > ie. looks good in the the simple benchmarks but in real life if just > one socket enables encap everyone else takes the hit. Well, in real life most linux hosts do not u

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Eric Dumazet
On Thu, 2016-12-08 at 09:49 -0800, Tom Herbert wrote: > Of course that would only help on systems where no one enable encaps, > ie. looks good in the the simple benchmarks but in real life if just > one socket enables encap everyone else takes the hit. Alternatively, > maybe we could do early demu

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Paolo Abeni
On Wed, 2016-12-07 at 06:26 -0800, Eric Dumazet wrote: > On Wed, 2016-12-07 at 08:57 +0100, Paolo Abeni wrote: > > On Tue, 2016-12-06 at 22:47 -0800, Eric Dumazet wrote: > > > On Tue, 2016-12-06 at 19:32 -0800, Eric Dumazet wrote: > > > > A follow up patch will provide a static_key (Jump Label) sin

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-08 Thread Tom Herbert
On Tue, Dec 6, 2016 at 10:47 PM, Eric Dumazet wrote: > On Tue, 2016-12-06 at 19:32 -0800, Eric Dumazet wrote: >> A follow up patch will provide a static_key (Jump Label) since most >> hosts do not even use RFS. > > Speaking of static_key, it appears we now have GRO on UDP, and this > consumes a co

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-07 Thread Eric Dumazet
On Wed, 2016-12-07 at 06:29 -0800, Eric Dumazet wrote: > Keeping frag_list means you keep one sk_buff per segment, so this really > looks like a legacy UDP server (like a DNS server) wont benefit from > this anyway. I played with the idea of preparing the skb for minimal overhead for the process

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-07 Thread David Miller
From: Eric Dumazet Date: Tue, 06 Dec 2016 19:32:50 -0800 > From: Eric Dumazet > > Paolo noticed a cache line miss in UDP recvmsg() to access > sk_rxhash, sharing a cache line with sk_drops. > > sk_drops might be heavily incremented by cpus handling a flood targeting > this socket. > > We migh

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-07 Thread Eric Dumazet
On Wed, 2016-12-07 at 08:57 +0100, Paolo Abeni wrote: > We have some experimental patches to implement GRO for plain UDP > connected sockets, using frag_list to preserve the individual skb len, > and deliver the packet to user space individually. With that I got > ~3mpps with a single queue/user s

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-07 Thread Eric Dumazet
On Wed, 2016-12-07 at 08:57 +0100, Paolo Abeni wrote: > On Tue, 2016-12-06 at 22:47 -0800, Eric Dumazet wrote: > > On Tue, 2016-12-06 at 19:32 -0800, Eric Dumazet wrote: > > > A follow up patch will provide a static_key (Jump Label) since most > > > hosts do not even use RFS. > > > > Speaking of s

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-07 Thread Eric Dumazet
On Wed, 2016-12-07 at 08:59 +0100, Paolo Abeni wrote: > On Tue, 2016-12-06 at 19:32 -0800, Eric Dumazet wrote: > > From: Eric Dumazet > > > > Paolo noticed a cache line miss in UDP recvmsg() to access > > sk_rxhash, sharing a cache line with sk_drops. > > > > sk_drops might be heavily incremente

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-06 Thread Paolo Abeni
On Tue, 2016-12-06 at 19:32 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > Paolo noticed a cache line miss in UDP recvmsg() to access > sk_rxhash, sharing a cache line with sk_drops. > > sk_drops might be heavily incremented by cpus handling a flood targeting > this socket. > > We might pl

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-06 Thread Paolo Abeni
On Tue, 2016-12-06 at 22:47 -0800, Eric Dumazet wrote: > On Tue, 2016-12-06 at 19:32 -0800, Eric Dumazet wrote: > > A follow up patch will provide a static_key (Jump Label) since most > > hosts do not even use RFS. > > Speaking of static_key, it appears we now have GRO on UDP, and this > consumes

Re: [PATCH net-next] net: sock_rps_record_flow() is for connected sockets

2016-12-06 Thread Eric Dumazet
On Tue, 2016-12-06 at 19:32 -0800, Eric Dumazet wrote: > A follow up patch will provide a static_key (Jump Label) since most > hosts do not even use RFS. Speaking of static_key, it appears we now have GRO on UDP, and this consumes a considerable amount of cpu cycles. Turning off GRO allows me to