diff options
author | 2021-03-31 10:52:05 -0700 | |
---|---|---|
committer | 2021-03-31 14:48:19 -0700 | |
commit | 1caf8d39c58f3f63193d02928c8dce3fa07cee52 (patch) | |
tree | 831b04bb25e9cedc00c8d16355cde2c673da23e5 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge branch 'net-coding-style' (diff) | |
download | wireguard-linux-1caf8d39c58f3f63193d02928c8dce3fa07cee52.tar.xz wireguard-linux-1caf8d39c58f3f63193d02928c8dce3fa07cee52.zip |
inet: shrink inet_timewait_death_row by 48 bytes
struct inet_timewait_death_row uses two cache lines, because we want
tw_count to use a full cache line to avoid false sharing.
Rework its definition and placement in netns_ipv4 so that:
1) We add 60 bytes of padding after tw_count to avoid
false sharing, knowing that tcp_death_row will
have ____cacheline_aligned_in_smp attribute.
2) We do not risk padding before tcp_death_row, because
we move it at the beginning of netns_ipv4, even if new
fields are added later.
3) We do not waste 48 bytes of padding after it.
Note that I have not changed dccp.
pahole result for struct netns_ipv4 before/after the patch :
/* size: 832, cachelines: 13, members: 139 */
/* sum members: 721, holes: 12, sum holes: 95 */
/* padding: 16 */
/* paddings: 2, sum paddings: 55 */
->
/* size: 768, cachelines: 12, members: 139 */
/* sum members: 673, holes: 11, sum holes: 39 */
/* padding: 56 */
/* paddings: 2, sum paddings: 7 */
/* forced alignments: 1 */
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions