lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220901221216.14973-1-kuniyu@amazon.com>
Date:   Thu, 1 Sep 2022 15:12:16 -0700
From:   Kuniyuki Iwashima <kuniyu@...zon.com>
To:     <edumazet@...gle.com>
CC:     <davem@...emloft.net>, <kuba@...nel.org>, <kuni1840@...il.com>,
        <kuniyu@...zon.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH v3 net-next 3/5] tcp: Access &tcp_hashinfo via net.

From:   Eric Dumazet <edumazet@...gle.com>
Date:   Thu, 1 Sep 2022 14:30:43 -0700
> On Thu, Sep 1, 2022 at 2:25 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
> >
> > From:   Paolo Abeni <pabeni@...hat.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ