[lkml]   [2003]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: seq_file and exporting dynamically allocated data
    On Mon, Nov 17, 2003 at 08:21:34AM +0000, Tigran Aivazian wrote:
    > Now, since there is no way to detect EOF, other than by reading an extra
    > page and discovering that it belongs to the next iteration, we have to do
    > the lseek(fd, 0, SEEK_SET) anyway.
    > So, the "auto-rewinding" read would only help the cases where application
    > doesn't need to differentiate between samples and is happy to just
    > continuously read chunks packed into pages one by one as fast as
    > possible. In this case it doesn't need to lseek to 0, so auto-rewinding on
    > kernel side would prevent it from slowing down.

    If you're going to repeatedly read from 0 pread() sounds like a good
    alternative to read() + lseek(), plus no kernel changes required to
    get rid of the lseek().

    -- wli
    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 13:58    [W:0.020 / U:119.888 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site