DragonFly BSD
DragonFly commits List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: sosendudp: Try to optimize out the additional mbuf alloc on output path


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Nov 2012 22:43:27 -0800 (PST)

commit f5991d1f6f129c4fbf395d86ee27f35a8ad21ba8
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date:   Thu Nov 29 13:55:02 2012 +0800

    sosendudp: Try to optimize out the additional mbuf alloc on output path
    
    This optimization leaves enough space at the beginning of the mbuf, so
    later on M_PREPEND() probably will not allocate addition mbuf.
    
    This probably will not benefit any data that will be fragmented, e.g. by
    IPv4, so this optimization is only performed when the size of data and
    max size of protocol+link headers fit into one mbuf cluster.
    
    This optimization could be turned off by net.inet.udp.sosend_prepend,
    which is on by default.

Summary of changes:
 sys/kern/uipc_socket.c   |   42 +++++++++++++++++++++++++++++++++++++++---
 sys/netinet/udp_usrreq.c |    5 +++++
 2 files changed, 44 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f5991d1f6f129c4fbf395d86ee27f35a8ad21ba8


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]