From: Eric Dumazet <dada1@cosmosbay.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, dccp@vger.kernel.org
Subject: Re: [PATCH 6/6] [TCP]: Reorganize struct tcp_sock to save 16 bytes on 64-bit arch
Date: Thu, 31 Jan 2008 20:57:53 +0100 [thread overview]
Message-ID: <47A22841.6090508@cosmosbay.com> (raw)
In-Reply-To: <1201804304-28777-7-git-send-email-acme@redhat.com>
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@redhat.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).
next prev parent reply other threads:[~2008-01-31 19:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 18:31 [PATCHES 0/6]: Move hashinfo to sk_prot and struct reorgs Arnaldo Carvalho de Melo
2008-01-31 18:31 ` [PATCH 1/6] [SOCK] proto: Add hashinfo member to struct proto Arnaldo Carvalho de Melo
2008-01-31 18:31 ` [PATCH 2/6] [INET6]: Reorganize struct inet6_dev to save 8 bytes Arnaldo Carvalho de Melo
2008-01-31 18:31 ` [PATCH 3/6] [DCCP]: Reorganize struct dccp_sock " Arnaldo Carvalho de Melo
2008-01-31 18:31 ` [PATCH 4/6] [IPV6]: Reorganize strut ipv6_mc_socklist " Arnaldo Carvalho de Melo
2008-01-31 18:31 ` [PATCH 5/6] [INET_TIMEWAIT_SOCK]: Reorganize struct inet_timewait_sock to save some bytes Arnaldo Carvalho de Melo
2008-01-31 18:31 ` [PATCH 6/6] [TCP]: Reorganize struct tcp_sock to save 16 bytes on 64-bit arch Arnaldo Carvalho de Melo
2008-01-31 19:57 ` Eric Dumazet [this message]
2008-01-31 20:17 ` Arnaldo Carvalho de Melo
2008-01-31 20:33 ` Arnaldo Carvalho de Melo
2008-02-01 2:40 ` [PATCHES 0/6]: Move hashinfo to sk_prot and struct reorgs David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47A22841.6090508@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=dccp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).