]> git.ipfire.org Git - thirdparty/linux.git/commit
tcp: remove some holes in struct tcp_sock
authorEric Dumazet <edumazet@google.com>
Tue, 27 Feb 2024 19:27:21 +0000 (19:27 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Feb 2024 04:21:24 +0000 (20:21 -0800)
commit99123622050f10ca9148a0fffba2de0afd6cdfff
treeeeeb3af790af199b74887551e2063642f9b7cf63
parent82a48affb36f1fee36fe415051a8947d42861108
tcp: remove some holes in struct tcp_sock

By moving some fields around, this patch shrinks
holes size from 56 to 32, saving 24 bytes on 64bit arches.

After the patch pahole gives the following for 'struct tcp_sock':

/* size: 2304, cachelines: 36, members: 162 */
/* sum members: 2234, holes: 6, sum holes: 32 */
/* sum bitfield members: 34 bits, bit holes: 5, sum bit holes: 14 bits */
/* padding: 32 */
/* paddings: 3, sum paddings: 10 */
/* forced alignments: 1, forced holes: 1, sum forced holes: 12 */

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240227192721.3558982-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/tcp.h