Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Nov 2006 17:19:02 -0800
From:      "Jack Vogel" <jfvogel@gmail.com>
To:        "Scott Long" <scottl@samsco.org>, "Gleb Smirnoff" <glebius@freebsd.org>,  "John Baldwin" <jhb@freebsd.org>, RelEng <re@freebsd.org>,  "Prafulla Deuskar" <pdeuskar@freebsd.org>,  freebsd-stable@freebsd.org, freebsd-net <freebsd-net@freebsd.org>
Subject:   Proposed 6.2 em RELEASE patch
Message-ID:  <2a41acea0611081719h31be096eu614d2f2325aff511@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
------=_Part_35052_20023030.1163035142787
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

This patch is an evolution of the last one I sent out. It has
a couple of minor corrections, like a bad forward decl in
the header.

The last patch has had quite a bit of testing and all reports
have been positive.  The only complaint was from Gleb who
says he needs to keep his beloved infinite for loop in the
interrupt handler, well I have a better one for you Gleb, keep
reading.

I have also been doing some extreme stress testing using
SmartBits, and discovered the driver as it stands is really
not able to take extreme receive side pounding, Scott
pointed out that this is why the FAST_INTR work was done :)

There were some people that had stability issues with that
work, but there were also many that did not. I actually
merged the FAST code onto my last patch, and ran the
SB stress and found it really was able to gracefully handle
that load, way to go Scott :)

I've pondered this situation, and this patch I'm including here
today is the result. Here's what it does:

If you drop it in place, compile it, and go... you will get the
code that has been tested for a week, it uses the older
style interrupts, it has the watchdog and other SMP fixes
so its been proven.

BUT, I've added the FAST_INTR changes back into the code, so
if you go into your Makefile and add -DEM_FAST_INTR you will
then get the taskqueue stuff.

So, Gleb, rather than replace the infinite for loop that no one
thinks is a good idea, you can just define FAST_INTR again,
and you should be good to go.

I see this as the best thing for the 6.2 RELEASE, it lets us
keep moving forward, people that want max performance
can define EM_FAST_INTR and help us wring out any
problems, it also will mean that I will have our Intel test
group start using this code. But for those that just want
a stable driver the standard compile will still give them that.

The patch I'm including is against BETA3. Let me know of
your concerns or issues.

Cheers,

Jack

------=_Part_35052_20023030.1163035142787
Content-Type: text/x-patch; name="proposed-6.2.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="proposed-6.2.patch"
X-Attachment-Id: f_euaw91bp

ZGlmZiAtTmF1ciBzdGFibGUvZGV2L2VtL2lmX2VtLmMgbmV3cGF0Y2gvZGV2L2VtL2lmX2VtLmMK
LS0tIHN0YWJsZS9kZXYvZW0vaWZfZW0uYwlXZWQgTm92ICA4IDIzOjQyOjIwIDIwMDYKKysrIG5l
d3BhdGNoL2Rldi9lbS9pZl9lbS5jCVdlZCBOb3YgIDggMjM6NDQ6MTYgMjAwNgpAQCAtMjA0LDcg
KzIwNCw3IEBACiBzdGF0aWMgdm9pZAllbV9zdGFydChzdHJ1Y3QgaWZuZXQgKik7CiBzdGF0aWMg
dm9pZAllbV9zdGFydF9sb2NrZWQoc3RydWN0IGlmbmV0ICppZnApOwogc3RhdGljIGludAllbV9p
b2N0bChzdHJ1Y3QgaWZuZXQgKiwgdV9sb25nLCBjYWRkcl90KTsKLXN0YXRpYyB2b2lkCWVtX3dh
dGNoZG9nKHN0cnVjdCBpZm5ldCAqKTsKK3N0YXRpYyB2b2lkCWVtX3dhdGNoZG9nKHN0cnVjdCBh
ZGFwdGVyICopOwogc3RhdGljIHZvaWQJZW1faW5pdCh2b2lkICopOwogc3RhdGljIHZvaWQJZW1f
aW5pdF9sb2NrZWQoc3RydWN0IGFkYXB0ZXIgKik7CiBzdGF0aWMgdm9pZAllbV9zdG9wKHZvaWQg
Kik7CkBAIC0yMTIsNiArMjEyLDggQEAKIHN0YXRpYyBpbnQJZW1fbWVkaWFfY2hhbmdlKHN0cnVj
dCBpZm5ldCAqKTsKIHN0YXRpYyB2b2lkCWVtX2lkZW50aWZ5X2hhcmR3YXJlKHN0cnVjdCBhZGFw
dGVyICopOwogc3RhdGljIGludAllbV9hbGxvY2F0ZV9wY2lfcmVzb3VyY2VzKHN0cnVjdCBhZGFw
dGVyICopOworc3RhdGljIG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CSAq
LwogCWlmIChFMTAwMF9SRUFEX1JFRygmYWRhcHRlci0+aHcsIFNUQVRVUykgJiBFMTAwMF9TVEFU
VVNfVFhPRkYpIHsKLQkJaWZwLT5pZl90aW1lciA9IEVNX1RYX1RJTUVPVVQ7Ci0JCUVNX1VOTE9D
SyhhZGFwdGVyKTsKKwkJYWRhcHRlci0+d2F0Y2hkb2dfdGltZXIgPSBFTV9UWF9USU1FT1VUOwog
CQlyZXR1cm47CiAJfQogCiAJaWYgKGVtX2NoZWNrX2Zvcl9saW5rKCZhZGFwdGVyLT5odykgPT0g
MCkKIAkJZGV2aWNlX3ByaW50ZihhZGFwdGVyLT5kZXYsICJ3YXRjaGRvZyB0aW1lb3V0IC0tIHJl
c2V0dGluZ1xuIik7CiAKLQlpZnAtPmlmX2Rydl9mbGFncyAmPSB+SUZGX0RSVl9SVU5OSU5HOwor
CWFkYXB0ZXItPmlmcC0+aWZfZHJ2X2ZsYWdzICY9IH5JRkZfRFJWX1JVTk5JTkc7CiAJYWRhcHRl
ci0+d2F0Y2hkb2dfZXZlbnRzKys7CiAKIAllbV9pbml0X2xvY2tlZChhZGFwdGVyKTsKLQlFTV9V
TkxPQ0soYWRhcHRlcik7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTExMTcsNiArMTE1MiwxMSBA
QAogCiAKICNpZmRlZiBERVZJQ0VfUE9MTElORworLyoqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqICBMZWdh
Y3kgcG9sbGluZyByb3V0aW5lICAKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIHZvaWQKIGVt
X3BvbGwoc3RydWN0IGlmbmV0ICppZnAsIGVudW0gcG9sbF9jbWQgY21kLCBpbnQgY291bnQpCiB7
CkBAIC0xMTQ5LDExICsxMTg5LDE0IEBACiB9CiAjZW5kaWYgLyogREVWSUNFX1BPTExJTkcgKi8K
IAorI2lmbmRlZiBFTV9GQVNUX0lOVFIKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiAgSW50ZXJydXB0
IFNlcnZpY2Ugcm91dGluZSAgCisgKiAgTGVnYWN5IEludGVycnVwdCBTZXJ2aWNlIHJvdXRpbmUg
IAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIEVNX01BWF9JTlRSIDEwCisKIHN0YXRpYyB2
b2lkCiBlbV9pbnRyKHZvaWQgKmFyZykKIHsKQEAgLTExNjIsNyArMTIwNSw2IEBACiAJdWludDMy
X3QJcmVnX2ljcjsKIAogCUVNX0xPQ0soYWRhcHRlcik7Ci0KIAlpZnAgPSBhZGFwdGVyLT5pZnA7
CiAKICNpZmRlZiBERVZJQ0VfUE9MTElORwpAQCAtMTE3MiwyOCArMTIxNCwyNCBAQAogCX0KICNl
bmRpZiAvKiBERVZJQ0VfUE9MTElORyAqLwogCi0JZm9yICg7OykgewotCQlyZWdfaWNyID0gRTEw
MDBfUkVBRF9SRUcoJmFkYXB0ZXItPmh3LCBJQ1IpOwotCQlpZiAoYWRhcHRlci0+aHcubWFjX3R5
cGUgPj0gZW1fODI1NzEgJiYKLQkJICAgIChyZWdfaWNyICYgRTEwMDBfSUNSX0lOVF9BU1NFUlRF
RCkgPT0gMCkKLQkJCWJyZWFrOwotCQllbHNlIGlmIChyZWdfaWNyID09IDApCi0JCQlicmVhazsK
KwlyZWdfaWNyID0gRTEwMDBfUkVBRF9SRUcoJmFkYXB0ZXItPmh3LCBJQ1IpOwogCi0JCS8qCi0J
CSAqIFhYWDogc29tZSBsY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PQ0soYWRhcHRlcik7CiB9CiAKIHN0YXRpYyB2b2lkCkBAIC0yMDg2LDMwICsyMjE5
LDkwIEBACiAJCSAgICAiaW50ZXJydXB0XG4iKTsKIAkJcmV0dXJuIChFTlhJTyk7CiAJfQotCWlm
IChidXNfc2V0dXBfaW50cihkZXYsIGFkYXB0ZXItPnJlc19pbnRlcnJ1cHQsCi0JICAgIElOVFJf
VFlQRV9ORVQgfCBJTlRSX01QU0FGRSwKLQkgICAgKHZvaWQgKCopKHZvaWQgKikpIGVtX2ludHIs
IGFkYXB0ZXIsCi0JICAgICZhZGFwdGVyLT5pbnRfaGFuZGxlcl90YWcpKSB7Ci0JCWRldmljZV9w
cmludGYoZGV2LCAiRXJyb3IgcmVnaXN0ZXJpbmcgaW50ZXJydXB0IGhhbmRsZXIhXG4iKTsKLQkJ
cmV0dXJuKEVOWElPKTsKLQl9CiAKIAlhZGFwdGVyLT5ody5iYWNrID0gJmFkYXB0ZXItPm9zZGVw
OwogCiAJcmV0dXJuICgwKTsKIH0KIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqICBTZXR1cCB0aGUg
YXBwcm9wcmlhdGUgSW50ZXJydXB0IGhhbmRsZXJzLgorICoKKyAqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50
CitlbV9hbGxvY2F0ZV9pbnRyKHN0cnVjdCBhZGFwdGVyICphZGFwdGVyKQoreworCWRldmljZV90
IGRldiA9IGFkYXB0ZXItPmRldjsKKwlpbnQgZXJyb3I7CisKKwkvKiBNYW51YWxseSB0dXJuIG9m
ZiBhbGwgaW50ZXJydXB0cyAqLworCUUxMDAwX1dSSVRFX1JFRygmYWRhcHRlci0+aHcsIElNQywg
MHhmZmZmZmZmZik7CisKKyNpZm5kZWYgRU1fRkFTVF9JTlRSCisJLyogV2UgZG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OworCisjaWZkZWYgRU1fRkFTVF9JTlRS
CisJc3RydWN0IHRhc2sJbGlua190YXNrOworCXN0cnVjdCB0YXNrCXJ4dHhfdGFzazsKKwlzdHJ1
Y3QgdGFza3F1ZXVlICp0cTsKKyNlbmRpZgogCS8qIEluZm8gYWJvdXQgdGhlIGJvYXJkIGl0c2Vs
ZiAqLwogCXVpbnQzMl90CXBhcnRfbnVtOwogCXVpbnQ4X3QJCWxpbmtfYWN0aXZlOwo=
------=_Part_35052_20023030.1163035142787--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2a41acea0611081719h31be096eu614d2f2325aff511>