diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-08-26 10:34:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-29 14:55:54 -0400 |
commit | 76bfd8984430be5b19727d09f6ab5e1d7a247f8c (patch) | |
tree | a41d90d3aa24724ada4945fca3085dfeab9bef4b /include | |
parent | 03536cc3ad611f29a35803d37a44414b823135c3 (diff) |
net: sctp: reorder sctp_globals to reduce cacheline usage
Reduce cacheline usage from 2 to 1 cacheline for sctp_globals structure. By
reordering elements, we can close gaps and simply achieve the following:
Current situation:
/* size: 80, cachelines: 2, members: 10 */
/* sum members: 57, holes: 4, sum holes: 16 */
/* padding: 7 */
/* last cacheline: 16 bytes */
Afterwards:
/* size: 64, cachelines: 1, members: 10 */
/* padding: 7 */
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sctp/structs.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 422db6cc3214..2174d8da0770 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -113,29 +113,27 @@ struct sctp_hashbucket { | |||
113 | 113 | ||
114 | /* The SCTP globals structure. */ | 114 | /* The SCTP globals structure. */ |
115 | extern struct sctp_globals { | 115 | extern struct sctp_globals { |
116 | /* The following variables are implementation specific. */ | ||
117 | |||
118 | /* Default initialization values to be applied to new associations. */ | ||
119 | __u16 max_instreams; | ||
120 | __u16 max_outstreams; | ||
121 | |||
122 | /* This is a list of groups of functions for each address | 116 | /* This is a list of groups of functions for each address |
123 | * family that we support. | 117 | * family that we support. |
124 | */ | 118 | */ |
125 | struct list_head address_families; | 119 | struct list_head address_families; |
126 | 120 | ||
127 | /* This is the hash of all endpoints. */ | 121 | /* This is the hash of all endpoints. */ |
128 | int ep_hashsize; | ||
129 | struct sctp_hashbucket *ep_hashtable; | 122 | struct sctp_hashbucket *ep_hashtable; |
130 | |||
131 | /* This is the hash of all associations. */ | 123 | /* This is the hash of all associations. */ |
132 | int assoc_hashsize; | ||
133 | struct sctp_hashbucket *assoc_hashtable; | 124 | struct sctp_hashbucket *assoc_hashtable; |
134 | |||
135 | /* This is the sctp port control hash. */ | 125 | /* This is the sctp port control hash. */ |
136 | int port_hashsize; | ||
137 | struct sctp_bind_hashbucket *port_hashtable; | 126 | struct sctp_bind_hashbucket *port_hashtable; |
138 | 127 | ||
128 | /* Sizes of above hashtables. */ | ||
129 | int ep_hashsize; | ||
130 | int assoc_hashsize; | ||
131 | int port_hashsize; | ||
132 | |||
133 | /* Default initialization values to be applied to new associations. */ | ||
134 | __u16 max_instreams; | ||
135 | __u16 max_outstreams; | ||
136 | |||
139 | /* Flag to indicate whether computing and verifying checksum | 137 | /* Flag to indicate whether computing and verifying checksum |
140 | * is disabled. */ | 138 | * is disabled. */ |
141 | bool checksum_disable; | 139 | bool checksum_disable; |