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: [RFC mptcp-next 2/3] mptcp: rework poll+nospace handling
Date: Sun, 06 Sep 2020 19:46:49 +0200	[thread overview]
Message-ID: <20200906174649.GM7319@breakpoint.cc> (raw)
In-Reply-To: 9dd31690f26628eb54bb7ea8716ca675cb646423.camel@redhat.com

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

Paolo Abeni <pabeni(a)redhat.com> wrote:
> On Sun, 2020-09-06 at 17:58 +0200, Paolo Abeni wrote:
> > On Sat, 2020-09-05 at 12:33 +0200, Florian Westphal wrote:
> > > +static __poll_t mptcp_check_writeable(struct mptcp_sock *msk)
> > > +{
> > > +	struct sock *sk = (struct sock *)msk;
> > > +	__poll_t ret = 0;
> > > +	bool slow;
> > > +
> > > +	if (sk->sk_shutdown & SEND_SHUTDOWN)
> > > +		return 0;
> > > +
> > > +	slow = lock_sock_fast(sk);
> > > +	if (__mptcp_check_writeable(msk))
> > > +		ret = EPOLLOUT | EPOLLWRNORM;
> > > +
> > > +	unlock_sock_fast(sk, slow);
> > 
> > It's a pity we need to acquire the lock in mptcp_poll()... perhaps we
> > could try to acquire it only if sk_stream_is_writeable(msk)?
> 
> I'm also wondering if checking sk_stream_is_writeable(msk) could be
> enough??? perhaps with a different sndbuf auto-tuning strategy. 

Not right now.  But perhaps this is worth exploring -- we would need
to change mptcp_sendmsg to append data to the rtx queue in case no ssk
can be found.

I'd give this a try unless you or anyone else has objections.

> e.g. if msk sndbuf <= max (ssk sndbuf), I *think*
> that sk_stream_is_writeable(msk) implies at least a ssk is writeable,
> too

You mean mptcp_is_writeable()?
[ Question above still stands though ]

             reply	other threads:[~2020-09-06 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 17:46 Florian Westphal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-09  0:48 [MPTCP] Re: [RFC mptcp-next 2/3] mptcp: rework poll+nospace handling Mat Martineau
2020-09-06 17:55 Florian Westphal
2020-09-06 16:05 Paolo Abeni
2020-09-06 15:58 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=20200906174649.GM7319@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.