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: <1291225358.2856.1035.camel@edumazet-laptop>
Date:	Wed, 01 Dec 2010 18:42:38 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Brian Haley <brian.haley@...com>
Cc:	David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next-2.6] net: optimize INET input path further

Le mercredi 01 décembre 2010 à 12:37 -0500, Brian Haley a écrit :
> On 12/01/2010 12:04 AM, Eric Dumazet wrote:
> >  struct sock_common {
> > -	/*
> > -	 * first fields are not copied in sock_copy()
> > +	/* skc_daddr and skc_rcv_saddr must be grouped :
> > +	 * cf INET_MATCH() and INET_TW_MATCH()
> >  	 */
> > -	union {
> > -		struct hlist_node	skc_node;
> > -		struct hlist_nulls_node skc_nulls_node;
> > -	};
> > -	atomic_t		skc_refcnt;
> > -	int			skc_tx_queue_mapping;
> > +	__be32			skc_daddr;
> > +	__be32			skc_rcv_saddr;
> >  
> >  	union  {
> >  		unsigned int	skc_hash;
> 
> Putting IPv4 addresses in sock_common doesn't make it so common anymore :)
> 
> Is it possible to make this a union so other address families like IPv6
> can benefit from this as well, or will that blow the whole cache line
> effect you were trying to achieve?

This might be OK, depending on cache line size and/or arch.

On x86_32 for example, that might even be a good thing, because refcnt
might still be in the first 64bytes of socket.

By the way, ipv6 sock includes inet, so includes ipv4 addresses too, I
only moved them in the 'whole structure'



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