cvs commit: src/sys/i386/include sf_buf.h src/sys/i386/i386
vm_machdep.c
Alan Cox
alc at FreeBSD.org
Mon Nov 17 10:22:25 PST 2003
alc 2003/11/17 10:22:24 PST
FreeBSD src repository
Modified files:
sys/i386/include sf_buf.h
sys/i386/i386 vm_machdep.c
Log:
- Change the i386's sf_buf implementation so that it never allocates
more than one sf_buf for one vm_page. To accomplish this, we add
a global hash table mapping vm_pages to sf_bufs and a reference
count to each sf_buf. (This is similar to the patches for RELENG_4
at http://www.cs.princeton.edu/~yruan/debox/.)
For the uninitiated, an sf_buf is nothing more than a kernel virtual
address that is used for temporary virtual-to-physical mappings by
sendfile(2) and zero-copy sockets. As such, there is no reason for
one vm_page to have several sf_bufs mapping it. In fact, using more
than one sf_buf for a single vm_page increases the likelihood that
sendfile(2) blocks, hurting throughput.
(See http://www.cs.princeton.edu/~yruan/debox/.)
Revision Changes Path
1.219 +48 -26 src/sys/i386/i386/vm_machdep.c
1.2 +2 -1 src/sys/i386/include/sf_buf.h
More information about the cvs-src
mailing list