From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Johann Baudy <johaahn@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: Packet mmap: TX RING and zero copy
Date: Thu, 4 Sep 2008 02:03:47 +0400 [thread overview]
Message-ID: <20080903220347.GA22395@2ka.mipt.ru> (raw)
In-Reply-To: <7e0dd21a0809031330i1363c4aema9c57ef06a3d5279@mail.gmail.com>
On Wed, Sep 03, 2008 at 10:30:14PM +0200, Johann Baudy (johaahn@gmail.com) wrote:
> > It will endup with generic_splice_sendpage() and pipe_to_sendpage().
> >
> Indeed, I've double checked, but pipe_to_sendpage() will end up with
> packet_sendmsg()
>
> .splice_write = generic_splice_sendpage,
> generic_splice_sendpage()
> splice_from_pipe();
> pipe_to_sendpage() from err = actor(pipe, buf, sd);
> sock_sendpage() from ile->f_op->sendpage()
> sock_no_sendpage() from sock->ops->sendpage()
> kernel_sendmsg()
> sock_sendmsg();
> packet_sendmsg() from sock->ops->sendmsg();
> memcpy() :'(
>
> I think a non-generic splice_write function should do the job.
> What do you think?
Looks like you try to sendfile() over packet socket.
Both tcp and udp sockets have sendpage method.
Or your hardware or driver do not support needed fucntionality, so
tcp_sendpage() falls back to sock_no_sendpage(). From your dump I think
it is the first case above. Well, after I read it again, I found word
packet_sendmsg(), which explains everything. Please use tcp or udp
socket for splice/sendfile test.
> I mean the transfer unit size (ethernet frame length) that must be <= MTU.
> Jumbo frames are enabled in the driver and mtu size is set to 7200.
> I'm currently using wireshark on a remote pc to check bitrate and format.
> I think performance can decrease because CPU will spend the same time
> to send 7200 or 4096 bytes but not the DMA.(~50µs for 7200, ~30µs for
> 4096)
If you use jumbo frames, than yes, the bigger allocation unit is
(assuming allocation succeeded), the bigger speed will be, so this result
is expectable.
--
Evgeniy Polyakov
next prev parent reply other threads:[~2008-09-03 22:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-02 18:27 Packet mmap: TX RING and zero copy Johann Baudy
2008-09-02 19:46 ` Evgeniy Polyakov
2008-09-03 7:56 ` Johann Baudy
2008-09-03 10:38 ` Johann Baudy
2008-09-03 11:06 ` David Miller
2008-09-03 13:05 ` Johann Baudy
2008-09-03 13:27 ` Evgeniy Polyakov
2008-09-03 14:57 ` Christoph Lameter
2008-09-03 15:00 ` Johann Baudy
2008-09-03 15:13 ` Evgeniy Polyakov
2008-09-03 15:58 ` Johann Baudy
2008-09-03 16:43 ` Evgeniy Polyakov
2008-09-03 20:30 ` Johann Baudy
2008-09-03 22:03 ` Evgeniy Polyakov [this message]
2008-09-04 14:44 ` Johann Baudy
2008-09-05 7:17 ` Evgeniy Polyakov
[not found] ` <7e0dd21a0809050216r65b8f08fm1ad0630790a13a54@mail.gmail.com>
2008-09-05 9:17 ` Fwd: " Johann Baudy
2008-09-05 11:31 ` Evgeniy Polyakov
2008-09-05 12:44 ` Johann Baudy
2008-09-05 13:16 ` Evgeniy Polyakov
2008-09-05 13:29 ` Johann Baudy
2008-09-05 13:37 ` Evgeniy Polyakov
2008-09-05 13:55 ` Johann Baudy
2008-09-05 14:19 ` Evgeniy Polyakov
2008-09-05 14:45 ` Johann Baudy
2008-09-05 14:59 ` Evgeniy Polyakov
2008-09-05 15:30 ` Johann Baudy
2008-09-05 15:38 ` Evgeniy Polyakov
2008-09-05 16:01 ` Johann Baudy
2008-09-05 16:34 ` Evgeniy Polyakov
2008-09-08 10:21 ` Johann Baudy
2008-09-08 11:26 ` Evgeniy Polyakov
2008-09-08 13:01 ` Johann Baudy
2008-09-08 15:28 ` Evgeniy Polyakov
2008-09-08 15:38 ` Evgeniy Polyakov
2008-09-09 23:11 ` Johann Baudy
2008-09-10 6:09 ` Evgeniy Polyakov
2008-09-05 10:28 ` Robert Iakobashvili
2008-09-05 13:06 ` Johann Baudy
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=20080903220347.GA22395@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=davem@davemloft.net \
--cc=johaahn@gmail.com \
--cc=netdev@vger.kernel.org \
/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).