Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 2003 18:13:48 -0400 (EDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/net netisr.c
Message-ID:  <Pine.NEB.3.96L.1031001180240.16031Q-300000@fledge.watson.org>
In-Reply-To: <200310012131.h91LV9fd042464@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1999649479-1065046428=:16031
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Wed, 1 Oct 2003, Robert Watson wrote:

>   Enable net.isr.enable by default, causing "delivery to completion"
>   (direct dispatch) in interrupt threads when the netisr in question
>   isn't already active.  If a netisr is already active, or direct
>   dispatch is already in progress, we queue the packet for later
>   delivery.  Previously, this option was disabled by default.  I have
>   measured 20%+ performance improvements in IP packet forwarding with
>   this enabled.
>   
>   Please report any problems ASAP, especially relating to stack depth or
>   out-of-order packet processing.
>   
>   Discussed with: jlemon, peter
>   Sponsored by:   DARPA, Network Associates Laboratories

FYI: In my e-mail communication with Jonathan, we concluded this was safe
to commit.  Since then, two concerns have come up: 

(1) Potential lock order interactions.  I believe these are OK given the 
    current model of dropping the driver lock before entering the
    interface input routines.  However, since the ground doesn't appear to
    be firm here quite yet...

(2) Potential out-of-order delivery if a packet is delayed and ends up in
    the netisr queue, and is bypassed by a following packet which is
    delivered first by virtue of direct dispatch, which can have negative
    consequences for TCP in lossy situations if the timing is poor.

    I've attached two patches: one that simply defers the dispatch again
    if there's the potential for reordering.  The other drains the netisr
    queue before processing the new mbuf.  Both have potential downsides,
    and neither is tested.  (I'll do that when I get home this evening),
    but I'm virtually in transit as I write this :-).

I'm going to back out this change for now, but would like to merge it
again once we're sure any potential issues have been resolved.  In the
mean time, I think it would be very useful if people interested in network
performance could run with net.isr.enable enabled, and pick zero or one of
the patches to apply.  This evening I'll run lossy TCP performance
measurements with a packet sniffer and timing tweaks, and see what I bump
into.  I'm hopeful we can enable this by default shortly, as the
performance benefit is substantial. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories


--0-1999649479-1065046428=:16031
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="netisr.c.defer"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.3.96L.1031001181348.16031R@fledge.watson.org>
Content-Description: 

SW5kZXg6IG5ldGlzci5jDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1Mg
ZmlsZTogL2hvbWUvbmN2cy9zcmMvc3lzL25ldC9uZXRpc3IuYyx2DQpyZXRy
aWV2aW5nIHJldmlzaW9uIDEuNA0KZGlmZiAtdSAtcjEuNCBuZXRpc3IuYw0K
LS0tIG5ldGlzci5jCTEgT2N0IDIwMDMgMjE6MzE6MDkgLTAwMDAJMS40DQor
KysgbmV0aXNyLmMJMSBPY3QgMjAwMyAyMjoxMTowNCAtMDAwMA0KQEAgLTEx
OCw4ICsxMTgsNiBAQA0KICAgICAmaXNyc3RhdC5pc3JzX2RpcmVjdGVkLCAw
LCAiIik7DQogU1lTQ1RMX0lOVChfbmV0X2lzciwgT0lEX0FVVE8sIGRlZmVy
cmVkLCBDVExGTEFHX1JELCANCiAgICAgJmlzcnN0YXQuaXNyc19kZWZlcnJl
ZCwgMCwgIiIpOw0KLVNZU0NUTF9JTlQoX25ldF9pc3IsIE9JRF9BVVRPLCBi
eXBhc3NlZCwgQ1RMRkxBR19SRCwgDQotICAgICZpc3JzdGF0LmlzcnNfYnlw
YXNzZWQsIDAsICIiKTsNCiBTWVNDVExfSU5UKF9uZXRfaXNyLCBPSURfQVVU
TywgcXVldWVkLCBDVExGTEFHX1JELCANCiAgICAgJmlzcnN0YXQu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mluZyBncmFiYmVkIGENCisJCSAqIG11dGV4
IG9uZSBhZGRpdGlvbmFsIHRpbWUuDQogCQkgKi8NCi0JCWlmIChfSUZfUUxF
TihuaS0+bmlfcXVldWUpID4gMCkNCi0JCQlpc3JzdGF0LmlzcnNfYnlwYXNz
ZWQrKzsNCi0JCW5pLT5uaV9oYW5kbGVyKG0pOw0KKwkJZGVmZXIgPSAwOw0K
KwkJaWYgKF9JRl9RTEVOKG5pLT5uaV9xdWV1ZSkgPiAwKSB7DQorCQkJaXNy
c3RhdC5pc3JzX2RlZmVycmVkKys7DQorCQkJZGVmZXIgPSAxOw0KKwkJfSBl
bHNlIHsNCisJCQlpc3JzdGF0LmlzcnNfZGlyZWN0ZWQrKzsNCisJCQluaS0+
bmlfaGFuZGxlcihtKTsNCisJCX0NCiAJCW10eF91bmxvY2soJm5ldGlzcl9t
dHgpOw0KKwkJaWYgKGRlZmVyICYmIElGX0hBTkRPRkYobmktPm5pX3F1ZXVl
LCBtLCBOVUxMKSkNCisJCQlzY2hlZG5ldGlzcihudW0pOw0KIAl9IGVsc2Ug
ew0KIAkJaXNyc3RhdC5pc3JzX2RlZmVycmVkKys7DQogCQlpZiAoSUZfSEFO
RE9GRihuaS0+bmlfcXVldWUsIG0sIE5VTEwpKQ0K
--0-1999649479-1065046428=:16031
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="netisr.c.process"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.3.96L.1031001181348.16031S@fledge.watson.org>
Content-Description: 

LyotDQogKiBDb3B5cmlnaHQgKGMpIDIwMDEsMjAwMiwyMDAzIEpvbmF0aGFu
IExlbW9uIDxqbGVtb25ARnJlZUJTRC5vcmc+DQogKiBDb3B5cmlnaHQgKGMp
IDE5OTcsIFN0ZWZhbiBFc3NlciA8c2VAZnJlZWJzZC5vcmc+DQogKiBBbGwg
cmlnaHRzIHJlc2VydmVkLg0KICoNCiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1
c2UgaW4g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fcmVhZGFuZGNsZWFyX2ludCgmbmV0aXNyKTsNCgkJaWYg
KGJpdHMgPT0gMCkNCgkJCWJyZWFrOw0KCQl3aGlsZSAoKGkgPSBmZnMoYml0
cykpICE9IDApIHsNCgkJCWlzcnN0YXQuaXNyc19zd2lfY291bnQrKzsNCgkJ
CWktLTsNCgkJCWJpdHMgJj0gfigxIDw8IGkpOw0KCQkJbmkgPSAmbmV0aXNy
c1tpXTsNCgkJCWlmIChuaS0+bmlfaGFuZGxlciA9PSBOVUxMKSB7DQoJCQkJ
cHJpbnRmKCJzd2lfbmV0OiB1bnJlZ2lzdGVyZWQgaXNyICVkLlxuIiwgaSk7
DQoJCQkJY29udGludWU7DQoJCQl9DQoJCQlpZiAobmktPm5pX3F1ZXVlID09
IE5VTEwpDQoJCQkJbmktPm5pX2hhbmRsZXIoTlVMTCk7DQoJCQllbHNlDQoJ
CQkJc3dpX3Byb2Nlc3NxdWV1ZShuaSk7DQoJCX0NCgl9IHdoaWxlIChwb2xs
aW5nKTsNCgltdHhfdW5sb2NrKCZuZXRpc3JfbXR4KTsNCn0NCg0Kc3RhdGlj
IHZvaWQNCnN0YXJ0X25ldGlzcih2b2lkICpkdW1teSkNCnsNCg0KCW10eF9p
bml0KCZuZXRpc3JfbXR4LCAibmV0aXNyIGxvY2siLCBOVUxMLCBNVFhfREVG
KTsNCglpZiAoc3dpX2FkZChOVUxMLCAibmV0Iiwgc3dpX25ldCwgTlVMTCwg
U1dJX05FVCwgMCwgJm5ldF9paCkpDQoJCXBhbmljKCJzdGFydF9uZXRpc3Ii
KTsNCn0NClNZU0lOSVQoc3RhcnRfbmV0aXNyLCBTSV9TVUJfU09GVElOVFIs
IFNJX09SREVSX0ZJUlNULCBzdGFydF9uZXRpc3IsIE5VTEwpDQo=
--0-1999649479-1065046428=:16031--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1031001180240.16031Q-300000>