netdev
[Top] [All Lists]

sendfile64() anyone? (was [RESEND] tuning linux for high network perform

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: sendfile64() anyone? (was [RESEND] tuning linux for high network performance?)
From: Roy Sigurd Karlsbakk <roy@xxxxxxxxxxxxx>
Date: Thu, 24 Oct 2002 12:30:46 +0200
Cc: bert hubert <ahu@xxxxxxx>, netdev@xxxxxxxxxxx, Kernel mailing list <linux-kernel@xxxxxxxxxxxxxxx>
In-reply-to: <1035432669.9628.1.camel@xxxxxxxxxxxxx>
Organization: ProntoTV AS
References: <200210231218.18733.roy@xxxxxxxxxxxxx> <200210231542.48673.roy@xxxxxxxxxxxxx> <1035432669.9628.1.camel@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: KMail/1.4.1
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 
-D_FILE_OFFSET_BITS=64?

(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
gcc -D_DEBUG -Wall -W -D_GNU_SOURCE -D_NO_DIR_ACCESS -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -DUSE_O_DIRECT -DINETD -Wno-unused -O0 -ggdb -c 
sendfile_test.c
In file included from sendfile_test.c:1:
/usr/include/sys/sendfile.h:26: #error "<sys/sendfile.h> cannot be used with 
_FILE_OFFSET_BITS=64"
make: *** [sendfile_test.o] Error 1

-- 
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

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



<Prev in Thread] Current Thread [Next in Thread>