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  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, 26 Dec 2019 18:23:41 -0500
From:   Neal Cardwell <ncardwell@...gle.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Soheil Hassas Yeganeh <soheil@...gle.com>,
        Yuchung Cheng <ycheng@...gle.com>,
        Martin KaFai Lau <kafai@...com>
Subject: Re: [PATCH net-next v2 1/5] tcp_cubic: optimize hystart_update()

On Mon, Dec 23, 2019 at 3:28 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> We do not care which bit in ca->found is set.
>
> We avoid accessing hystart and hystart_detect unless really needed,
> possibly avoiding one cache line miss.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---

Thanks, good idea.

> @@ -450,7 +447,7 @@ static void bictcp_acked(struct sock *sk, const struct ack_sample *sample)
>                 ca->delay_min = delay;
>
>         /* hystart triggers when cwnd is larger than some threshold */
> -       if (hystart && tcp_in_slow_start(tp) &&
> +       if (!ca->found && hystart && tcp_in_slow_start(tp) &&
>             tp->snd_cwnd >= hystart_low_window)
>                 hystart_update(sk, delay);
>  }

For the many connections that exit the initial slow start due to loss
or ECN marks, it seems ca->found would always be 0, so such
connections will be at risk for taking a cache miss to fetch
'hystart'. WDYT about further reordering the logic to avoid that risk
for such connections, e.g.:

  -       if (hystart && tcp_in_slow_start(tp) &&
  +       if (!ca->found && tcp_in_slow_start(tp) && hystart &&

neal

Powered by blists - more mailing lists