]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
[INET]: Shrink struct inet_ehash_bucket on 32 bits UP
authorEric Dumazet <dada1@cosmosbay.com>
Tue, 4 Oct 2005 22:55:51 +0000 (15:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Oct 2005 22:55:51 +0000 (15:55 -0700)
No need to align struct inet_ehash_bucket on a 8 bytes boundary.

On 32 bits Uniprocessor, that's a waste of 4 bytes per struct (50 %)

On other platforms, the attribute is useless, natual alignement is already 8.

platform     | Size before | Size after patch
-------------+-------------+------------------
32 bits, UP  |         8   |     4
32 bits, SMP |         8   |     8
64 bits, UP  |         8   |     8
64 bits, SMP |        16   |    16

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h

index 35f49e65e295c9cd89a04d010dbad7700f4a319d..f50f959683400b78df241e061f64138c0f7a9ff9 100644 (file)
@@ -40,7 +40,7 @@
 struct inet_ehash_bucket {
        rwlock_t          lock;
        struct hlist_head chain;
-} __attribute__((__aligned__(8)));
+};
 
 /* There are a few simple rules, which allow for local port reuse by
  * an application.  In essence: