[lkml]   [1999]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectsendfile (& mailinglist archives)


We've been toying with a large (linux) ftp/http/smb fileserving box, at the
office, mostly to use as a mirror-box and to fill our spare bandwidth, and
the colleague working with it wanted to (try to) use sendfile() for it. Now,
i've seen some discussions on sendfile, but haven't really followed them,
and threw away my linux-kernel 'archive' a week ago, so we tried to find
some relative info on the 'net... and couldn't find too many. Well, hardly
any, even in the two linux-kernel mailinglist archives i could find. Was i
looking in the wrong places ? ( and... one other. deja ? i can
re-find if anyone cares.)

In any case, the situation is this: we want to serve files, we want to flood
all outgoing links, but we dont want to flood the machines' network buffers,
and we dont want to make any unnecessary syscalls. Two sendfile()s in (too)
quick succession however, makes the second one return EAGAIN, several times
if kept in a loop, depending on the size of the first sendfile().

Is there any way to either check if sendfile is ready for another burst, or
force sendfile to wait until it's ready ? If not, and the answer is 'dont do
that, then', what's the 'normal' way to handle such cases ? Is there
anything written that uses or explains sendfile in situations as above, like
a webserver or ftpserver ? (We're currently using a slightly modified
proftpd 1.2.0pre3.) Better yet, is there a mail archive that does
serve hits when asked about sendfile ? :)

(I guess i wont throw away my linux-kernel mailarchive for a while now ;-)

(PS: Please keep the CC: in, he's not on the list)

Thomas Wouters <>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:52    [W:0.032 / U:2.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site