lkml.org 
[lkml]   [2000]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: TCP push missing with writev()
    On Thu, 30 Nov 2000, David S. Miller wrote:

    > vector[ 1 ].iov_base = NULL;
    > vector[ 1 ].iov_len = 0;
    >
    > "Don't do that" :-)
    >
    > I'll doubt I will bother to fix it (it's not %100 trivial to fix and
    > it will put a cost into a hot path). Even if I did, you're going to
    > need to fix Zeus not to do writev's with empty iovec's like this so
    > that you get the PSH's in current kernels.

    Its OK, our web server currently doesn't have this problem :)

    I ran into the problem developing code that wrote data out of a circular
    buffer - so the data being written may potentially be in two sections if
    the buffer wraps around. A generic writev() call then emptied as much data
    out of the buffer as possible, and so tripping the bug. I guess what I'm saying
    is that you don't have to have plain dumb code (like the example code I
    gave) in order to hit this problem.

    Paranoia check: can this bug occur with writev() and other combinations of
    sizes, or is it only when there is a 0-length buffer in there?


    Ben

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:49    [W:0.020 / U:5.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site