git: udp: Optimize detach path

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Mon Sep 29 05:25:54 PDT 2014


commit 684247a4618a7ee47413216b43509d2816d6f399
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Sep 29 20:18:46 2014 +0800

    udp: Optimize detach path
    
    If the inpcb was never put onto wildcard hash and the multicast options
    were never accessed nor modified, we could directly dispose the inpcb
    on detach path instead of going through all netisrs to make sure that
    it is no longer being accessed.
    
    After this commit 'kq_connect_client -u' gives ~180Kconns/s instead of
    ~160Kconns/s (~12% improvement).

Summary of changes:
 sys/netinet/in_pcb.h     |  2 +-
 sys/netinet/in_proto.c   |  2 +-
 sys/netinet/udp_usrreq.c | 41 +++++++++++++++++++++++++++++++++++++++++
 sys/netinet/udp_var.h    |  1 +
 4 files changed, 44 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/684247a4618a7ee47413216b43509d2816d6f399


-- 
DragonFly BSD source repository


More information about the Commits mailing list