netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Coco Li <lixiaoyan@google.com>, Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Neal Cardwell <ncardwell@google.com>,
	Mubashir Adnan Qureshi <mubashirq@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>,
	Jonathan Corbet <corbet@lwn.net>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: netdev@vger.kernel.org, Chao Wu <wwchao@google.com>,
	Wei Wang <weiwan@google.com>,
	Pradeep Nemavat <pnemavat@google.com>
Subject: Re: [PATCH v1 net-next 2/2] tcp: reorganize tcp_sock fast path variables
Date: Tue, 5 Dec 2023 09:08:05 -0700	[thread overview]
Message-ID: <73b28f6e-e6de-41a8-8622-3d58832e1582@kernel.org> (raw)
In-Reply-To: <20231204201232.520025-3-lixiaoyan@google.com>

On 12/4/23 1:12 PM, Coco Li 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 <weiwan@google.com>
> Signed-off-by: Coco Li <lixiaoyan@google.com>
> ---
>  include/linux/tcp.h | 248 ++++++++++++++++++++++++--------------------
>  net/ipv4/tcp.c      |  93 +++++++++++++++++
>  2 files changed, 227 insertions(+), 114 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>


  parent reply	other threads:[~2023-12-05 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 20:12 [PATCH v1 net-next 0/2] Reorganize remaining patch of networking struct cachelines Coco Li
2023-12-04 20:12 ` [PATCH v1 net-next 1/2] net-device: reorganize net_device fast path variables Coco Li
2023-12-04 20:30   ` Eric Dumazet
2023-12-05 16:05   ` David Ahern
2023-12-04 20:12 ` [PATCH v1 net-next 2/2] tcp: reorganize tcp_sock " Coco Li
2023-12-04 20:31   ` Eric Dumazet
2023-12-05 16:08   ` David Ahern [this message]
2023-12-06  5:00 ` [PATCH v1 net-next 0/2] Reorganize remaining patch of networking struct cachelines patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73b28f6e-e6de-41a8-8622-3d58832e1582@kernel.org \
    --to=dsahern@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=lixiaoyan@google.com \
    --cc=mubashirq@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pnemavat@google.com \
    --cc=weiwan@google.com \
    --cc=wwchao@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).