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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1369250772.3301.349.camel@edumazet-glaptop>
Date:	Wed, 22 May 2013 12:26:12 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Pablo Neira Ayuso <pablo@...filter.org>,
	netfilter-devel@...r.kernel.org, netdev <netdev@...r.kernel.org>,
	Tom Herbert <therbert@...gle.com>,
	Patrick McHardy <kaber@...sh.net>
Subject: Re: [PATCH v2 nf-next] netfilter: conntrack: remove the central
 spinlock

On Wed, 2013-05-22 at 11:20 -0700, Joe Perches wrote:
> On Wed, 2013-05-22 at 10:47 -0700, Eric Dumazet wrote:
> > From: Eric Dumazet <edumazet@...gle.com>
> > 
> > nf_conntrack_lock is a monolithic lock and suffers from huge contention
> > on current generation servers (8 or more core/threads).
> []
> > diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
> []
> > @@ -76,7 +76,8 @@ struct nf_conn {
> >             plus 1 for any connection(s) we are `master' for */
> >  	struct nf_conntrack ct_general;
> >  
> > -	spinlock_t lock;
> > +	spinlock_t	lock;
> > +	u16		cpu;
> 
> trivia:
> 
> What's the real value in not using int here?
> 

On some machines, sizeof(spinlock_t) is 2

So this addition doesn't increase size of the structure, as I fill a
hole.

Thats the case on x86 when NR_CPUS < 256


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ