From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <edumazet@google.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <kuni1840@gmail.com>,
<kuniyu@amazon.com>, <netdev@vger.kernel.org>,
<pabeni@redhat.com>
Subject: Re: [PATCH v3 net-next 3/5] tcp: Access &tcp_hashinfo via net.
Date: Thu, 1 Sep 2022 15:12:16 -0700 [thread overview]
Message-ID: <20220901221216.14973-1-kuniyu@amazon.com> (raw)
In-Reply-To: <CANn89iJ=D8o2kNRf6aL=Pa=V6m_fOr6bPBY67yjXFgwTCEAHag@mail.gmail.com>
From: Eric Dumazet <edumazet@google.com>
Date: Thu, 1 Sep 2022 14:30:43 -0700
> On Thu, Sep 1, 2022 at 2:25 PM Kuniyuki Iwashima <kuniyu@amazon.com> wrote:
> >
> > From: Paolo Abeni <pabeni@redhat.com>
>
> > > /Me is thinking aloud...
> > >
> > > I'm wondering if the above has some measurable negative effect for
> > > large deployments using only the main netns?
> > >
> > > Specifically, are net->ipv4.tcp_death_row and net->ipv4.tcp_death_row-
> > > >hashinfo already into the working set data for established socket?
> > > Would the above increase the WSS by 2 cache-lines?
> >
> > Currently, the death_row and hashinfo are touched around tw sockets or
> > connect(). If connections on the deployment are short-lived or frequently
> > initiated by itself, that would be host and included in WSS.
> >
> > If the workload is server and there's no active-close() socket or
> > connections are long-lived, then it might not be included in WSS.
> > But I think it's not likely than the former if the deployment is
> > large enough.
> >
> > If this change had large impact, then we could revert fbb8295248e1
> > which converted net->ipv4.tcp_death_row into pointer for 0dad4087a86a
> > that tried to fire a TW timer after netns is freed, but 0dad4087a86a
> > has already reverted.
>
>
> Concern was fast path.
>
> Each incoming packet does a socket lookup.
>
> Fetching hashinfo (instead of &tcp_hashinfo) with a dereference of a
> field in 'struct net' might inccurr a new cache line miss.
>
> Previously, first cache line of tcp_info was enough to bring a lot of
> fields in cpu cache.
Ok, let me test on that if there could be regressions.
next prev parent reply other threads:[~2022-09-01 22:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 19:15 [PATCH v3 net-next 0/5] tcp: Introduce optional per-netns ehash Kuniyuki Iwashima
2022-08-30 19:15 ` [PATCH v3 net-next 1/5] tcp: Clean up some functions Kuniyuki Iwashima
2022-08-30 19:15 ` [PATCH v3 net-next 2/5] tcp: Set NULL to sk->sk_prot->h.hashinfo Kuniyuki Iwashima
2022-08-30 19:15 ` [PATCH v3 net-next 3/5] tcp: Access &tcp_hashinfo via net Kuniyuki Iwashima
2022-09-01 10:57 ` Paolo Abeni
2022-09-01 21:25 ` Kuniyuki Iwashima
2022-09-01 21:30 ` Eric Dumazet
2022-09-01 22:12 ` Kuniyuki Iwashima [this message]
2022-09-03 0:44 ` Kuniyuki Iwashima
2022-09-03 0:53 ` Eric Dumazet
2022-09-03 1:12 ` Kuniyuki Iwashima
2022-09-03 1:44 ` Kuniyuki Iwashima
2022-09-03 2:30 ` Eric Dumazet
2022-09-03 2:50 ` Kuniyuki Iwashima
2022-09-03 3:16 ` Eric Dumazet
2022-09-03 3:25 ` Kuniyuki Iwashima
2022-09-01 21:49 ` Jakub Kicinski
2022-09-01 22:19 ` Kuniyuki Iwashima
2022-08-30 19:15 ` [PATCH v3 net-next 4/5] tcp: Save unnecessary inet_twsk_purge() calls Kuniyuki Iwashima
2022-08-30 19:15 ` [PATCH v3 net-next 5/5] tcp: Introduce optional per-netns ehash Kuniyuki Iwashima
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=20220901221216.14973-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).