All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gianni Tedesco <gianni@scaramanga.co.uk>
To: Xiuduan Fang <xf4c@cs.virginia.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about sendfile
Date: Tue, 08 Feb 2005 23:59:52 +0000	[thread overview]
Message-ID: <1107907193.5822.81.camel@sherbert> (raw)
In-Reply-To: <03cd01c50d8e$00dd2fe0$3b3f8f80@cs.virginia.edu>

On Mon, 2005-02-07 at 22:26 -0500, Xiuduan Fang wrote:
> Hi,
> 
> I am trying to beat the I/O bottleneck so as to speed up bulk data transfers 
> in high speed network. It seems that the system call sendfile() can help to 
> reduce CPU utilization and speedup data transfers. But I have one question 
> about the system call,
> 
> First,  Linux sendfile requires that the input file descriptor cannot be a 
> network socket. What are the reasons for such a restriction? Sending a 
> socket to a file via zero copy is definitely useful.  Actually this is one 
> approach I am trying to do to improve performance.  Some discussions on 
> Linux zero copy said this is because it is harder. Sending a socket to a 
> file via zero copy needs the support of NICs. I cannot understand this 
> explanation. It seems that FreeBSD has implemented bidirectional zero 
> copy(http://people.freebsd.org/~ken/zero_copy/#Download). So why Linux does 
> not support it? What shall I do to release the restriction that Linux 
> enforces on sendfile?

>From the URL you posted:

"[zero-copy receive] generally requires some sort of intelligence on the
NIC to make sure that the payload starts in its own buffer.  This is
called "header splitting".  Currently the only NICs with support for
header splitting are Alteon Tigon 2 based boards running slightly
modified firmware."

Perhaps that explains it.

Not to mention the other complications that are involved if you scroll
down the page and read the FAQ.

Have you done any profiling work to see where your CPU cycles are being
spent?

-- 
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/scaramanga.asc | gpg --import


  reply	other threads:[~2005-02-09  0:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-08  3:26 Question about sendfile Xiuduan Fang
2005-02-08 23:59 ` Gianni Tedesco [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-03 10:47 Hao Xu
2021-07-07 14:16 ` Pavel Begunkov
2021-07-14  3:50   ` Hao Xu
2021-11-26  8:50   ` Hao Xu
2021-12-03 16:03     ` Pavel Begunkov
2021-12-05 15:21       ` Hao Xu

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=1107907193.5822.81.camel@sherbert \
    --to=gianni@scaramanga.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xf4c@cs.virginia.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.