Commit 6d2553612fa329979e6423a5f2410fd7be5aa902

Authored by Eric Dumazet
Committed by David S. Miller
1 parent f6e63cfb5c

[INET]: Shrink struct inet_ehash_bucket on 32 bits UP

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

include/net/inet_hashtables.h
... ... @@ -40,7 +40,7 @@
40 40 struct inet_ehash_bucket {
41 41 rwlock_t lock;
42 42 struct hlist_head chain;
43   -} __attribute__((__aligned__(8)));
  43 +};
44 44  
45 45 /* There are a few simple rules, which allow for local port reuse by
46 46 * an application. In essence: