From: Alex Vorona <voron@amhost.net>
To: linux-kernel@vger.kernel.org
Subject: Re: sendfile to nonblocking socket
Date: Tue, 24 Apr 2007 07:54:42 +0300 [thread overview]
Message-ID: <462D8D92.9050301@amhost.net> (raw)
In-Reply-To: <MDEHLPKNGKAHNMBLJOLKGEAJDEAC.davids@webmaster.com>
David Schwartz пишет:
> You have a misunderstanding about the semantics of 'sendfile'. The 'sendfile' function is just a more efficient version of a read followed by a write. If you did a read followed by a write, it would block as well (in the read).
>
> DS
>
sendfile function is not just a more efficient version of a read
followed by a write. It reads from one fd and write to another at tha
same time. Please try to read 2G, and then write 2G - and how much
memory you will be need and how much time you will loose while reading
2G from disk, but not writing them to socket. If you know more
efficient method to transfer file from disk to network - please advise.
Now all I want is really non-blocking sendfile. Currently sendfile is
non-blocking on network, but not on disk i/o. And when I have network
faster than disk - I get block.
Thank you,
Alex
next prev parent reply other threads:[~2007-04-24 4:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-23 21:13 sendfile to nonblocking socket voron
2007-04-23 21:59 ` David Miller
2007-04-24 4:42 ` Alex Vorona
2007-04-23 22:52 ` David Schwartz
2007-04-24 4:54 ` Alex Vorona [this message]
2007-04-24 9:19 ` David Schwartz
2007-04-24 10:33 ` Re[2]: " Alex Vorona
2007-04-24 12:48 ` Eric Dumazet
2007-04-24 19:19 ` David Schwartz
-- strict thread matches above, loose matches on Subject: below --
2007-04-25 11:41 A.D.F.
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=462D8D92.9050301@amhost.net \
--to=voron@amhost.net \
--cc=linux-kernel@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