David Miller wrote: > From: voron > 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 operation. > > > How can I told kernel to not block on disk I/O? I tried non-blocking on disk i/o fd, but it seems to be ignored. Strace with both nonblocing disk fd and socket fd in attach #non-blocking on socket fd enabled 04:34:07 ioctl(9, FIONBIO, [1]) = 0 #non-blocking on disk fd enabled 04:34:11 ioctl(12, FIONBIO, [1]) = 0 #normal sendfile 04:34:07 sendfile(9, 12, [444282], 2147477638) = 812682 #32 seconds sendfile 04:34:11 sendfile(9, 12, [261474962], 2147476846) = 2144612230 Thank you, Alex