if_alc trouble
Hi all, I have strange problem: NIC: a...@pci0:2:0:0:class=0x02 card=0x38a317aa chip=0x10621969 rev=0xc0 hdr=0x00 vendor = 'Attansic (Now owned by Atheros)' device = 'Atheros AR8132 PCI-E Fast Ethernet Controller (AR8132)' class = network subclass = ethernet % uname -a FreeBSD laptop.minsk.domain 9.0-CURRENT FreeBSD 9.0-CURRENT #8 r209973: Tue Jul 13 10:17:08 EEST 2010 r...@laptop.minsk.domain:/usr/obj/usr/src/sys/b450 i386 I'm using if_alc as a kernel module, when I boot with plugged in cable all works fine, but when I booting with unplugged cable - network doesn't work. I'm trying kenv hw.alc.msi_disable=1 and kldload if_alc.. from messages: Aug 13 09:06:12 laptop kernel: alc0: Atheros AR8132 PCIe Fast Ethernet port 0x3000-0x307f mem 0x9610-0x9613 ir q 16 at Ethernet device 0.0 on pci2 Aug 13 09:06:12 laptop kernel: alc0: 15872 Tx FIFO, 15360 Rx FIFO Aug 13 09:06:12 laptop kernel: miibus0: MII bus on alc0 Aug 13 09:06:12 laptop kernel: atphy0: Atheros F1 10/100/1000 PHY PHY 0 on miibus0 Aug 13 09:06:12 laptop kernel: atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Aug 13 09:06:12 laptop kernel: alc0: Ethernet address: 00:1f:16:2e:fa:49 Aug 13 09:06:12 laptop kernel: alc0: [FILTER] Aug 13 09:06:12 laptop kernel: alc0: link state changed to DOWN Aug 13 09:06:15 laptop kernel: alc0: link state changed to UP Aug 13 09:06:15 laptop kernel: alc0: DMA write error! -- resetting Aug 13 09:06:15 laptop kernel: alc0: link state changed to DOWN Aug 13 09:06:16 laptop kernel: alc0: promiscuous mode enabled Aug 13 09:06:17 laptop kernel: alc0: link state changed to UP Aug 13 09:06:18 laptop kernel: alc0: DMA write error! -- resetting Aug 13 09:06:18 laptop kernel: alc0: link state changed to DOWN Aug 13 09:06:20 laptop kernel: alc0: link state changed to UP Aug 13 09:06:21 laptop kernel: alc0: DMA write error! -- resetting how to repeat: 1) boot with unplugged cable (if_alc_load=YES on loader.conf) 2) plug-in cable 3) dhclient alc0 4) tcpdump -ni alc0 -vvv - http://tiger.ipfw.ru/files/tcpdump.txt 5) reboot with plugged cable.. 6) dhclient alc0 [ti...@laptop]~%ifconfig alc0 alc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=c3198VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC,VLAN_HWTSO,LINKSTATE ether 00:1f:16:2e:fa:49 inet 192.168.9.150 netmask 0xff00 broadcast 192.168.9.255 media: Ethernet autoselect (100baseTX full-duplex) status: active now I can unplug cable, unload if_alc, load it again, plug cable -- all works fine.. Thanks in advance -- wbr, tiger ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Official request: Please make GNU grep the default
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Gabor, I hope at this point it goes without saying that I have a lot of respect for the work you've done on BSD grep, and I've already told you that I think you're very courageous for taking the project on. I've been testing and evaluating it for some time now, and I think I've given it a fair trial. You've done a fairly good job of responding to bug reports, and I understand that the exposure BSD grep has received as the default in HEAD has been very valuable in exposing additional areas that need work. However, with all that in mind I am officially asking you to please change the default in HEAD to GNU grep. (Note, I am _not_ asking you to remove BSD grep from the tree, just to change the default.) My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds I ran the test over a dozen times, _after_ running it a few times to eliminate caching issues. I realize that a key rationale for making it the default at this time is to get it more exposure in order to find and fix any bugs/incompatibilities with GNU grep. However, at this time the massive difference in performance clearly means that it's not suitable as the default for 9-RELEASE, so even if you were to fix every single _other_ problem (aside from performance) it wouldn't matter. That, combined with the existing (and TMK as yet unfixed) incompatibilities with GNU grep make this an easy decision. While I think having BSD licensed utilities in the base is a great goal, along with better !ascii support, I don't think it's reasonable to expect our users to sacrifice this much performance to achieve those goals. OTOH, leaving it in the tree will allow the code to continue being developed, and tested by those who are interested, and hopefully you can get the performance up to the point that wider testing will be meaningful. Regards, Doug - -- Improve the effectiveness of your Internet presence with a domain name makeover!http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBCAAGBQJMZQWkAAoJEFzGhvEaGryEsWYIAMraJP6LtQNJkTGRHWxxCArM eGTdAEjdJYs109JYMNU5GHDP/DtGKUdMR7y9Zi4KqlAYgHkpG+LheY1lmnzrXqJY BuDxsDqGPt3xfrAo55OP8CRtF3fbh6vJUiGNen+sPyqkCazZfe3Rer3LaYtwtM2y kwuQvnFsD5nMIilstFaBaYcEPwXzpgRB+ejcSwMRUr7SYOAb+0xcR7bz7EVySi2L 3fx1tCxDrGrS8XBOn9ug29B5OY1OdSyWR3WeHyKSt8mJV2ZZJtEsSJyBZMNQT3r/ ZiSvj4ESK9NXZP0mFTj1nRyJq+tWO2sEWGr/oSAPaO3K2CubfhPU5h6Utj48k7g= =+K+D -END PGP SIGNATURE- ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
Em 2010.08.13. 10:43, Doug Barton escreveu: My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds Ok, I'll take care of this soon, and make GNU grep default, again with a knob to build BSD grep. I agree with you that we cannot allow such a big performance drawback but I my measures only showed significant differences for very big searches and I didn't imagine that it could add up to such a big diference. I'm sorry for the bad decision I took making it default. Gabor ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
On Fri, Aug 13, 2010 at 01:43:16AM -0700, Doug Barton wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Gabor, I hope at this point it goes without saying that I have a lot of respect for the work you've done on BSD grep, and I've already told you that I think you're very courageous for taking the project on. I've been testing and evaluating it for some time now, and I think I've given it a fair trial. You've done a fairly good job of responding to bug reports, and I understand that the exposure BSD grep has received as the default in HEAD has been very valuable in exposing additional areas that need work. However, with all that in mind I am officially asking you to please change the default in HEAD to GNU grep. (Note, I am _not_ asking you to remove BSD grep from the tree, just to change the default.) My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds what about optimizing BSD grep instead? ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
On 08/13/2010 02:08, Gabor Kovesdan wrote: Ok, I'll take care of this soon, and make GNU grep default, again with a knob to build BSD grep. I agree with you that we cannot allow such a big performance drawback but I my measures only showed significant differences for very big searches and I didn't imagine that it could add up to such a big diference. To be fair, I didn't notice a performance difference either until I started revamping this code that calls my parse_index() for every single installed port. Given a 22,042 line INDEX file, that's enough to add up to something noticeable. I'm sorry for the bad decision I took making it default. As I've said all along, I don't think you made a bad decision in having it as the default to start. It was certainly different than what we usually do with new utilities, but that didn't make the decision wrong. I asked you at the time to keep an open mind about the possibility that the default might need to be flipped, and I appreciate you being reasonable about it now. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover!http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: if_alc trouble
Hi! NIC: a...@pci0:2:0:0:class=0x02 card=0x38a317aa chip=0x10621969 rev=0xc0 hdr=0x00 vendor = 'Attansic (Now owned by Atheros)' device = 'Atheros AR8132 PCI-E Fast Ethernet Controller (AR8132)' class = network subclass = ethernet There's a ticket with a patch: kern/148772 and it's being worked on. Please check, whether the latest patch solves your problem. -- p...@opsec.eu+49 171 310137210 years to go ! ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
Doug Barton do...@freebsd.org writes: [...] My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds Why not allow people to use grep(1) from ports in portmaster, e.g. by not overriding user-specified PATH? ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
Gabor Kovesdan wrote on 2010-08-13: Em 2010.08.13. 10:43, Doug Barton escreveu: My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds Ok, I'll take care of this soon, and make GNU grep default, again with a knob to build BSD grep. I agree with you that we cannot allow such a big performance drawback but I my measures only showed significant differences for very big searches and I didn't imagine that it could add up to such a big diference. I'm sorry for the bad decision I took making it default. Without knowing any of the details (I am not using 9-CURRENT), Gabor, I suggest that you check the documentation around Google's RE2 library (which is in C++); there are quite a few bits of information relating to (including worst-case) performance of regexp matchers, both directly in the re2 documentation, as well as indirect through links and references. Might be worth a read, together with profiling Doug's test case if he could tell you how to reproduce those. -- Matthias Andree ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
I wrote: Might be worth a read, together with profiling Doug's test case if he could tell you how to reproduce those. Make that since he has provided the means to reproduce those. I had read, but not realized, Doug uploaded the test case. -- Matthias Andree ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
Em 2010.08.13. 13:09, Matthias Andree escreveu: Gabor Kovesdan wrote on 2010-08-13: Em 2010.08.13. 10:43, Doug Barton escreveu: My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds Ok, I'll take care of this soon, and make GNU grep default, again with a knob to build BSD grep. I agree with you that we cannot allow such a big performance drawback but I my measures only showed significant differences for very big searches and I didn't imagine that it could add up to such a big diference. I'm sorry for the bad decision I took making it default. Without knowing any of the details (I am not using 9-CURRENT), Gabor, I suggest that you check the documentation around Google's RE2 library (which is in C++); there are quite a few bits of information relating to (including worst-case) performance of regexp matchers, both directly in the re2 documentation, as well as indirect through links and references. Might be worth a read, together with profiling Doug's test case if he could tell you how to reproduce those. Thanks, Matthias. I haven't looked deeply at this but iirc it uses Perl-syntax. We need an efficient, wchar-aware, POSIX(ish) regex library with a good license and atm only TRE conforms to these criteria. Besides, we need GNU-style regex support, which will have to be added to TRE before we can replace our libc-regex. Gabor ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
Em 2010.08.13. 13:33, Anonymous escreveu: Doug Bartondo...@freebsd.org writes: [...] My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds Why not allow people to use grep(1) from ports in portmaster, e.g. by not overriding user-specified PATH? It would be a working solution but having seen the performance issue, it may also cause troubles elsewhere. Gabor ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Official request: Please make GNU grep the default
On Fri, 13 Aug 2010, Gabor Kovesdan wrote: Em 2010.08.13. 10:43, Doug Barton escreveu: My reason is simple, performance. While doing some portmaster work recently I was regression testing some changes I made to the --index* options and noticed that things were dramatically slower than the last time I tested those features. Thinking that I had made a programming mistake I dug into my code, and while the regexps that I was using could be tuned for slightly better performance the problem was not in my code. I then installed textproc/gnugrep to compare, and the differences were very dramatic using a highly pessimized test case (finding a match on the last line of INDEX). The script I used to test is at http://people.freebsd.org/~dougb/grep-time-trial.sh.txt and a typical result was: GNU grep Elapsed time: 2 seconds BSD grep Elapsed time: 47 seconds Ok, I'll take care of this soon, and make GNU grep default, again with a knob to build BSD grep. I agree with you that we cannot allow such a big performance drawback but I my measures only showed significant differences for very big searches and I didn't imagine that it could add up to such a big diference. I'm sorry for the bad decision I took making it default. This should trim some time off BSD grep. It removes the lock/unlock for each fgetc() by locking/unlocking the file once. stdio can be slow. You probably want to replace flockfile() with ftrylockfile() if threads will be involved at some point (threading or making a libgrep that may be used in a threaded process). Sean -- s...@freebsd.orgIndex: file.c === --- file.c (revision 210862) +++ file.c (working copy) @@ -74,7 +74,7 @@ switch (filebehave) { case FILE_STDIO: - return (fgetc(f-f)); + return (getc_unlocked(f-f)); case FILE_GZIP: return (gzgetc(f-gzf)); case FILE_BZIP: @@ -189,6 +189,7 @@ f = grep_malloc(sizeof *f); if ((f-f = fdopen(STDIN_FILENO, r)) != NULL) { + flockfile(f-f); f-stdin = true; return (f); } @@ -238,6 +239,7 @@ switch (filebehave) { case FILE_STDIO: + funlockfile(f-f); fclose(f-f); break; case FILE_GZIP: ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: if_alc trouble
On Fri, Aug 13, 2010 at 10:22:06AM +0300, Sergey V. Dyatko wrote: Hi all, I have strange problem: NIC: a...@pci0:2:0:0:class=0x02 card=0x38a317aa chip=0x10621969 rev=0xc0 hdr=0x00 vendor = 'Attansic (Now owned by Atheros)' device = 'Atheros AR8132 PCI-E Fast Ethernet Controller (AR8132)' class = network subclass = ethernet % uname -a FreeBSD laptop.minsk.domain 9.0-CURRENT FreeBSD 9.0-CURRENT #8 r209973: Tue Jul 13 10:17:08 EEST 2010 r...@laptop.minsk.domain:/usr/obj/usr/src/sys/b450 i386 I'm using if_alc as a kernel module, when I boot with plugged in cable all works fine, but when I booting with unplugged cable - network doesn't work. I'm trying kenv hw.alc.msi_disable=1 and kldload if_alc.. from messages: Aug 13 09:06:12 laptop kernel: alc0: Atheros AR8132 PCIe Fast Ethernet port 0x3000-0x307f mem 0x9610-0x9613 ir q 16 at Ethernet device 0.0 on pci2 Aug 13 09:06:12 laptop kernel: alc0: 15872 Tx FIFO, 15360 Rx FIFO Aug 13 09:06:12 laptop kernel: miibus0: MII bus on alc0 Aug 13 09:06:12 laptop kernel: atphy0: Atheros F1 10/100/1000 PHY PHY 0 on miibus0 Aug 13 09:06:12 laptop kernel: atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Aug 13 09:06:12 laptop kernel: alc0: Ethernet address: 00:1f:16:2e:fa:49 Aug 13 09:06:12 laptop kernel: alc0: [FILTER] Aug 13 09:06:12 laptop kernel: alc0: link state changed to DOWN Aug 13 09:06:15 laptop kernel: alc0: link state changed to UP Aug 13 09:06:15 laptop kernel: alc0: DMA write error! -- resetting Aug 13 09:06:15 laptop kernel: alc0: link state changed to DOWN Aug 13 09:06:16 laptop kernel: alc0: promiscuous mode enabled Aug 13 09:06:17 laptop kernel: alc0: link state changed to UP Aug 13 09:06:18 laptop kernel: alc0: DMA write error! -- resetting Aug 13 09:06:18 laptop kernel: alc0: link state changed to DOWN Aug 13 09:06:20 laptop kernel: alc0: link state changed to UP Aug 13 09:06:21 laptop kernel: alc0: DMA write error! -- resetting how to repeat: 1) boot with unplugged cable (if_alc_load=YES on loader.conf) 2) plug-in cable 3) dhclient alc0 4) tcpdump -ni alc0 -vvv - http://tiger.ipfw.ru/files/tcpdump.txt 5) reboot with plugged cable.. 6) dhclient alc0 [ti...@laptop]~%ifconfig alc0 alc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=c3198VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC,VLAN_HWTSO,LINKSTATE ether 00:1f:16:2e:fa:49 inet 192.168.9.150 netmask 0xff00 broadcast 192.168.9.255 media: Ethernet autoselect (100baseTX full-duplex) status: active now I can unplug cable, unload if_alc, load it again, plug cable -- all works fine.. I'm working on it but I was not able to reproduce the issue on my AR8131/AR8132/AR8151/AR8152 sample boards. However it seems AR8132 is the only controller that shows this issue and I vaguely remember a couple of users reported the issue. I'll update PR 148772 if I manage to find some clue. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org