[lkml]   [2004]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch rfc] towards supporting O_NONBLOCK on regular files
    On Oct 17, 2004, Ingo Molnar <> wrote:

    > I.e. the readahead-kicking is necessary after all, because
    > squid apparently assumes that re-trying a read will eventually succeed.

    I'm not sure it assumes that. It definitely expects read to succeed
    if poll says there is data available from the file, though, and having
    poll return that there is data, and then having read fail because
    there isn't anything there, so that you go back to poll, is a recipe
    for wasting CPU. I do think read should kick in readahead, yes, but
    so should poll, if the process says it wants to read from the file,
    and poll should not return (or not say data is available) unless an
    immediate, atomic call to read would actually return some data. Of
    course, if the data happens to be elicited from memory between the
    poll and read calls, it's legitimate for read to fail with -EAGAIN,
    but this shouldn't happen very often.

    Alexandre Oliva
    Red Hat Compiler Engineer aoliva@{,}
    Free Software Evangelist oliva@{,}
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:07    [W:0.020 / U:135.980 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site