From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Ashwini Kulkarni <ashwini.kulkarni@intel.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
christopher.leech@intel.com
Subject: Re: [RFC 0/6] TCP socket splice
Date: Thu, 21 Sep 2006 10:00:44 +0400 [thread overview]
Message-ID: <20060921060044.GA23532@2ka.mipt.ru> (raw)
In-Reply-To: <20060920210711.17480.92354.stgit@gitlost.site>
On Wed, Sep 20, 2006 at 02:07:11PM -0700, Ashwini Kulkarni (ashwini.kulkarni@intel.com) wrote:
> Using TCP socket splice:
>
> Application Control
> |
> _________________|__________________________________
> |
> | TCP socket splice
> | +---------------------+
> | | Direct path |
> V | V
> Network File System
> Buffer Buffer
> ^ |
> | |
> _________________|_______________________|__________
> DMA | | DMA
> | |
> Hardware | |
> | V
> NIC SATA
>
> In this method, the objective is to use TCP socket splicing to create a direct
> path in the kernel from the network buffer to the file system buffer via a pipe
> buffer. The pages will migrate from the network buffer (which is associated
> with the socket) into the pipe buffer for an optimized path. From the pipe
> buffer, the pages will then be migrated to the output file address space page
> cache. This will enable to create a LAN to file-system API which will avoid the
> memcpy operations in user space and thus create a fast path from the network
> buffer to the storage buffer.
>
> Open Issues (currently being addressed):
> There is a performance drop when transferring bigger files (usually larger than
> 65536 bytes in size). Performance drop increases with the size of the file.
> Work is in progress to identify the source of this issue.
>
> We encourage the community to review our TCP socket splice project. Feedback
> would be greatly appreciated.
First of all it is not zero-copy, most of the time when mtu is not
changed skb does not have fragments, which means that you need to copy,
and you do it in skb_splice_bits() after skb_headlen() check.
Additionally to copy you add kmap/kunmap overhead, which can be very
noticeble. I would not be surprised that exactly that part introduces
described above performance drop compared to copy_*_user() approach.
Did you checked it with (hacked) drivers, which put data into fragment
list? Could you post your benchamrks.
And your coding style is broken noticebly...
Also do not check for every possible error case, negative return value
always meant error, otherwise it is ok in your case to proceed.
> --
> Ashwini Kulkarni
--
Evgeniy Polyakov
next prev parent reply other threads:[~2006-09-21 6:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-20 21:07 [RFC 0/6] TCP socket splice Ashwini Kulkarni
2006-09-20 21:08 ` [RFC 1/6] Make splice_to_pipe non-static and move structure definitions to a header file Ashwini Kulkarni
2006-09-20 21:08 ` [RFC 2/6] Make sock_def_wakeup non-static Ashwini Kulkarni
2006-09-20 21:08 ` [RFC 3/6] Add in TCP related part of splice read to ipv4 Ashwini Kulkarni
2006-09-20 21:08 ` [RFC 4/6] Add TCP socket splicing (tcp_splice_read) support Ashwini Kulkarni
2006-09-20 21:08 ` [RFC 5/6] Add skb_splice_bits to skbuff.c Ashwini Kulkarni
2006-09-20 21:08 ` [RFC 6/6] Move i_size_read part from do_splice_to() to __generic_file_splice_read() in splice.c Ashwini Kulkarni
2006-09-21 6:00 ` Evgeniy Polyakov [this message]
2006-09-22 17:45 ` [RFC 0/6] TCP socket splice Phillip Susi
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=20060921060044.GA23532@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=ashwini.kulkarni@intel.com \
--cc=christopher.leech@intel.com \
--cc=linux-kernel@vger.kernel.org \
--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).