tcp/dccp: cache line align inet_hashinfo
Subsystems (2)
PATCH 1/1 tcp/dccp: cache line align inet_hashinfo
I have seen tcp_hashinfo starting at a non optimal location, forcing input handlers to pull two cache lines instead of one, and sharing a cache line that was dirtied more than necessary:
ffffffff83680600 b tcp_orphan_timer ffffffff83680628 b tcp_orphan_cache ffffffff8368062c b tcp_enable_tx_delay.__tcp_tx_delay_enabled ffffffff83680630 B tcp_hashinfoffffffff83680680 b tcp_cong_list_lock
After this patch, ehash, ehash_locks, ehash_mask and ehash_locks_mask are located in a read-only cache line.
--- include/net/inet_hashtables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/inet_hashtables.h +1 -1
@@ -177,7 +177,7 @@ struct inet_hashinfo {struct inet_listen_hashbucket *lhash2;bool pernet; -}; +}____cacheline_aligned_in_smp ;static inline struct inet_hashinfo *tcp_or_dccp_get_hashinfo (const struct sock *sk) {
Signature · 1 line
2.41.0.640.ga95def55d0-goog
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 11 lines · On Thu, 3 Aug 2023 07:53:34 +0000 you wrote:
I have seen
tcp_hashinfostarting at a non optimal location, forcing input handlers to pull two cache lines instead of one, and sharing a cache line that was dirtied more than necessary:
ffffffff83680600btcp_orphan_timerffffffff83680628btcp_orphan_cacheffffffff8368062cb tcp_enable_tx_delay.__tcp_tx_delay_enabledffffffff83680630Btcp_hashinfoffffffff83680680btcp_cong_list_lock[...]
Here is the summary with links:
- [net-next] tcp/dccp: cache line align inet_hashinfo
https://git.kernel.org/netdev/net-next/c/6f5ca184cbef
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 19 lines · On Fri, Aug 4, 2023 at 10:30 AM <[email protected]> wrote:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 11 lines · On Thu, 3 Aug 2023 07:53:34 +0000 you wrote:
I have seen
tcp_hashinfostarting at a non optimal location, forcing input handlers to pull two cache lines instead of one, and sharing a cache line that was dirtied more than necessary:
ffffffff83680600btcp_orphan_timerffffffff83680628btcp_orphan_cacheffffffff8368062cb tcp_enable_tx_delay.__tcp_tx_delay_enabledffffffff83680630Btcp_hashinfoffffffff83680680btcp_cong_list_lock[...]
Quoted 10 lines
Here is the summary with links:
- [net-next] tcp/dccp: cache line aligninet_hashinfohttps://git.kernel.org/netdev/net-next/c/6f5ca184cbefYou are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thanks !
Apparently this misalignment came with
commit cae3873c5b3a4fcd9706fb461ff4e91bdf1f0120
Author: Martin KaFai Lau <[email protected]> Date: Wed May 11 17:06:05 2022 -0700
net: inet: Retire port only listening_hash
Quoted 33 lines · Eric Dumazet
Quoted 19 lines · On Fri, Aug 4, 2023 at 10:30 AM <[email protected]> wrote:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 11 lines · On Thu, 3 Aug 2023 07:53:34 +0000 you wrote:
I have seen
tcp_hashinfostarting at a non optimal location, forcing input handlers to pull two cache lines instead of one, and sharing a cache line that was dirtied more than necessary:
ffffffff83680600btcp_orphan_timerffffffff83680628btcp_orphan_cacheffffffff8368062cb tcp_enable_tx_delay.__tcp_tx_delay_enabledffffffff83680630Btcp_hashinfoffffffff83680680btcp_cong_list_lock[...]
Quoted 10 lines
Here is the summary with links:
- [net-next] tcp/dccp: cache line aligninet_hashinfohttps://git.kernel.org/netdev/net-next/c/6f5ca184cbefYou are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.htmlThanks !
Quoted 7 lines
Apparently this misalignment came with
commit
cae3873c5b3a4fcd9706fb461ff4e91bdf1f0120Author: Martin KaFai Lau <[email protected]> Date: Wed May 11 17:06:05 2022 -0700net: inet: Retire port only
listening_hash
Ah. Thanks for the fix. TIL.