Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Fri, 2016-03-25 at 17:08 -0700, Tom Herbert wrote: > On Fri, Mar 25, 2016 at 3:29 PM, Eric Dumazet wrote: > > +/* Must be called under rcu_read_lock(). > > > It might be just as easy to do the rcu_read_lock() within the > function. That way we don't need to require callers to do it now. > >

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/28/2016 01:01 PM, Eric Dumazet wrote: Note : file structures got RCU freeing back in 2.6.14, and I do not think named users ever complained about added cost ;) Couldn't see the tree for the forest I guess :) rick

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 12:11 -0700, Rick Jones wrote: > I was under the impression that individual DNS queries were supposed to > have not only random DNS query IDs but also originate from random UDP > source ports. https://tools.ietf.org/html/rfc5452 4.5 at least touches > on the topic but I d

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/28/2016 11:55 AM, Eric Dumazet wrote: On Mon, 2016-03-28 at 11:44 -0700, Rick Jones wrote: On 03/28/2016 10:00 AM, Eric Dumazet wrote: If you mean that a busy DNS resolver spends _most_ of its time doing : fd = socket() bind(fd port=0) < send and receive one frame > close(fd) Yes.

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 11:44 -0700, Rick Jones wrote: > On 03/28/2016 10:00 AM, Eric Dumazet wrote: > > On Mon, 2016-03-28 at 09:15 -0700, Rick Jones wrote: > >> On 03/25/2016 03:29 PM, Eric Dumazet wrote: > >>> UDP sockets are not short lived in the high usage case, so the added > >>> cost of call_

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/28/2016 10:00 AM, Eric Dumazet wrote: On Mon, 2016-03-28 at 09:15 -0700, Rick Jones wrote: On 03/25/2016 03:29 PM, Eric Dumazet wrote: UDP sockets are not short lived in the high usage case, so the added cost of call_rcu() should not be a concern. Even a busy DNS resolver? If you mean

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Eric Dumazet
On Mon, 2016-03-28 at 09:15 -0700, Rick Jones wrote: > On 03/25/2016 03:29 PM, Eric Dumazet wrote: > > UDP sockets are not short lived in the high usage case, so the added > > cost of call_rcu() should not be a concern. > > Even a busy DNS resolver? If you mean that a busy DNS resolver spends _mo

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Tom Herbert
On Mon, Mar 28, 2016 at 9:15 AM, Rick Jones wrote: > On 03/25/2016 03:29 PM, Eric Dumazet wrote: >> >> UDP sockets are not short lived in the high usage case, so the added >> cost of call_rcu() should not be a concern. > > > Even a busy DNS resolver? > Should use connectionless UDP sockets. > ric

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-28 Thread Rick Jones
On 03/25/2016 03:29 PM, Eric Dumazet wrote: UDP sockets are not short lived in the high usage case, so the added cost of call_rcu() should not be a concern. Even a busy DNS resolver? rick jones

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-25 Thread Alexei Starovoitov
On Fri, Mar 25, 2016 at 03:29:24PM -0700, Eric Dumazet wrote: > Tom Herbert would like to avoid touching UDP socket refcnt for encapsulated > traffic. For this to happen, we need to use normal RCU rules, with a grace > period before freeing a socket. UDP sockets are not short lived in the > high us

Re: [RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-25 Thread Tom Herbert
On Fri, Mar 25, 2016 at 3:29 PM, Eric Dumazet wrote: > Tom Herbert would like to avoid touching UDP socket refcnt for encapsulated > traffic. For this to happen, we need to use normal RCU rules, with a grace > period before freeing a socket. UDP sockets are not short lived in the > high usage case

[RFC net-next 2/2] udp: No longer use SLAB_DESTROY_BY_RCU

2016-03-25 Thread Eric Dumazet
Tom Herbert would like to avoid touching UDP socket refcnt for encapsulated traffic. For this to happen, we need to use normal RCU rules, with a grace period before freeing a socket. UDP sockets are not short lived in the high usage case, so the added cost of call_rcu() should not be a concern. Th