All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts at tessares.net>
To: mptcp at lists.01.org
Subject: Re: [MPTCP] [PATCH mptcp v4] mptcp: switch sublist to mptcp socket lock protection
Date: Wed, 29 May 2019 17:40:36 +0200	[thread overview]
Message-ID: <ceba6ece-fc88-d81b-4431-48cbafc64c58@tessares.net> (raw)
In-Reply-To: ce4256d7830e49e2e4bc0842457df164282b0751.camel@linux.intel.com

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

Hi Florian, Paolo, Mat, Peter,

On 29/05/2019 01:49, Peter Krystad wrote:
> On Tue, 2019-05-28 at 17:57 +0200, Matthieu Baerts wrote:
>> Hi Florian, Paolo,
>>
>> Thank you for the new version of the patch and the review!
>>
>> Hi Peter, Mat,
>>
>> I know you were interested by (re-)reviewing this patch. Is it also
>> looking good to you? If you don't have time to look at it now, maybe we
>> can already apply it in our repo as it is a consequent patch and propose
>> fixes later. WDYT?
> 
> I'm fine with v4 of this change.

Again, thank you for the patch and the review.

Just added at the end:

https://github.com/multipath-tcp/mptcp_net-next/commits/export

And kselftests are OK:

	ok 1 selftests: mptcp: mptcp_connect.sh

Cheers,
Matt

> Peter.
> 
>> Cheers,
>> Matt
>>
>> On 28/05/2019 11:38, Paolo Abeni wrote:
>>> Hi all,
>>>
>>> On Mon, 2019-05-27 at 00:24 +0200, Florian Westphal wrote:
>>>> The mptcp sublist is currently guarded by rcu, but this comes with
>>>> several artifacts that make little sense.
>>>>
>>>> 1. There is a synchronize_rcu after stealing the subflow list on
>>>>    each mptcp socket close.
>>>>
>>>>    synchronize_rcu() is a very expensive call, and should not be
>>>>    needed.
>>>>
>>>> 2. There is a extra spinlock to guard the list, ey we can't use
>>>>    the lock in some cases because we need to call functions that
>>>>    might sleep.
>>>>
>>>> 3. There is a 'mptcp_subflow_hold()' function that uses
>>>>    an 'atomic_inc_not_zero' call.  This wasn't needed even with
>>>>    current code:  The owning mptcp socket holds references on its
>>>>    subflows, so a subflow socket that is still found on the list
>>>>    will always have a nonzero reference count.
>>>>
>>>> This changes the subflow list to always be guarded by the owning
>>>> mptcp socket lock.  This is safe as long as no code path that holds
>>>> a mptcp subflow tcp socket lock will try to lock the owning mptcp
>>>> sockets lock.
>>>>
>>>> The inverse -- locking the tcp subflow lock while holding the
>>>> mptcp lock -- is fine.
>>>>
>>>> mptcp_subflow_get_ref() will have to be altered later when we
>>>> support multiple subflows so it will pick a 'preferred' subflow
>>>> rather than the first one in the list.
>>>>
>>>> v4: - remove all sk_state changes added in v2/v3, they do not
>>>>     belong here -- it should be done as a separate change.
>>>>     - prefer mptcp_for_each_subflow rather than list_for_each_entry.
>>>>
>>>> v3: use BH locking scheme in mptcp_finish_connect, there is no
>>>>     guarantee we are always called from backlog processing.
>>>>
>>>> Signed-off-by: Florian Westphal <fw(a)strlen.de>
>>>
>>> LGTM, thanks Florian.
>>>
>>> Paolo
>>>
>>> _______________________________________________
>>> mptcp mailing list
>>> mptcp(a)lists.01.org
>>> https://lists.01.org/mailman/listinfo/mptcp
>>>
> 

-- 
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium

             reply	other threads:[~2019-05-29 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 15:40 Matthieu Baerts [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-28 23:49 [MPTCP] [PATCH mptcp v4] mptcp: switch sublist to mptcp socket lock protection Peter Krystad
2019-05-28 16:22 Mat Martineau
2019-05-28 15:57 Matthieu Baerts
2019-05-28  9:38 Paolo Abeni
2019-05-26 22:24 Florian Westphal

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=ceba6ece-fc88-d81b-4431-48cbafc64c58@tessares.net \
    --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.