netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
	Salvatore Dipietro <dipiets@amazon.com>,
	alisaidi@amazon.com, benh@amazon.com, blakgeof@amazon.com,
	davem@davemloft.net, dipietro.salvatore@gmail.com,
	dsahern@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v3] tcp: Add memory barrier to tcp_push()
Date: Thu, 18 Jan 2024 08:40:20 -0800	[thread overview]
Message-ID: <20240118084020.2326c3ac@kernel.org> (raw)
In-Reply-To: <CANn89iLmx=u9_==xr-2OfZRA-B3DQE11_Oz3uP-DNLH7k-HwxQ@mail.gmail.com>

On Thu, 18 Jan 2024 11:42:40 +0100 Eric Dumazet wrote:
> > > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> > > index ff6838ca2e58..ab9e3922393c 100644
> > > --- a/net/ipv4/tcp.c
> > > +++ b/net/ipv4/tcp.c
> > > @@ -726,6 +726,7 @@ void tcp_push(struct sock *sk, int flags, int mss_now,
> > >               /* It is possible TX completion already happened
> > >                * before we set TSQ_THROTTLED.
> > >                */
> > > +             smp_mb__after_atomic();  
> >
> > Out of sheer ignorance I'm wondering if moving such barrier inside the
> > above 'if' just after 'set_bit' would suffice?  
> 
> I think this would work just fine.

Sorry, "this" as in Paolo's suggestion or "this" as in the v3 patch 
as posted? :)

  reply	other threads:[~2024-01-18 16:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08 18:20 [PATCH] tcp: disable tcp_autocorking for socket when TCP_NODELAY flag is set Salvatore Dipietro
2023-12-09 11:03 ` Eric Dumazet
2023-12-11 15:58   ` Hazem Mohamed Abuelfotoh
2023-12-12 10:41     ` Paolo Abeni
2023-12-12 11:29       ` Eric Dumazet
2023-12-12 10:57 ` Paolo Abeni
2023-12-13 14:10   ` Eric Dumazet
2023-12-13 19:00     ` Jakub Kicinski
2023-12-13 19:29       ` Eric Dumazet
2023-12-13 21:30     ` Salvatore Dipietro
2023-12-14  8:40       ` Eric Dumazet
2023-12-14  9:05         ` Eric Dumazet
2023-12-14 14:08       ` Eric Dumazet
2023-12-14 15:52         ` Geoff Blake
2023-12-14 16:07           ` Eric Dumazet
2024-01-17 21:26             ` [PATCH v2] tcp: Add memory barrier to tcp_push() Salvatore Dipietro
2024-01-17 21:58               ` Eric Dumazet
2024-01-17 23:16                 ` [PATCH v3] " Salvatore Dipietro
2024-01-18 10:38                   ` Paolo Abeni
2024-01-18 10:42                     ` Eric Dumazet
2024-01-18 16:40                       ` Jakub Kicinski [this message]
2024-01-18 17:46                     ` Geoff Blake
2024-01-18 18:30                       ` Paolo Abeni
2024-01-18 19:30                         ` Geoff Blake
2024-01-19 13:33                           ` Eric Dumazet
2024-04-17  7:33                           ` Eric Dumazet
2024-04-22 16:16                             ` Salvatore Dipietro
2023-12-13 10:40 ` [PATCH] tcp: disable tcp_autocorking for socket when TCP_NODELAY flag is set patchwork-bot+netdevbpf

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=20240118084020.2326c3ac@kernel.org \
    --to=kuba@kernel.org \
    --cc=alisaidi@amazon.com \
    --cc=benh@amazon.com \
    --cc=blakgeof@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dipietro.salvatore@gmail.com \
    --cc=dipiets@amazon.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.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).