Re[2]: sendfile to nonblocking socket

2007-04-24 Thread Alex Vorona
Hello David, Tuesday, April 24, 2007, 1:19:49 PM, you wrote: >> 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

Re[2]: sendfile to nonblocking socket

2007-04-24 Thread Alex Vorona
Hello David, Tuesday, April 24, 2007, 1:19:49 PM, you wrote: 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

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
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

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
David Miller wrote: From: voron <[EMAIL PROTECTED]> Date: Tue, 24 Apr 2007 00:13:27 +0300 As I see, nonblocking mode is enabled - sendfile sends less than asked. The socket is marked as non-blocking, but the disk I/O is not. It's blocking on the disk I/O not the socket part of the

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
David Miller wrote: From: voron [EMAIL PROTECTED] Date: Tue, 24 Apr 2007 00:13:27 +0300 As I see, nonblocking mode is enabled - sendfile sends less than asked. The socket is marked as non-blocking, but the disk I/O is not. It's blocking on the disk I/O not the socket part of the

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
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