DragonFly commits List (threaded) for 2012-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: sockbuf: Pre-alloc sockbuf space, so asynchronized pru_send could be used.
commit f786a6ac5c46366d76322e2580f68a8c21dcc07b
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date: Sun Jan 22 21:29:29 2012 +0800
sockbuf: Pre-alloc sockbuf space, so asynchronized pru_send could be used.
When doing asynchronized pru_send, it is quite possible that we could
break the send sockbuf's upper limit, if we only use ssb_space() to
calculate the remaining sockbuf space.
Now, we add another two counters into sockbuf, when we send a mbuf
chain to the netisr, we update the these two counters to reflect how
much mbufs will be pending on the send sockbuf. When calculating the
remaining space of the send sockbuf we also take these two counters
into consideration, so we will not break the upper limit of the send
sockbuf. These two counter will also be updated when the mbufs in
the sockbuf is to be dropped/freed.
Reenable the asynchronized pru_send in sendfile and sosendtcp
Summary of changes:
sys/kern/uipc_sockbuf.c | 13 +++++++++++++
sys/kern/uipc_socket.c | 6 ++++--
sys/kern/uipc_syscalls.c | 15 ++++++++++++---
sys/netinet/tcp_input.c | 2 +-
sys/sys/sockbuf.h | 31 +++++++++++++++++++++++++++++--
sys/sys/socketvar.h | 35 +++++++++++++++++++++++++++++++++++
6 files changed, 94 insertions(+), 8 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f786a6ac5c46366d76322e2580f68a8c21dcc07b
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]