All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [PATCH net-next 8/8] mptcp: defer work schedule until mptcp lock is released
Date: Tue, 25 Feb 2020 17:18:21 +0100	[thread overview]
Message-ID: <20200225161821.GM19559@breakpoint.cc> (raw)
In-Reply-To: 134191ed6e2bbd67ee36a7ac415ee54ef4f9f505.camel@redhat.com

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

Paolo Abeni <pabeni(a)redhat.com> wrote:
> On Tue, 2020-02-25 at 13:54 +0100, Florian Westphal wrote:
> > Paolo Abeni <pabeni(a)redhat.com> wrote:
> > > I think the trylock in patch 6 from different subflows can collide with
> > > each other, so a try lock can fail even with !sk->sk_lock.owned
> > 
> > Not following, sorry.
> 
> I mean something alike
> 
> CPU0 (subflow 0)		CPU1 (subflow 1)
> trylock				trylock
> // enqueue the			// lock busy 
> // data	
> 				test_and_set_bit(TCP_DELACK_TIMER_DEFERRED)
> 
> but nobody will call mptcp_release_cb() soon.

This would only happen if both subflows have in-sequence data
at the time they enter this function.

Even if it happens, then:
1. We enqueued new data (mptcp->ack_seq update)
2. We unblock/notify userspace there is new data to read

If userspaces goes sleep(3600);

then its possible that we leave 'unacked' data behind
in case the 'losing' subflow had more data than that.

If thats a concern, the fix is simple:

get rid of TCP_DELACK_TIMER_DEFERRED/release_cb and
schedule work directly.

I will do that in next series.

             reply	other threads:[~2020-02-25 16:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 16:18 Florian Westphal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-25 16:35 [MPTCP] Re: [PATCH net-next 8/8] mptcp: defer work schedule until mptcp lock is released Paolo Abeni
2020-02-25 14:53 Paolo Abeni
2020-02-25 12:54 Florian Westphal
2020-02-25 12:50 Paolo Abeni

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=20200225161821.GM19559@breakpoint.cc \
    --to=unknown@example.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.