PERFORCE change 114152 for review
Christian S.J. Peron
csjp at FreeBSD.org
Wed Feb 7 05:01:34 UTC 2007
Change 114152 by csjp at csjp_rnd01 on 2007/02/07 05:01:04
Annotate that in the future before we issue wakesup, we might do something like:
(1) Check to see if this descriptor is operating in immediate mode
(2) Check to see if the holder buffer is NULL
(3) Check to see if we are waking up any sleepers
We do not need to check the store buffer, as the fact that it has data in it
at this point in the code is invariant.
If the following conditions are true, then rotate the buffer. This will save
userspace from issuing an ioctl(2) potentially per wakeup.
Affected files ...
.. //depot/projects/zcopybpf/src/sys/net/bpf.c#14 edit
==== //depot/projects/zcopybpf/src/sys/net/bpf.c#14 (text+ko) ====
@@ -1760,6 +1760,11 @@
(*cpfn)(d, d->bd_sbuf, curlen + hdrlen, pkt, hdr.bh_caplen);
d->bd_slen = curlen + totlen;
+ * XXXCSJP we could probably save a syscall per wakeup if we check the
+ * d->bd_immediate flag, hold buffer status and rotate the buffers
+ * before the wakeup.
More information about the p4-projects