Date: Thu, 4 Nov 2010 21:31:30 -0400 (EDT) From: Rick Macklem <rmacklem@uoguelph.ca> To: pyunyh@gmail.com Cc: freebsd-current@freebsd.org Subject: Re: re(4) driver dropping packets when reading NFS files Message-ID: <430617549.130565.1288920690389.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20101104003906.GC14740@michelle.cdnetworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_130564_31585594.1288920690387 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit > > If the counter was not wrapped, it seem you lost more than 10% out of > total RX frames. This is a lot loss and there should be a way to > mitigate it. > I've attached a patch (to the if_re.c in head, not your patched variant) that works a lot better (about 5Mbytes/sec read rate). To get that, I had to disable msi and not clear the RL_IMR register in re_intr(). I suspect that a packet would be received between when the bits in RL_IMR were cleared and when they were set at the end of re_int_task() and those were getting lost. This patch doesn't completely fix the problem. (I added your stats collecting stuff to the if_re.c in head and attached the result, which still shows some lost packets. One thought is clearing the bits in RL_ISR in re_intr() instead of re_int_task(), but then I can't see a good way to pass the old value of the status reg. through to re_int_task()? The patch doesn't help when msi is enabled and when I played with your patched variant, I got it to hang when RL_IMR wasn't cleared. I've attached the patch and stats. I might play around with it some more tomorrow, rick ps: If you have hardware to test re with, you want to do an NFS mount and then read a large file when nothing else is happening on the machine, to see if you can reproduce the problem. pss: All tests done with a kernel that does not have option DEVICE_POLLING. ------=_Part_130564_31585594.1288920690387 Content-Type: text/x-patch; name=if_re.c.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=if_re.c.patch LS0tIGlmX3JlLmMub3JpZwkyMDEwLTExLTAzIDE4OjQ5OjI5LjAwMDAwMDAwMCAtMDQwMA0KKysr IGlmX3JlLmMJMjAxMC0xMS0wNCAyMTowNDozNC4wMDAwMDAwMDAgLTA0MDANCkBAIC0xNTYsNyAr MTU2LDcgQEANCiAjaW5jbHVkZSAibWlpYnVzX2lmLmgiDQogDQogLyogVHVuYWJsZXMuICovDQot c3RhdGljIGludCBtc2lfZGlzYWJsZSA9IDA7DQorc3RhdGljIGludCBtc2lfZGlzYWJsZSA9IDE7 DQogVFVOQUJMRV9JTlQoImh3LnJlLm1zaV9kaXNhYmxlIiwgJm1zaV9kaXNhYmxlKTsNCiBzdGF0 aWMgaW50IHByZWZlcl9pb21hcCA9IDA7DQogVFVOQUJMRV9JTlQoImh3LnJlLnByZWZlcl9pb21h cCIsICZwcmVmZXJfaW9tYXApOw0KQEAgLTIxNzksNyArMjE3OSw2IEBADQogCXN0YXR1cyA9IENT Ul9SRUFEXzIoc2MsIFJMX0lTUik7DQogCWlmIChzdGF0dXMgPT0gMHhGRkZGIHx8IChzdGF0dXMg JiBSTF9JTlRSU19DUExVUykgPT0gMCkNCiAgICAgICAgICAgICAgICAgcmV0dXJuIChGSUxURVJf U1RSQVkpOw0KLQlDU1JfV1JJVEVfMihzYywgUkxfSU1SLCAwKTsNCiANCiAJdGFza3F1ZXVlX2Vu cXVldWVfZmFzdCh0YXNrcXVldWVfZmFzdCwgJnNjLT5ybF9pbnR0YXNrKTsNCiANCg== ------=_Part_130564_31585594.1288920690387 Content-Type: text/plain; name=newre.stats Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=newre.stats cmUwIHN0YXRpc3RpY3M6DQpUcmFuc21pdCBnb29kIGZyYW1lcyA6IDgzMzIwDQpSZWNlaXZlIGdv b2QgZnJhbWVzIDogMTM2MTU4DQpUeCBlcnJvcnMgOiAwDQpSeCBlcnJvcnMgOiAwDQpSeCBtaXNz ZWQgZnJhbWVzIDogMjY2Ng0KUnggZnJhbWUgYWxpZ25tZW50IGVycnMgOiAwDQpUeCBzaW5nbGUg Y29sbGlzaW9ucyA6IDANClR4IG11bHRpcGxlIGNvbGxpc2lvbnMgOiAwDQpSeCB1bmljYXN0IGZy YW1lcyA6IDEzNjE1Nw0KUnggYnJvYWRjYXN0IGZyYW1lcyA6IDANClJ4IG11bHRpY2FzdCBmcmFt ZXMgOiAxDQpUeCBhYm9ydHMgOiAwDQpUeCB1bmRlcnJ1bnMgOiAwDQo= ------=_Part_130564_31585594.1288920690387--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?430617549.130565.1288920690389.JavaMail.root>