netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coco Li <lixiaoyan@google.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: 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>,
	netdev@vger.kernel.org, Chao Wu <wwchao@google.com>,
	 Wei Wang <weiwan@google.com>
Subject: Re: [PATCH v1 net-next 0/5] Analyze and Reorganize core Networking Structs to optimize cacheline consumption
Date: Wed, 20 Sep 2023 23:47:34 -0700	[thread overview]
Message-ID: <CADjXwjjP_8mM8y6KRF6_VQDpM7-UAXKDW02gRKf3FeJijnjSPA@mail.gmail.com> (raw)
In-Reply-To: <942de224-f18b-474d-b75b-6f08f66541c9@lunn.ch>

As replied in the other patch, we have arm64 platform in our testbeds
with smaller L3 cache (1.375MB vs 256Mb on AMD), but its L1/L2 cache
is similar or even bigger than our AMD platform cache. We will send
results with this platform in the next update.

Thank you for your suggestions.


On Sat, Sep 16, 2023 at 7:23 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Sat, Sep 16, 2023 at 01:06:20AM +0000, Coco Li wrote:
> > Currently, variable-heavy structs in the networking stack is organized
> > chronologically, logically and sometimes by cache line access.
> >
> > This patch series attempts to reorganize the core networking stack
> > variables to minimize cacheline consumption during the phase of data
> > transfer. Specifically, we looked at the TCP/IP stack and the fast
> > path definition in TCP.
> >
> > For documentation purposes, we also added new files for each core data
> > structure we considered, although not all ended up being modified due
> > to the amount of existing cache line they span in the fast path. In
> > the documentation, we recorded all variables we identified on the
> > fast path and the reasons. We also hope that in the future when
> > variables are added/modified, the document can be referred to and
> > updated accordingly to reflect the latest variable organization.
> >
> > Tested:
> > Our tests were run with neper tcp_rr using tcp traffic. The tests have $cpu
> > number of threads and variable number of flows (see below).
> >
> > Tests were run on 6.5-rc1
> >
> > Efficiency is computed as cpu seconds / throughput (one tcp_rr round trip).
> > The following result shows Efficiency delta before and after the patch
> > series is applied.
> >
> > On AMD platforms with 100Gb/s NIC and 256Mb L3 cache:
>
> Would it be possible to run the same tests on a small ARM, MIPS or
> RISC-V machine?  Something with small L1 and L2 cache, and no L3
> cache. You sometimes hear that the Linux network stack has become too
> big for small embedded systems, it is thrashing the caches. I suspect
> this change will help such machine. But i suppose it could also be bad
> for them. We won't know until it is tested.
>
>     Andrew
>

  reply	other threads:[~2023-09-21 17:53 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
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 [this message]
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=CADjXwjjP_8mM8y6KRF6_VQDpM7-UAXKDW02gRKf3FeJijnjSPA@mail.gmail.com \
    --to=lixiaoyan@google.com \
    --cc=andrew@lunn.ch \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --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).