[lkml]   [2002]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectsendfile64() anyone? (was [RESEND] tuning linux for high network performance?)
    On Thursday 24 October 2002 06:11, David S. Miller wrote:
    > On Wed, 2002-10-23 at 06:42, Roy Sigurd Karlsbakk wrote:
    > > As far as I've understood, sendfile() won't do much good with large
    > > files. Is this right?
    > There is always a benefit to using sendfile(), when you use
    > sendfile() the cpu doesn't touch one byte of the data if
    > the network card support TX checksumming. The disk DMAs
    > to ram, then the net card DMAs from ram. Simple as that.

    Are there any plans of implementing sendfile64() or sendfile() support for

    (from man 2 sendfile)
    ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);

    int main() {
    ssize_t s1;
    size_t count;
    off_t offset;

    printf("sizeof ssize_t: %d\n", sizeof s1);
    printf("sizeof size_t: %d\n", sizeof count);
    printf("sizeof off_t: %d\n", sizeof offset);
    return 0;
    $ make
    $ ./sendfile_test
    sizeof ssize_t: 4
    sizeof size_t: 4
    sizeof off_t: 4

    and - when attempting to build this with -D_FILE_OFFSET_BITS=64

    [roy@roy-sin micro_httpd-O_DIRECT]$ make sendfile_test
    -D_LARGEFILE_SOURCE -DUSE_O_DIRECT -DINETD -Wno-unused -O0 -ggdb -c
    In file included from sendfile_test.c:1:
    /usr/include/sys/sendfile.h:26: #error "<sys/sendfile.h> cannot be used with
    make: *** [sendfile_test.o] Error 1

    Roy Sigurd Karlsbakk, Datavaktmester
    ProntoTV AS -
    Tel: +47 9801 3356

    Computers are like air conditioners.
    They stop working when you open Windows.

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