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: Tue, 03 Apr 2012 17:36:14 -0400 (EDT) [thread overview]
Message-ID: <20120403.173614.962252876842659412.davem@davemloft.net> (raw)
In-Reply-To: <1333488689.18626.331.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 03 Apr 2012 23:31:29 +0200
> The code in tcp_sendmsg() and do_tcp_sendpages() is similar (actually
> probably copy/pasted) but the thing is tcp_sendmsg() is called once per
> sendmsg() call (and the push logic is OK at the end of it), while a
> single splice() system call can call do_tcp_sendpages() 16 times (or
> even more if pipe buffer was extended by fcntl(F_SETPIPE_SZ))
Ok, so this means that in essence the tcp_mark_push should also only
be done in the final sendpage call.
And since I'm wholly convinced that the URG stuff is a complete
"don't care" for this path, I'm convinced your patch is the right
thing to do.
Applied to 'net' and queued up for -stable, thanks Eric.
> Maybe a real fix would be to call do_tcp_sendpages() exactly once, but I
> tried this today and found needed surgery was complex). Also this would
> lock socket for a long period and could add latencies because of backlog
> processing.
I don't think this is a good idea. Maybe we can do some level of
batching at some point, but it would need to have a limit.
next prev parent reply other threads:[~2012-04-03 21:36 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 [this message]
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
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=20120403.173614.962252876842659412.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).