[lkml]   [2001]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Is sendfile all that sexy?
    On Mon, 15 Jan 2001, Jonathan Thackray wrote:

    > (Linux, FreeBSD, HP-UX, AIX, Tru64). The next cool feature to add to
    > Linux is sendpath(), which does the open() before the sendfile()
    > all combined into one system call.

    how would sendpath() construct the Content-Length in the HTTP header?

    it's totally unfortunate that the other unixes chose to combine writev()
    into sendfile() rather than implementing TCP_CORK. TCP_CORK is useful for
    FAR more than just sendfile() headers and footers. it's arguably the most
    correct way to write server code. nagle/no-nagle in the default BSD API
    both suck -- nagle because it delays packets which need to be sent;
    no-nagle because it can send incomplete packets.

    i'm completely happy that linus, davem and ingo refused to combine
    writev() into sendfile() and suggested CORK when i pointed out the
    header/trailer problem.

    imnsho if you want to optimise static file serving then it's pretty
    pointless to continue working in userland. nobody is going to catch up
    with all the kernel-side implementations in linux, NT, and solaris.


    p.s. linus, apache-1.3 does *not* use sendfile(). it's in apache-2.0,
    which unfortunately is now performing like crap because they didn't listen
    to some of my advice well over a year ago. a case of "let's make a pretty
    API and hope performance works out"... where i told them "i've already
    written code using the API you suggest, and it *doesn't* work." </rant>
    thankfully linux now has TUX.

    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:28    [W:0.042 / U:1.952 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site