PERFORCE change 128745 for review
Robert Watson
rwatson at FreeBSD.org
Tue Nov 6 08:42:37 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=128745
Change 128745 by rwatson at rwatson_fledge on 2007/11/06 16:42:16
Update two comments.
Affected files ...
.. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#21 edit
Differences ...
==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#21 (text+ko) ====
@@ -74,7 +74,8 @@
* sf_bufs. Even though the memory is contiguous in user space, it may not
* be mapped contiguously in the kernel (i.e., a set of physically
* non-contiguous pages in the direct map region) so we must implement
- * scatter-gather copying.
+ * scatter-gather copying. One significant mitigating factor is that on
+ * systems with a direct memory map, we can avoid TLB misses.
*
* At the front of the shared memor region is a bpf_zbuf_header, which
* contains shared control data to allow user space and the kernel to
@@ -402,9 +403,8 @@
}
/*
- * For now, allow bpfread() to rotate the buffers, but don't perform a copy
- * operation or return a value. If we want to copy, we'll need to implement
- * scatter-gather copying with a series of uiomove calls here.
+ * read() is unimplemented for zero-copy BPF buffers, even though in
+ * principle you could combine the two semantics.
*/
int
bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, u_int len,
More information about the p4-projects
mailing list