On Sat, Apr 03, 2010 at 12:51:02PM +0200, Christian Parpart <[email protected]> 
wrote:
> However, I got told that my current sendfile() use is not ideal, as it is 
> indeed nonblocking for the target fd but the source fd (on-disk file)
> it still may block. Which is something I have to work around

Apart from the mmap/madvise/mincore/write method (where mmap is blocking
and madvise often is), there is also the readahead (e.g. via eio) and
sendfile "method".

Note that none of those guarantee that the buffers are still there - ignoring
virtual memory, the only way to guarantee responsiveness under pressure is to
do the old-fashioned read/write.

I wonder what happened if one used a threadpool for sendfile, for large
files only?

(there certainly is eio_sendfile to make it easy to try it out :)

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to