Re: [PATCH nf-next 2/6] netfilter: conntrack: get rid of conntrack timer

2016-08-22 Thread Florian Westphal
Eric Dumazet wrote: > On Fri, 2016-08-19 at 18:04 +0200, Florian Westphal wrote: > > Eric Dumazet wrote: > > > On Fri, 2016-08-19 at 17:16 +0200, Florian Westphal wrote: > > > > > > > Hmm, nf_conntrack_find caller needs to hold rcu_read_lock, > > > > in case object is free'd SLAB_DESTROY_BY_

Re: [PATCH nf-next 2/6] netfilter: conntrack: get rid of conntrack timer

2016-08-21 Thread Eric Dumazet
On Fri, 2016-08-19 at 18:04 +0200, Florian Westphal wrote: > Eric Dumazet wrote: > > On Fri, 2016-08-19 at 17:16 +0200, Florian Westphal wrote: > > > > > Hmm, nf_conntrack_find caller needs to hold rcu_read_lock, > > > in case object is free'd SLAB_DESTROY_BY_RCU should delay actual release >

Re: [PATCH nf-next 2/6] netfilter: conntrack: get rid of conntrack timer

2016-08-19 Thread Florian Westphal
Eric Dumazet wrote: > On Fri, 2016-08-19 at 17:16 +0200, Florian Westphal wrote: > > > Hmm, nf_conntrack_find caller needs to hold rcu_read_lock, > > in case object is free'd SLAB_DESTROY_BY_RCU should delay actual release > > of the page. > > Well, point is that SLAB_DESTROY_BY_RCU means th

Re: [PATCH nf-next 2/6] netfilter: conntrack: get rid of conntrack timer

2016-08-19 Thread Eric Dumazet
On Fri, 2016-08-19 at 17:16 +0200, Florian Westphal wrote: > Hmm, nf_conntrack_find caller needs to hold rcu_read_lock, > in case object is free'd SLAB_DESTROY_BY_RCU should delay actual release > of the page. Well, point is that SLAB_DESTROY_BY_RCU means that we have no grace period, and obj

Re: [PATCH nf-next 2/6] netfilter: conntrack: get rid of conntrack timer

2016-08-19 Thread Florian Westphal
Eric Dumazet wrote: > > +/* caller must hold rcu readlock and none of the nf_conntrack_locks */ > > +static void nf_ct_gc_expired(struct nf_conn *ct) > > +{ > > + if (!atomic_inc_not_zero(&ct->ct_general.use)) > > + return; > > + > > + if (nf_ct_should_gc(ct)) > > + nf_ct_k

Re: [PATCH nf-next 2/6] netfilter: conntrack: get rid of conntrack timer

2016-08-19 Thread Eric Dumazet
On Fri, 2016-08-19 at 13:36 +0200, Florian Westphal wrote: > With stats enabled this eats 80 bytes on x86_64 per nf_conn entry. > > Remove it and use a 32bit jiffies value containing timestamp until > entry is valid. Great work ! ... > +/* caller must hold rcu readlock and none of the nf_conntr