diff options
author | andre <andre@FreeBSD.org> | 2012-10-23 14:19:44 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2012-10-23 14:19:44 +0000 |
commit | c59c83ebb642fb4ddc42d1b3751f7a3ae9d988d5 (patch) | |
tree | 4848262a032268fc91305f42115a6fc533b05b91 /sys/kern/subr_uio.c | |
parent | 81fc16a6d6a61bd26449e1373e7b8e3d4b48c46d (diff) | |
download | FreeBSD-src-c59c83ebb642fb4ddc42d1b3751f7a3ae9d988d5.zip FreeBSD-src-c59c83ebb642fb4ddc42d1b3751f7a3ae9d988d5.tar.gz |
Replace the ill-named ZERO_COPY_SOCKET kernel option with two
more appropriate named kernel options for the very distinct
send and receive path.
"options SOCKET_SEND_COW" enables VM page copy-on-write based
sending of data on an outbound socket.
NB: The COW based send mechanism is not safe and may result
in kernel crashes.
"options SOCKET_RECV_PFLIP" enables VM kernel/userspace page
flipping for special disposable pages attached as external
storage to mbufs.
Only the naming of the kernel options is changed and their
corresponding #ifdef sections are adjusted. No functionality
is added or removed.
Discussed with: alc (mechanism and limitations of send side COW)
Diffstat (limited to 'sys/kern/subr_uio.c')
-rw-r--r-- | sys/kern/subr_uio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 7895fcf..d518cc3 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_extern.h> #include <vm/vm_page.h> #include <vm/vm_map.h> -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW #include <vm/vm_object.h> #endif @@ -66,7 +66,7 @@ SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, static int uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault); -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW /* Declared in uipc_socket.c */ extern int so_zero_copy_receive; @@ -128,7 +128,7 @@ retry: vm_map_lookup_done(map, entry); return(KERN_SUCCESS); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_SEND_COW */ int copyin_nofault(const void *udaddr, void *kaddr, size_t len) @@ -261,7 +261,7 @@ uiomove_frombuf(void *buf, int buflen, struct uio *uio) return (uiomove((char *)buf + offset, n, uio)); } -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_RECV_PFLIP /* * Experimental support for zero-copy I/O */ @@ -356,7 +356,7 @@ uiomoveco(void *cp, int n, struct uio *uio, int disposable) } return (0); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_RECV_PFLIP */ /* * Give next character to user as result of read. |