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 v2 1/6] mptcp: separate accouting for wmem forward alloc mem
Date: Tue, 17 Nov 2020 11:47:59 +0100	[thread overview]
Message-ID: <20201117104759.GG22792@breakpoint.cc> (raw)
In-Reply-To: e023afa8f4ad8536aaaab41584917775beec41ca.camel@redhat.com

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

Paolo Abeni <pabeni(a)redhat.com> wrote:
> As mentioned before, one possible follow-up to this series is open-code 
> a MPTCP-specific variant of lock_sock()/release_sock() which will allow
> performing some additional/MPTCP specific actions under the msk level
> spinlock.
> 
> Specifically:
> 
> - in recevmsg(), in lock_sock(), splice sk->sk_receive_queue in msk-
> >receive_queue
> - still in recvmsg(), in release_sock(), update the bulk freed rmem 
> 
> Overall this 2 will allow acquiring no additional spinlock at all in
> the average case for recvmsg()
> 
> - in sendmsg(), in lock_sock(), move as much memory as needed from
> sk_forward_memory to wforward_memory, eventually allocating it.
> - in sendmsg(), in release_sock(), move again the unused
> wforward_memory to sk_forward_memory.
> 
> Overall this 2 will allow acquiring no additional spinlock at all in
> the average case for sendmsg() and will avoid artifacts due to the
> sk_forward_memory/wforward_memory separation.
> 
> But they additionally will allow replacing the wforward_memory field
> with a local variable. 
> 
> So I'm wondering if I should already code the above, to avoid
> introducing this additional new msk field just to remove it in a few
> patches !?!

Tricky.  Do you have hunch of how much additional code churn that
means?

If its not too much 'rewrite', I would prefer to do it later on
even if that means axing the newly added field.

If it means to rewrite most of this again then its probably
better to do it right away.

             reply	other threads:[~2020-11-17 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 10:47 Florian Westphal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-18  9:37 [MPTCP] Re: [PATCH v2 1/6] mptcp: separate accouting for wmem forward alloc mem Paolo Abeni
2020-11-17 21:07 Mat Martineau
2020-11-17 12:09 Paolo Abeni
2020-11-16 17:04 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=20201117104759.GG22792@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.