lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 06 Feb 2014 15:08:58 -0800 From: Eric Dumazet <eric.dumazet@...il.com> To: Tom Herbert <therbert@...gle.com> Cc: David Miller <davem@...emloft.net>, Linux Netdev List <netdev@...r.kernel.org>, Eric Dumazet <edumazet@...gle.com> Subject: Re: [RFC PATCH] udp4: Don't take socket reference in receive path On Thu, 2014-02-06 at 14:40 -0800, Tom Herbert wrote: > > > The rationale for SLAB_DESTROY_BY_RCU might be different for UDP than > TCP. For instance, in the DNS example small connected UDP flows are > more an issue on the client, the server (which is likely to have much > greater load) should be using unconnected sockets. > I know some servers have a non connected UDP socket acting as a 'listener' and instancing a new connected socket for ever incoming flow. You cannot really know what model is used. > In any case, I am still looking for a way to address this. Like I said > in the commit log, this per packet cost for UDP processing is far too > high at least in encapsulation path. I thought about extending > SO__REUSEPORT to provide CPU affinity but that seems like overkill > with its own performance implications. Alternatively, we could have > fast path for the encapsulation using UDP offload model which bypass > sockets completely which seems unpleasant. Note that you can solve this before UDP layer, in GRO for example. If layers before UDP already provide skb->sk (early demux), this could be a socket that is plainly using call_rcu() for its destruction, and you do not need to touch socket refcount. Alternative would be to use a percpu refcnt for these special 'sockets' that potentially are receiving XX millions frames per second using 48 cpus... Kent Overstreet designed Percpu refcounts, maybe you should take a look at this. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists