netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Coco Li <lixiaoyan@google.com>
Cc: Eric Dumazet <edumazet@google.com>,
	Neal Cardwell <ncardwell@google.com>,
	Mubashir Adnan Qureshi <mubashirq@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Chao Wu <wwchao@google.com>,
	Wei Wang <weiwan@google.com>
Subject: Re: [PATCH v1 net-next 1/5] Documentations: Analyze heavily used Networking related structs
Date: Wed, 4 Oct 2023 06:41:46 -0700	[thread overview]
Message-ID: <20231004064146.18857c9a@kernel.org> (raw)
In-Reply-To: <20230916010625.2771731-2-lixiaoyan@google.com>

On Sat, 16 Sep 2023 01:06:21 +0000 Coco Li wrote:
> Analyzed a few structs in the networking stack by looking at variables
> within them that are used in the TCP/IP fast path.
> 
> Fast path is defined as TCP path where data is transferred from sender to
> receiver unidirectionaly. It doesn't include phases other than
> TCP_ESTABLISHED, nor does it look at error paths.
> 
> We hope to re-organizing variables that span many cachelines whose fast
> path variables are also spread out, and this document can help future
> developers keep networking fast path cachelines small.
> 
> Optimized_cacheline field is computed as
> (Fastpath_Bytes/L3_cacheline_size_x86), and not the actual organized
> results (see patches to come for these).

Great work! I wonder if it's not better to drop the Documentation/
files and just add the info from the "comments" inline in the struct?
Is there precedent for such out-of-line documentation?
The grouping in structures makes it clear what the category of the
field is (and we can add comments where it isn't).

Right now the "documentation" does not seem to be mentioned anywhere 
in the source code. Chances that anyone will know to look for it are
close to zero :(

The guidance on how the optimizations were performed OTOH would be
quite useful to document.

  parent reply	other threads:[~2023-10-04 13:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16  1:06 [PATCH v1 net-next 0/5] Analyze and Reorganize core Networking Structs to optimize cacheline consumption Coco Li
2023-09-16  1:06 ` [PATCH v1 net-next 1/5] Documentations: Analyze heavily used Networking related structs Coco Li
2023-09-16 14:36   ` Andrew Lunn
2023-09-21  6:38     ` Coco Li
2023-10-04 13:37   ` Jakub Kicinski
2023-10-04 13:41   ` Jakub Kicinski [this message]
2023-10-17  1:37     ` Coco Li
2023-09-16  1:06 ` [PATCH v1 net-next 2/5] net-smnp: reorganize SNMP fast path variables Coco Li
2023-09-16  3:16   ` David Ahern
2023-09-16 14:39   ` Andrew Lunn
2023-09-16  1:06 ` [PATCH v1 net-next 3/5] netns-ipv4: reorganize netns_ipv4 " Coco Li
2023-09-16  3:17   ` David Ahern
2023-09-17 17:10   ` Vadim Fedorenko
2023-09-21  6:31     ` Coco Li
2023-09-16  1:06 ` [PATCH v1 net-next 4/5] net-device: reorganize net_device " Coco Li
2023-09-16  3:17   ` David Ahern
2023-09-18 19:50   ` Eric Dumazet
2023-09-16  1:06 ` [PATCH v1 net-next 5/5] tcp: reorganize tcp_sock " Coco Li
2023-09-16  3:17   ` David Ahern
2023-09-16  3:20 ` [PATCH v1 net-next 0/5] Analyze and Reorganize core Networking Structs to optimize cacheline consumption David Ahern
2023-09-16 14:23 ` Andrew Lunn
2023-09-21  6:47   ` Coco Li
2023-10-17  1:41     ` Coco Li
2023-10-17 11:26 ` Sunil Kovvuri

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=20231004064146.18857c9a@kernel.org \
    --to=kuba@kernel.org \
    --cc=edumazet@google.com \
    --cc=lixiaoyan@google.com \
    --cc=mubashirq@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).