sendfile in FreeBSD 2.2
Julian Elischer
julian at elischer.org
Wed May 21 12:12:03 PDT 2003
> Hello. Would it be possible to port the sendfile system call to a FreeBSD 2.2 based system? Has anyone done this? I am trying to port the code from a later FreeBSD release and I have been unable to find out what the VOP_GETVOBJECT() macro does and how/what should it be replaced with for my case. Any help is appreciated.
>
> Thanks
> vijay
>
It's not impossible that you could do it.
sendfile was introduced just after 3.0 and quite a bit before 3.1
I don't know however how much vm hacking was required to get it to
work..
here is the actual commit message..
this will tell you what was changed.. and at what revision..
What are the chances Nokia would move to a newer version? :-)
good luck
dg 1998/11/05 06:28:27 PST
Modified files:
sys/conf options param.c
sys/kern init_sysent.c syscalls.c syscalls.master
uipc_syscalls.c
sys/sys mbuf.h socket.h socketvar.h
syscall-hide.h syscall.h syscall.mk
sysproto.h
sys/vm vm_object.c
Log:
Implemented zero-copy TCP/IP extensions via sendfile(2) - send a
file to a stream socket. sendfile(2) is similar to implementations in
HP-UX, Linux, and other systems, but the API is more extensive and
addresses many of the complaints that the Apache Group and others have
had with those other implementations. Thanks to Marc Slemko of the
Apache Group for helping me work out the best API for this.
Anyway, this has the "net" result of speeding up sends of files over
TCP/IP sockets by about 10X (that is to say, uses 1/10th of the CPU
cycles) when compared to a traditional read/write loop.
Revision Changes Path
1.107 +2 -1 src/sys/conf/options
1.31 +7 -1 src/sys/conf/param.c
1.61 +1 -0 src/sys/kern/init_sysent.c
1.54 +1 -0 src/sys/kern/syscalls.c
1.54 +3 -1 src/sys/kern/syscalls.master
1.42 +403 -1 src/sys/kern/uipc_syscalls.c
1.30 +2 -1 src/sys/sys/mbuf.h
1.27 +12 -1 src/sys/sys/socket.h
1.30 +8 -1 src/sys/sys/socketvar.h
1.48 +1 -0 src/sys/sys/syscall-hide.h
1.52 +2 -1 src/sys/sys/syscall.h
1.7 +2 -1 src/sys/sys/syscall.mk
1.42 +10 -0 src/sys/sys/sysproto.h
1.135 +1 -3 src/sys/vm/vm_object.c
dg 1998/11/05 06:36:38 PST
Modified files:
sys/i386/conf LINT
Log:
Document the new NSFBUFS option.
Revision Changes Path
1.498 +8 -1 src/sys/i386/conf/LINT
On Wed, 21 May 2003 Vijay.Singh at nokia.com wrote:
More information about the freebsd-hackers
mailing list