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]
Date:   Thu, 20 Oct 2022 21:25:24 +0000
From:   Kamaljit Singh <Kamaljit.Singh1@....com>
To:     "edumazet@...gle.com" <edumazet@...gle.com>
CC:     Niklas Cassel <Niklas.Cassel@....com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        Damien Le Moal <Damien.LeMoal@....com>,
        "dsahern@...nel.org" <dsahern@...nel.org>,
        "yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v1 2/2] tcp: Ignore OOO handling for TCP ACKs

On Thu, 2022-10-20 at 11:57 -0700, Eric Dumazet wrote:
> CAUTION: This email originated from outside of Western Digital. Do not click
> on links or open attachments unless you recognize the sender and know that the
> content is safe.
> 
> 
> On Thu, Oct 20, 2022 at 11:22 AM Kamaljit Singh <kamaljit.singh1@....com>
> wrote:
> > Even with the TCP window fix to tcp_acceptable_seq(), occasional
> > out-of-order host ACKs were still seen under heavy write workloads thus
> > Impacting performance.  By removing the OoO optionality for ACKs in
> > __tcp_transmit_skb() that issue seems to be fixed as well.
> 
> This is highly suspect/bogus.
> 
>  Please give which driver is used here.
The NVMe/TCP Host driver (also mentioned in the cover letter).


> 
> > Signed-off-by: Kamaljit Singh <kamaljit.singh1@....com>
> > ---
> >  net/ipv4/tcp_output.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> > index 322e061edb72..1cd77493f32c 100644
> > --- a/net/ipv4/tcp_output.c
> > +++ b/net/ipv4/tcp_output.c
> > @@ -1307,7 +1307,10 @@ static int __tcp_transmit_skb(struct sock *sk, struct
> > sk_buff *skb,
> >          * TODO: Ideally, in-flight pure ACK packets should not matter here.
> >          * One way to get this would be to set skb->truesize = 2 on them.
> >          */
> > -       skb->ooo_okay = sk_wmem_alloc_get(sk) < SKB_TRUESIZE(1);
> > +       if (likely(tcb->tcp_flags & TCPHDR_ACK))
> > +               skb->ooo_okay = 0;
> > +       else
> > +               skb->ooo_okay = sk_wmem_alloc_get(sk) < SKB_TRUESIZE(1);
> > 
> 
> This is absolutely wrong and would impact performance quite a lot.
> 
> You are basically removing all possibilities for ackets of a TCP flow
> to be directed to a new queue, say if use thread has migrated to
> another cpu.
Are you suggesting that the proposed change not be done at all or done in a
different way? We did see an observed performance improvement in NVMe/TCP
traffic with this fix. If you have an alternative idea I'd be happy to try &
test it out.


> 
> After 3WHS, all packets get ACK set.
-- 
Thanks,
Kamaljit Singh <kamaljit.singh1@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ