Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 2003 20:04:01 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        harti@freebsd.org
Cc:        John Polstra <jdp@polstra.com>
Subject:   Re: realtime problem
Message-ID:  <20030409200025.K472@odysseus.silby.com>
In-Reply-To: <20030409211302.S1322@beagle.fokus.fraunhofer.de>
References:  <20030409114957.GN83126@cicely9.cicely.de> <200304091900.h39J0igT063938@strings.polstra.com> <20030409211302.S1322@beagle.fokus.fraunhofer.de>

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-1288989415-1049936641=:472
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Wed, 9 Apr 2003, Harti Brandt wrote:

> I first discovered this with the xl driver. Mike Silbersack commited a

Hmmm, someone has summoned me?

Here's the patch I started and stopped working on a few months back.  As
you can see, it's small, but it reduces the amount of time spent in
mii_tick _greatly_.  Most specifically, it doesn't waste time reading the
BMSR register twice, because even reading it twice doesn't mean that we
don't lose the race!  In addition, it takes advantage of the fact that
since the link status bit is latch low, we do not need to proceed any
further if it's still high, thereby saving another few register accesses.

Harti, you're more than welcome to investigate and see if those changes
reduce delay for you. :)

Mike "Silby" Silbersack
--0-1288989415-1049936641=:472
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="mii-linkstatuschanges.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <20030409200401.C472@odysseus.silby.com>
Content-Description: 
Content-Disposition: attachment; filename="mii-linkstatuschanges.patch"

ZGlmZiAtdSAtciAvdXNyL3NyYy9zeXMub2xkL2Rldi9taWkvZXhwaHkuYyAv
dXNyL3NyYy9zeXMvZGV2L21paS9leHBoeS5jDQotLS0gL3Vzci9zcmMvc3lz
Lm9sZC9kZXYvbWlpL2V4cGh5LmMJU2F0IERlYyAyMSAwMTo1NTowOCAyMDAy
DQorKysgL3Vzci9zc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vici5jIC91c3Ivc3JjL3N5cy9kZXYvbWlpL3VrcGh5
X3N1YnIuYw0KLS0tIC91c3Ivc3JjL3N5cy5vbGQvZGV2L21paS91a3BoeV9z
dWJyLmMJU2F0IERlYyAyMSAwMTo1NTowOCAyMDAyDQorKysgL3Vzci9zcmMv
c3lzL2Rldi9taWkvdWtwaHlfc3Vici5jCVR1ZSBEZWMgMjQgMTY6MDk6MDMg
MjAwMg0KQEAgLTc0LDcgKzc0LDIwIEBADQogCW1paS0+bWlpX21lZGlhX3N0
YXR1cyA9IElGTV9BVkFMSUQ7DQogCW1paS0+bWlpX21lZGlhX2FjdGl2ZSA9
IElGTV9FVEhFUjsNCiANCi0JYm1zciA9IFBIWV9SRUFEKHBoeSwgTUlJX0JN
U1IpIHwgUEhZX1JFQUQocGh5LCBNSUlfQk1TUik7DQorCWJtc3IgPSBQSFlf
UkVBRChwaHksIE1JSV9CTVNSKTsNCisNCisNCisJLyogTGluayBzdGF0dXMg
aXMgbGF0Y2hlZCwgc28gaWYgd2UgcmVhZCBhIDEsIG5vdGhpbmcgaGFzIGNo
YW5nZWQuICovDQorCWlmICgoYm1zciAmIEJNU1JfTElOSykgJiYgKGJtc3Ig
JiBCTVNSX0FDT01QKSAmJg0KKwkJKG1paS0+bWlpX21lZGlhX3N0YXR1cyAm
IElGTV9BQ1RJVkUpKQ0KKwkJcmV0dXJuOw0KKw0KKwlpZiAoIShibXNyICYg
Qk1TUl9MSU5LKSkNCisJCXByaW50ZigiTGluayBoYWQgZmFpbGVkIHJlY2Vu
dGx5LlxuIik7DQorDQorCWJtc3IgPSBQSFlfUkVBRChwaHksIE1JSV9CTVNS
KTsNCisJDQorDQogCWlmIChibXNyICYgQk1TUl9MSU5LKQ0KIAkJbWlpLT5t
aWlfbWVkaWFfc3RhdHVzIHw9IElGTV9BQ1RJVkU7DQogDQo=

--0-1288989415-1049936641=:472--



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