Re: [PATCH v8 net-next 5/5] tcp: reorganize tcp_sock fast path variables
From: Eric Dumazet <edumazet@google.com>
Date: 2023-11-30 10:52:50
From: Eric Dumazet <edumazet@google.com>
Date: 2023-11-30 10:52:50
On Wed, Nov 29, 2023 at 8:28 AM Coco Li [off-list ref] wrote:
The variables are organized according in the following way: - TX read-mostly hotpath cache lines - TXRX read-mostly hotpath cache lines - RX read-mostly hotpath cache lines - TX read-write hotpath cache line - TXRX read-write hotpath cache line - RX read-write hotpath cache line Fastpath cachelines end after rcvq_space. Cache line boundaries are enforced only between read-mostly and read-write. That is, if read-mostly tx cachelines bleed into read-mostly txrx cachelines, we do not care. We care about the boundaries between read and write cachelines because we want to prevent false sharing. Fast path variables span cache lines before change: 12 Fast path variables span cache lines after change: 8 Suggested-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Wei Wang <redacted> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: Coco Li <redacted>
Reviewed-by: Eric Dumazet <edumazet@google.com> Thanks !