On Sun, 9 Sep 2001, Ryan Bloom wrote:
> > Just because you have an MMAP doesn't necessarily mean the original file
> > descriptor is still open, so you're not guaranteed that you can use
> > sendfile()...
>
> I have thought about doing this for a long time, but I've been told that sendfile
> is essentially a writev, so it isn't a win.
There's another reason it's not a win, which is that if we've MMAPed the
file, that means we've probably done something to the contents, and
there's a pretty good chance that the file has been split up into multiple
MMAP buckets (think mod_include). Since we can only sendfile() one FILE
bucket (MMAP in this case) at a time, we'll end up doing a lot more work
splitting the brigade a bunch of times to allow sendfile() on each MMAP
bucket than we would if we just gathered all the buckets up and writev()'d
them all in one fell swoop like we do now.
--Cliff
--------------------------------------------------------------
Cliff Woolley
[EMAIL PROTECTED]
Charlottesville, VA