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: <47A22841.6090508@cosmosbay.com>
Date:	Thu, 31 Jan 2008 20:57:53 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
CC:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	dccp@...r.kernel.org
Subject: Re: [PATCH 6/6] [TCP]: Reorganize struct tcp_sock to save 16 bytes
 on 64-bit arch

Arnaldo Carvalho de Melo a écrit :
> /home/acme/git/net-2.6/net/ipv6/tcp_ipv6.c:
>   struct tcp_sock  |  -16
>   struct tcp6_sock |  -16
>  2 structs changed
> 
> Now it is at:
> 
> /* size: 1552, cachelines: 25 */
> /* paddings: 2, sum paddings: 8 */
> /* last cacheline: 16 bytes */
> 
> As soon as we stop using skb_queue_list we'll get it down to 24 cachelines.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
>  include/linux/tcp.h |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index 08027f1..f48644d 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -304,7 +304,6 @@ struct tcp_sock {
>  	u32	rtt_seq;	/* sequence number to update rttvar	*/
>  
>  	u32	packets_out;	/* Packets which are "in flight"	*/
> -	u32	retrans_out;	/* Retransmitted packets out		*/
>  /*
>   *      Options received (usually on last packet, some only on SYN packets).
>   */
> @@ -332,6 +331,8 @@ struct tcp_sock {
>  
>  	struct tcp_sack_block recv_sack_cache[4];
>  
> +	u32	retrans_out;	/* Retransmitted packets out		*/
> +

Hum... retrans_out should sit close to packets_out (or lost_out/sacked_out 
???), please.

'struct tcp_sock' is very large on 64 bits, so I would prefer to make sure 
most paths dont need to touch all 24 cache lines (or 25 cache lines).

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