netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, ncardwell@google.com,
	therbert@google.com, ycheng@google.com, hkchu@google.com,
	maze@google.com, maheshb@google.com, ilpo.jarvinen@helsinki.fi,
	nanditad@google.com
Subject: Re: [PATCH] tcp: allow splice() to build full TSO packets
Date: Thu, 05 Apr 2012 19:05:09 -0400 (EDT)	[thread overview]
Message-ID: <20120405.190509.409578034793502486.davem@davemloft.net> (raw)
In-Reply-To: <1333631135.18626.606.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 05 Apr 2012 15:05:35 +0200

> Hmm, thinking again about this, I did more tests and it appears we need
> to differentiate the SPLICE_F_MORE flag (user request) and the internal
> marker provided by splice logic (handling a batch of pages)
> 
> A program doing splice(... SPLICE_F_MORE) should really call tcp_push()
> at the end of its work.

This is the kind of problem I was hoping we weren't introducing
when I asked about sendfile() et al. the other day :-)

> [PATCH] tcp: tcp_sendpages() should call tcp_push() once
> 
> commit 2f533844242 (tcp: allow splice() to build full TSO packets) added
> a regression for splice() calls using SPLICE_F_MORE.
> 
> We need to call tcp_flush() at the end of the last page processed in
> tcp_sendpages(), or else transmits can be deferred and future sends
> stall.
> 
> Add a new internal flag, MSG_SENDPAGE_NOTLAST, acting like MSG_MORE, but
> with different semantic.
> 
> For all sendpage() providers, its a transparent change. Only
> sock_sendpage() and tcp_sendpages() can differentiate the two different
> flags provided by pipe_to_sendpage()
> 
> Reported-by: Tom Herbert <therbert@google.com>
> Cc: Nandita Dukkipati <nanditad@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> Cc: Tom Herbert <therbert@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: H.K. Jerry Chu <hkchu@google.com>
> Cc: Maciej Żenczykowski <maze@google.com>
> Cc: Mahesh Bandewar <maheshb@google.com>
> Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail>com>

Applied, thanks Eric.

  reply	other threads:[~2012-04-05 23:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 19:37 [PATCH] tcp: allow splice() to build full TSO packets Eric Dumazet
2012-04-03 21:21 ` David Miller
2012-04-03 21:31   ` Eric Dumazet
2012-04-03 21:36     ` David Miller
2012-04-03 22:50       ` David Miller
2012-04-04  6:15         ` Eric Dumazet
2012-04-04  6:20           ` David Miller
2012-04-05 13:05       ` Eric Dumazet
2012-04-05 23:05         ` David Miller [this message]
2012-04-06  1:59           ` Eric Dumazet

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=20120405.190509.409578034793502486.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hkchu@google.com \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=maheshb@google.com \
    --cc=maze@google.com \
    --cc=nanditad@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    --cc=ycheng@google.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).