[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080903220347.GA22395@2ka.mipt.ru>
Date: Thu, 4 Sep 2008 02:03:47 +0400
From: Evgeniy Polyakov <johnpol@....mipt.ru>
To: Johann Baudy <johaahn@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: Packet mmap: TX RING and zero copy
On Wed, Sep 03, 2008 at 10:30:14PM +0200, Johann Baudy (johaahn@...il.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists