Received: with ECARTIS (v1.0.0; list netdev); Wed, 16 Mar 2005 15:39:00 -0800 (PST) Received: from gw1.cosmosbay.com (gw1.cosmosbay.com [62.23.185.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j2GNcrj9000730 for ; Wed, 16 Mar 2005 15:38:54 -0800 Received: from [192.168.0.3] ([84.5.80.184]) by gw1.cosmosbay.com (8.13.3/8.13.3) with ESMTP id j2GNcgjD023406; Thu, 17 Mar 2005 00:38:48 +0100 Message-ID: <4238C388.5040303@cosmosbay.com> Date: Thu, 17 Mar 2005 00:38:48 +0100 From: Eric Dumazet User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: fr, en MIME-Version: 1.0 To: "David S. Miller" , netdev@oss.sgi.com Subject: [PATCH,resent] reduce sizeof(struct inet_peer) from 128 to 64 bytes on 64bits architectures Content-Type: multipart/mixed; boundary="------------060101080702030703080106" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [62.23.185.226]); Thu, 17 Mar 2005 00:38:48 +0100 (CET) X-Virus-Scanned: ClamAV 0.83/762/Sun Mar 13 15:35:33 2005 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 274 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dada1@cosmosbay.com Precedence: bulk X-list: netdev Content-Length: 1277 Lines: 41 This is a multi-part message in MIME format. --------------060101080702030703080106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Resent with diff file not tab/space mangled :( As peer_cachep uses kmem_cache_create("inet_peer_cache", ... SLAB_HWCACHE_ALIGN ...), better try to use exactly 64 bytes instead of 72 for struct inet_peer. This also means that this structure fits in one cache line on x86_64. Thank you Eric Dumazet --------------060101080702030703080106 Content-Type: text/plain; name="diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff" diff -Nru linux-2.6.11/include/net/inetpeer.h linux-2.6.11-ed/include/net/inetpeer.h --- linux-2.6.11/include/net/inetpeer.h 2005-03-02 08:37:48.000000000 +0100 +++ linux-2.6.11-ed/include/net/inetpeer.h 2005-03-16 18:52:49.000000000 +0100 @@ -19,9 +19,9 @@ { struct inet_peer *avl_left, *avl_right; struct inet_peer *unused_next, **unused_prevp; - atomic_t refcnt; unsigned long dtime; /* the time of last use of not * referenced entries */ + atomic_t refcnt; __u32 v4daddr; /* peer's address */ __u16 avl_height; __u16 ip_id_count; /* IP ID for the next packet */ --------------060101080702030703080106--