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 linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 29 Nov 2012 09:06:16 -0800 From: Eric Dumazet <eric.dumazet@...il.com> To: Jesper Dangaard Brouer <brouer@...hat.com> Cc: "David S. Miller" <davem@...emloft.net>, Florian Westphal <fw@...len.de>, netdev@...r.kernel.org, Pablo Neira Ayuso <pablo@...filter.org>, Thomas Graf <tgraf@...g.ch>, Cong Wang <amwang@...hat.com>, Patrick McHardy <kaber@...sh.net>, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, Herbert Xu <herbert@...dor.hengli.com.au> Subject: Re: [net-next PATCH V2 5/9] net: frag, per CPU resource, mem limit and LRU list accounting On Thu, 2012-11-29 at 17:13 +0100, Jesper Dangaard Brouer wrote: > The major performance bottleneck on NUMA systems, is the mem limit > counter which is based an atomic counter. This patch removes the > cache-bouncing of the atomic counter, by moving this accounting to be > bound to each CPU. The LRU list also need to be done per CPU, > in-order to keep the accounting straight. > > If fragments belonging together is "sprayed" across CPUs, performance > will still suffer, but due to NIC rxhashing this is not very common. > Correct accounting in this situation is maintained by recording and > "assigning" a CPU to a frag queue when its allocated (caused by the > first packet associated packet). > > Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com> > > --- > V2: > - Rename struct cpu_resource -> frag_cpu_limit > - Move init functions from inet_frag.h to inet_fragment.c > - Cleanup per CPU in inet_frags_exit_net() > > include/net/inet_frag.h | 64 +++++++++++++++++++------------ > net/ipv4/inet_fragment.c | 50 ++++++++++++++++++------ > net/ipv4/ip_fragment.c | 3 + > net/ipv6/netfilter/nf_conntrack_reasm.c | 2 - > net/ipv6/reassembly.c | 2 - > 5 files changed, 80 insertions(+), 41 deletions(-) > > diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h > index 9bbef17..8421904 100644 > --- a/include/net/inet_frag.h > +++ b/include/net/inet_frag.h > @@ -1,11 +1,22 @@ > #ifndef __NET_FRAG_H__ > #define __NET_FRAG_H__ > > +#include <linux/spinlock.h> > +#include <linux/atomic.h> > + > +/* Need to maintain these resource limits per CPU, else we will kill > + * performance due to cache-line bouncing > + */ > +struct frag_cpu_limit { > + atomic_t mem; > + struct list_head lru_list; > + spinlock_t lru_lock; > +} ____cacheline_aligned_in_smp; > + This looks like a big patch introducing a specific infrastructure, while we already have lib/percpu_counter.c Not counting the addition of a NR_CPUS array, which is really unfortunate these days. -- 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