git: if: Use critical section on ifnet.if_start path

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Tue Jan 7 03:59:49 PST 2014


commit ac7fc6f053a83466adad627e03f401b92a97a3c8
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Sat Jan 4 14:57:49 2014 +0800

    if: Use critical section on ifnet.if_start path
    
    This is mainly used to avoid contention on serializer between netisr
    and ithread on the same CPU, when ithread preempts netisr which holds
    serializer that ithread wants to aquire.
    
    This kind of contention is found by analysing ktr(9) log of the
    serializer operations.
    
    Tested on 8 HT (i7-3770) box, using kq_accept_server/kq_connect_client:
    - 4/4 TX/RX rings device (BCM5719, using MSI-X), slight improvement.
    - 8/8 TX/RX rings device (Intel 82580, using MSI-X), slight improvement.
    - 1/2 TX/RX rings device (Intel 82599, using MSI), slight improvement.

Summary of changes:
 sys/net/if.c | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list