Re: slow USB 3.0 on -current

2020-07-12 Thread Mark Millard
John-Mark Gurney jmg at funkthat.com wrote on
Sat Jul 11 22:44:36 UTC 2020 :

> I'm having issues getting good ethernet performance from a USB ethernet
> adapter (ure) under FreeBSD on an HP EliteDesk 705 G2 Mini[1].  It's an
> AMD PRO A10-8700B based system using the AMD A78 FCH chipset.
> 
> Under FreeBSD -current (r362596), 12.1-R and 11.4-R, the RealTek USB
> adapter only gets around 10MB/sec performance.  During the transfer,
> the CPU usage is only around 3-5%, so it's definitely not CPU bound.
> 
> I have tested Windows 10 and NetBSD 9.0 performance, and both provide
> 100MB/sec+ w/o troubles.
> 
> I have attached dmesg from both FreeBSD -current and NetBSD 9.0.
> 
> Any hints on how to fix this?
> 
> This may be related, but I'm also having issues w/ booting when I have
> both a SD USB 2.0 card reader AND the ure plugged into USB 3.0 ports.
> 
> If I move the SD card reader to USB 2.0, the umass device will attach
> and work.  I have also attached a clip of the dmesg from that
> happening.
> 
> Has anyone else seen this issue?  Ideas or thoughts on how to resolve
> the performance issues?
> 

It might prove useful to use iperf3 with

# iperf3 -s

on one machine and doing

# iperf3 -c ADDR
. . .
# iperf3 -R -c ADDR
. . .

on the other. (That last swaps the
sender/receiver status.)

All 3 commands will have output. The
-s one will produce output for each of
the -c ones.

The outputs for the sender(s) will include Cwnd
(congestion window size) information that may
be relevant. It will report bit rate and
retry count sampling (and overall figures).

Comparing the output of using iperf3 under
NetBSD 9.0 or Windows 10 could be instructive.

My observation would be that neither type
of USB3 Ethernet adapter that I've tried
(different chipsets) get anywhere near
100 MByte/s when ifconfig reports
1000baseT . The Cwnd figures
are smaller than for the built-in Ethernets
that manage much faster overall transfer
rates.

Example where 192.168.1.112 has the USB3
EtherNet based adapter in use and
192.168.1.120 has built-in EtherNet that
can do 900 Mbit/s+ on the network:

# iperf3 -s
---
Server listening on 5201
---
Accepted connection from 192.168.1.112, port 20519
[  5] local 192.168.1.120 port 5201 connected to 192.168.1.112 port 44212
[ ID] Interval   Transfer Bitrate
[  5]   0.00-1.00   sec  23.8 MBytes   200 Mbits/sec  
[  5]   1.00-2.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   2.00-3.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   3.00-4.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   4.00-5.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   5.00-6.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   6.00-7.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   7.00-8.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   8.00-9.00   sec  27.6 MBytes   232 Mbits/sec  
[  5]   9.00-10.00  sec  27.6 MBytes   232 Mbits/sec  
[  5]  10.00-10.19  sec  5.13 MBytes   231 Mbits/sec  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval   Transfer Bitrate
[  5]   0.00-10.19  sec   277 MBytes   228 Mbits/sec  receiver
---
Server listening on 5201
---
Accepted connection from 192.168.1.112, port 18711
[  5] local 192.168.1.120 port 5201 connected to 192.168.1.112 port 48624
[ ID] Interval   Transfer Bitrate Retr  Cwnd
[  5]   0.00-1.00   sec  22.5 MBytes   188 Mbits/sec  273   17.0 KBytes   
[  5]   1.00-2.00   sec  19.0 MBytes   159 Mbits/sec  214   14.3 KBytes   
[  5]   2.00-3.00   sec  22.6 MBytes   190 Mbits/sec  271   29.8 KBytes   
[  5]   3.00-4.00   sec  10.6 MBytes  88.9 Mbits/sec  131   28.4 KBytes   
[  5]   4.00-5.00   sec  28.2 MBytes   237 Mbits/sec  343   17.0 KBytes   
[  5]   5.00-6.01   sec  25.7 MBytes   214 Mbits/sec  310   14.3 KBytes   
[  5]   6.01-7.00   sec  15.4 MBytes   130 Mbits/sec  178   19.8 KBytes   
[  5]   7.00-8.00   sec  20.6 MBytes   173 Mbits/sec  229   21.3 KBytes   
[  5]   8.00-9.00   sec  29.8 MBytes   250 Mbits/sec  345   19.8 KBytes   
[  5]   9.00-10.00  sec  29.9 MBytes   251 Mbits/sec  325   17.0 KBytes   
[  5]  10.00-10.19  sec  7.54 MBytes   332 Mbits/sec   89   2.83 KBytes   
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval   Transfer Bitrate Retr
[  5]   0.00-10.19  sec   232 MBytes   191 Mbits/sec  2708 sender
---
Server listening on 5201
---


# iperf3 -c 192.168.1.120
Connecting to host 192.168.1.120, port 5201
[  5] 

Re: slow USB 3.0 on -current

2020-07-12 Thread John-Mark Gurney
Mark Millard wrote this message on Sun, Jul 12, 2020 at 18:26 -0700:
> John-Mark Gurney jmg at funkthat.com wrote on
> Sat Jul 11 22:44:36 UTC 2020 :
> 
> > I'm having issues getting good ethernet performance from a USB ethernet
> > adapter (ure) under FreeBSD on an HP EliteDesk 705 G2 Mini[1].  It's an
> > AMD PRO A10-8700B based system using the AMD A78 FCH chipset.
> > 
> > Under FreeBSD -current (r362596), 12.1-R and 11.4-R, the RealTek USB
> > adapter only gets around 10MB/sec performance.  During the transfer,
> > the CPU usage is only around 3-5%, so it's definitely not CPU bound.
> > 
> > I have tested Windows 10 and NetBSD 9.0 performance, and both provide
> > 100MB/sec+ w/o troubles.
> > 
> > I have attached dmesg from both FreeBSD -current and NetBSD 9.0.
> > 
> > Any hints on how to fix this?
> > 
> > This may be related, but I'm also having issues w/ booting when I have
> > both a SD USB 2.0 card reader AND the ure plugged into USB 3.0 ports.
> > 
> > If I move the SD card reader to USB 2.0, the umass device will attach
> > and work.  I have also attached a clip of the dmesg from that
> > happening.
> > 
> > Has anyone else seen this issue?  Ideas or thoughts on how to resolve
> > the performance issues?
> 
> It might prove useful to use iperf3 with
> 
> # iperf3 -s
> 
> on one machine and doing
> 
> # iperf3 -c ADDR
> . . .
> # iperf3 -R -c ADDR
> . . .
> 
> on the other. (That last swaps the
> sender/receiver status.)
> 
> All 3 commands will have output. The
> -s one will produce output for each of
> the -c ones.
> 
> The outputs for the sender(s) will include Cwnd
> (congestion window size) information that may
> be relevant. It will report bit rate and
> retry count sampling (and overall figures).

Here is the results for FreeBSD w/ USB3 ure.  .80 is the USB3
adapter side:
gold,pts,/home/jmg,502$iperf3 -c 192.168.0.80
Connecting to host 192.168.0.80, port 5201
[  5] local 192.168.0.2 port 50042 connected to 192.168.0.80 port 5201
[ ID] Interval   Transfer Bitrate Retr  Cwnd
[  5]   0.00-1.00   sec  8.94 MBytes  75.0 Mbits/sec  931   15.5 KBytes
[  5]   1.00-2.00   sec  9.98 MBytes  83.7 Mbits/sec  919   27.3 KBytes
[  5]   2.00-3.00   sec  9.95 MBytes  83.5 Mbits/sec  954   5.71 KBytes
[  5]   3.00-4.00   sec  9.97 MBytes  83.7 Mbits/sec  939   28.7 KBytes
[  5]   4.00-5.00   sec  9.97 MBytes  83.6 Mbits/sec  951   17.3 KBytes
[  5]   5.00-6.00   sec  9.99 MBytes  83.8 Mbits/sec  913   31.5 KBytes
[  5]   6.00-7.00   sec  9.96 MBytes  83.5 Mbits/sec  956   20.1 KBytes
[  5]   7.00-8.00   sec  10.0 MBytes  83.9 Mbits/sec  913   33.0 KBytes
[  5]   8.00-9.00   sec  9.97 MBytes  83.6 Mbits/sec  945   24.4 KBytes
[  5]   9.00-10.00  sec  9.99 MBytes  83.8 Mbits/sec  916   34.4 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval   Transfer Bitrate Retr
[  5]   0.00-10.00  sec  98.7 MBytes  82.8 Mbits/sec  9337 sender
[  5]   0.00-10.25  sec  98.7 MBytes  80.8 Mbits/sec  receiver

iperf Done.
gold,pts,/home/jmg,503$iperf3 -R -c 192.168.0.80
Connecting to host 192.168.0.80, port 5201
Reverse mode, remote host 192.168.0.80 is sending
[  5] local 192.168.0.2 port 51024 connected to 192.168.0.80 port 5201
[ ID] Interval   Transfer Bitrate
[  5]   0.00-1.00   sec  9.69 MBytes  81.3 Mbits/sec
[  5]   1.00-2.00   sec  10.7 MBytes  89.8 Mbits/sec
[  5]   2.00-3.00   sec  10.7 MBytes  89.8 Mbits/sec
[  5]   3.00-4.00   sec  10.7 MBytes  89.8 Mbits/sec
[  5]   4.00-5.00   sec  10.7 MBytes  89.8 Mbits/sec
[  5]   5.00-6.00   sec  10.7 MBytes  89.8 Mbits/sec
[  5]   6.00-7.00   sec  10.7 MBytes  89.8 Mbits/sec
[  5]   7.00-8.00   sec  10.4 MBytes  87.6 Mbits/sec
[  5]   8.00-9.00   sec  10.7 MBytes  89.9 Mbits/sec
[  5]   9.00-10.00  sec  10.7 MBytes  89.8 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval   Transfer Bitrate Retr
[  5]   0.00-10.00  sec   106 MBytes  88.9 Mbits/sec  1381 sender
[  5]   0.00-10.00  sec   106 MBytes  88.7 Mbits/sec  receiver

iperf Done.

As you can see, it matches what I measured earlier.

And just to prove that the machine CAN move 100MB/sec, I've run iperf3
using the onboard wired ethernet...  I need multiple interfaces, which is
why I'm bothering trying to get USB3 ethernet working.

This is using the onboard bge interface.  It's IP is .79:
gold,pts,/home/jmg,507$iperf3 -c 192.168.0.79
Connecting to host 192.168.0.79, port 5201
[  5] local 192.168.0.2 port 61500 connected to 192.168.0.79 port 5201
[ ID] Interval   Transfer Bitrate Retr  Cwnd
[  5]   0.00-1.00   sec   101 MBytes   850 Mbits/sec0488 KBytes
[  5]   1.00-2.00   sec   112 MBytes   940 Mbits/sec0488 KBytes
[  5]   2.00-3.00   sec   112 MBytes   943 Mbits/sec0731 KBytes
[  5]   3.00-4.00   sec   112 MBytes   940 Mbits/sec0731 KBytes
[  5]   4.00-5.00   sec   112 MBytes   941 Mbits/sec0  

Re: Is there any error checking on swap?

2020-07-12 Thread Xin Li


On 7/12/20 12:29 AM, John-Mark Gurney wrote:
> bob prohaska wrote this message on Sat, Jul 11, 2020 at 20:33 -0700:
>> Is there any error checking on swap traffic, along the lines of
>> a checksum or parity test? 
>>
>> Just curious what happens if a page written out is corrupted  when
>> it comes back.
> 
> Looks like it doesn't:
> https://svnweb.freebsd.org/base/head/sys/vm/swap_pager.c?annotate=361965#l1389

Technically one can enable checks with e.g. geli(8), but note that the
geli(8) provider will not "prime" the HMAC data so attaching the device
will immediately spam the system log with some authentication errors due
to GEOM tasting (because the kernel would try to read locations that
potentially contain metadata for other GEOM providers).

For the case of swap, since the write is always page sized, it's
probably optimal to implement something in the swap layer itself and
store the expected checksums in memory.

Cheers,



signature.asc
Description: OpenPGP digital signature


Re: Is there any error checking on swap?

2020-07-12 Thread John-Mark Gurney
Xin Li wrote this message on Sun, Jul 12, 2020 at 15:06 -0700:
> 
> 
> On 7/12/20 12:29 AM, John-Mark Gurney wrote:
> > bob prohaska wrote this message on Sat, Jul 11, 2020 at 20:33 -0700:
> >> Is there any error checking on swap traffic, along the lines of
> >> a checksum or parity test? 
> >>
> >> Just curious what happens if a page written out is corrupted  when
> >> it comes back.
> > 
> > Looks like it doesn't:
> > https://svnweb.freebsd.org/base/head/sys/vm/swap_pager.c?annotate=361965#l1389
> 
> Technically one can enable checks with e.g. geli(8), but note that the
> geli(8) provider will not "prime" the HMAC data so attaching the device
> will immediately spam the system log with some authentication errors due
> to GEOM tasting (because the kernel would try to read locations that
> potentially contain metadata for other GEOM providers).

Yeah, and enabling auth w/ geli(8) is problematic, as it creates a
disconnect between layers, as it expands 4096 byte writes to 9 512
byte sector writes, if you're using a 4k drive (which is pretty much
the only thing sold these days), the performance is likely to be
pretty terrible...

see:
https://svnweb.freebsd.org/base/head/sys/geom/eli/g_eli_integrity.c?annotate=361481#l56

So, it'd be doable, but less than ideal...

> For the case of swap, since the write is always page sized, it's
> probably optimal to implement something in the swap layer itself and
> store the expected checksums in memory.

+1

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."


signature.asc
Description: PGP signature


Re: slow USB 3.0 on -current

2020-07-12 Thread John-Mark Gurney
Kevin Oberman wrote this message on Sun, Jul 12, 2020 at 16:24 -0700:
> On Sun, Jul 12, 2020 at 2:55 PM John-Mark Gurney  wrote:
> 
> > Hans Petter Selasky wrote this message on Sun, Jul 12, 2020 at 09:57 +0200:
> > > On 2020-07-12 00:44, John-Mark Gurney wrote:
> > > > Hello,
> > > >
> > > > I'm having issues getting good ethernet performance from a USB ethernet
> > > > adapter (ure) under FreeBSD on an HP EliteDesk 705 G2 Mini[1].  It's an
> > > > AMD PRO A10-8700B based system using the AMD A78 FCH chipset.
> > > >
> > > > Under FreeBSD -current (r362596), 12.1-R and 11.4-R, the RealTek USB
> > > > adapter only gets around 10MB/sec performance.  During the transfer,
> > > > the CPU usage is only around 3-5%, so it's definitely not CPU bound.
> > > >
> > > > I have tested Windows 10 and NetBSD 9.0 performance, and both provide
> > > > 100MB/sec+ w/o troubles.
> > > >
> > > > I have attached dmesg from both FreeBSD -current and NetBSD 9.0.
> > > >
> > > > Any hints on how to fix this?
> > > >
> > > > This may be related, but I'm also having issues w/ booting when I have
> > > > both a SD USB 2.0 card reader AND the ure plugged into USB 3.0 ports.
> > > >
> > > > If I move the SD card reader to USB 2.0, the umass device will attach
> > > > and work.  I have also attached a clip of the dmesg from that
> > > > happening.
> > > >
> > > > Has anyone else seen this issue?  Ideas or thoughts on how to resolve
> > > > the performance issues?
> > >
> > > Can you check the output from ifconfig. What is the actual link speed. I
> > > suspect it has something to do with the MII bus code/implementation.
> >
> > ifconfig is reporting it's 1000baseT.
> >
> > > Also check output from "vmstat -i" during usage to see if the number of
> > > IRQ/s is low.
> >
> > Not sure what is considered low, but I'm seeing consistently around
> > 7800 int/s for xhci0.
> >
> This is just for clarification, but is 'MB' MBytes? In the networking world
> that is what it would mean, but the context leads me to think that you mean
> Mbits. It's also possible that some numbers are in bits and some in Bytes,
> causing real confusion. I'm sure that 1000baseT is bits, of course.

MB means megabytes.. I would use Mbps for bits...  so, on Win10 and
NetBSD, I'm able to get 100 MBytes/sec on Win10/NetBSD, and FreeBSD,
I'm only getting a tenth the capability of gige at 9-10 MBytes/sec...

I'll note that fetch reports numbers of MBps, which is one of the tools
I've been using for testing.

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: slow USB 3.0 on -current

2020-07-12 Thread Kevin Oberman
On Sun, Jul 12, 2020 at 2:55 PM John-Mark Gurney  wrote:

> Hans Petter Selasky wrote this message on Sun, Jul 12, 2020 at 09:57 +0200:
> > On 2020-07-12 00:44, John-Mark Gurney wrote:
> > > Hello,
> > >
> > > I'm having issues getting good ethernet performance from a USB ethernet
> > > adapter (ure) under FreeBSD on an HP EliteDesk 705 G2 Mini[1].  It's an
> > > AMD PRO A10-8700B based system using the AMD A78 FCH chipset.
> > >
> > > Under FreeBSD -current (r362596), 12.1-R and 11.4-R, the RealTek USB
> > > adapter only gets around 10MB/sec performance.  During the transfer,
> > > the CPU usage is only around 3-5%, so it's definitely not CPU bound.
> > >
> > > I have tested Windows 10 and NetBSD 9.0 performance, and both provide
> > > 100MB/sec+ w/o troubles.
> > >
> > > I have attached dmesg from both FreeBSD -current and NetBSD 9.0.
> > >
> > > Any hints on how to fix this?
> > >
> > > This may be related, but I'm also having issues w/ booting when I have
> > > both a SD USB 2.0 card reader AND the ure plugged into USB 3.0 ports.
> > >
> > > If I move the SD card reader to USB 2.0, the umass device will attach
> > > and work.  I have also attached a clip of the dmesg from that
> > > happening.
> > >
> > > Has anyone else seen this issue?  Ideas or thoughts on how to resolve
> > > the performance issues?
> >
> > Can you check the output from ifconfig. What is the actual link speed. I
> > suspect it has something to do with the MII bus code/implementation.
>
> ifconfig is reporting it's 1000baseT.
>
> > Also check output from "vmstat -i" during usage to see if the number of
> > IRQ/s is low.
>
> Not sure what is considered low, but I'm seeing consistently around
> 7800 int/s for xhci0.
>
> --
>   John-Mark Gurney  Voice: +1 415 225 5579
>
This is just for clarification, but is 'MB' MBytes? In the networking world
that is what it would mean, but the context leads me to think that you mean
Mbits. It's also possible that some numbers are in bits and some in Bytes,
causing real confusion. I'm sure that 1000baseT is bits, of course.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkober...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: slow USB 3.0 on -current

2020-07-12 Thread John-Mark Gurney
Hans Petter Selasky wrote this message on Sun, Jul 12, 2020 at 09:57 +0200:
> On 2020-07-12 00:44, John-Mark Gurney wrote:
> > Hello,
> > 
> > I'm having issues getting good ethernet performance from a USB ethernet
> > adapter (ure) under FreeBSD on an HP EliteDesk 705 G2 Mini[1].  It's an
> > AMD PRO A10-8700B based system using the AMD A78 FCH chipset.
> > 
> > Under FreeBSD -current (r362596), 12.1-R and 11.4-R, the RealTek USB
> > adapter only gets around 10MB/sec performance.  During the transfer,
> > the CPU usage is only around 3-5%, so it's definitely not CPU bound.
> > 
> > I have tested Windows 10 and NetBSD 9.0 performance, and both provide
> > 100MB/sec+ w/o troubles.
> > 
> > I have attached dmesg from both FreeBSD -current and NetBSD 9.0.
> > 
> > Any hints on how to fix this?
> > 
> > This may be related, but I'm also having issues w/ booting when I have
> > both a SD USB 2.0 card reader AND the ure plugged into USB 3.0 ports.
> > 
> > If I move the SD card reader to USB 2.0, the umass device will attach
> > and work.  I have also attached a clip of the dmesg from that
> > happening.
> > 
> > Has anyone else seen this issue?  Ideas or thoughts on how to resolve
> > the performance issues?
> 
> Can you check the output from ifconfig. What is the actual link speed. I 
> suspect it has something to do with the MII bus code/implementation.

ifconfig is reporting it's 1000baseT.

> Also check output from "vmstat -i" during usage to see if the number of 
> IRQ/s is low.

Not sure what is considered low, but I'm seeing consistently around
7800 int/s for xhci0.

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Is there any error checking on swap?

2020-07-12 Thread John-Mark Gurney
bob prohaska wrote this message on Sun, Jul 12, 2020 at 08:37 -0700:
> On Sun, Jul 12, 2020 at 12:29:12AM -0700, John-Mark Gurney wrote:
> > bob prohaska wrote this message on Sat, Jul 11, 2020 at 20:33 -0700:
> > > Is there any error checking on swap traffic, along the lines of
> > > a checksum or parity test? 
> > > 
> > > Just curious what happens if a page written out is corrupted  when
> > > it comes back.
> > 
> > Looks like it doesn't:
> > https://svnweb.freebsd.org/base/head/sys/vm/swap_pager.c?annotate=361965#l1389
> > 
> 
> Certainly nothing about parity or checksums in the comments.
> All faith in the hardware, I guess
> 
> Thanks for writing!

It probably wouldn't be too hard to add the feature...  Just expand the
page entry to store a fletcher checksum or the like...

Another option would be to try to use swap on ZFS, and use ZFS's builtin
checksum feature:
https://wiki.freebsd.org/RootOnZFS#ZFS_Swap_Volume

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Is there any error checking on swap?

2020-07-12 Thread bob prohaska
On Sun, Jul 12, 2020 at 12:29:12AM -0700, John-Mark Gurney wrote:
> bob prohaska wrote this message on Sat, Jul 11, 2020 at 20:33 -0700:
> > Is there any error checking on swap traffic, along the lines of
> > a checksum or parity test? 
> > 
> > Just curious what happens if a page written out is corrupted  when
> > it comes back.
> 
> Looks like it doesn't:
> https://svnweb.freebsd.org/base/head/sys/vm/swap_pager.c?annotate=361965#l1389
> 

Certainly nothing about parity or checksums in the comments.
All faith in the hardware, I guess

Thanks for writing!

bob prohaska

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: OverDrive 1000 head -r360311 -> r363021 upgrade: USB & Ethernet disappeared, "usb_needs_explore_all: no devclass" (Now: artifact.ci bisect)

2020-07-12 Thread Mark Millard



> On 2020-Jul-11, at 15:12, Mark Millard  wrote:
> 
> 
>> 
>> On 2020-Jul-11, at 14:45, Robert Crowston  wrote:
>> 
>> So what is the mistake I made here?
>> 
>> Should I have given a globally unique name as the first argument to 
>> DRIVER_MODULE()? I didn't see that in the man page, and other examples of 
>> pcib drivers apparently get away with it.
>> 
>> I did notice the weird message about "driver already loaded from kernel". I 
>> wondered if that meant I was dragging in code to the core kernel, that would 
>> otherwise live in an external module?
>> 
>> Let me know how I can help fix it!
>> 
>>   -- RHC.
> 
> It is not an area of expertise for me. I've spent hours just
> getting to the point of sending the notes that I have sent.
> 

Having found no evidence of any likely disaster from trying
the experiment, I've tried:

# svnlite diff /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c
Index: /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c
===
--- /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c (revision 363021)
+++ /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c (working copy)
@@ -739,5 +739,5 @@
 sizeof(struct bcm_pcib_softc), generic_pcie_fdt_driver);
 
 static devclass_t bcm_pcib_devclass;
-DRIVER_MODULE(pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0);
+DRIVER_MODULE(bcm_pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0);
 

This was enough of a change for Ethernet and USB to become available
again on the OverDrive 1000.

Apparently one must search all existing DRIVER_MODULE use and then
pick naming to have the new DRIVER_MODULE(NAME,BUSNAME,... end up
with the NAME,BUSNAME as a unique combination of names (or
combinations for when there is BUSNAME0, BUSNAME1, . . .).

I also updated the USB3 SSD I use for booting either RPi4
or Rock64. Be warned that the RPi4 boots are via
UEFI v1.16 use instead of by sysutils/u-boot-rpi4 use.
I do not have things set up for sysutils/u-boot-rpi4 as
stands.

The SSD booted both contexts fine and the USB worked like
normal. On the Rock64, the built-in EtherNet also worked
fine. For the RPi4, a USB3 EtherNet adapter is used and
it worked fine.

If someone checks sysutils/u-boot-rpi4 operation and finds
that it works, then I expect that such a patch as above is
all that is required.

Note: If future bcmD's need similar code, care will
need to be taken naming  in DRIVER_MODULE(,...
for them so that uniqueness is maintained. My use of
"bcm_" to match the context is not the only prefix that
would lead to unique naming currently.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: slow USB 3.0 on -current

2020-07-12 Thread Hans Petter Selasky

On 2020-07-12 00:44, John-Mark Gurney wrote:

Hello,

I'm having issues getting good ethernet performance from a USB ethernet
adapter (ure) under FreeBSD on an HP EliteDesk 705 G2 Mini[1].  It's an
AMD PRO A10-8700B based system using the AMD A78 FCH chipset.

Under FreeBSD -current (r362596), 12.1-R and 11.4-R, the RealTek USB
adapter only gets around 10MB/sec performance.  During the transfer,
the CPU usage is only around 3-5%, so it's definitely not CPU bound.

I have tested Windows 10 and NetBSD 9.0 performance, and both provide
100MB/sec+ w/o troubles.

I have attached dmesg from both FreeBSD -current and NetBSD 9.0.

Any hints on how to fix this?

This may be related, but I'm also having issues w/ booting when I have
both a SD USB 2.0 card reader AND the ure plugged into USB 3.0 ports.

If I move the SD card reader to USB 2.0, the umass device will attach
and work.  I have also attached a clip of the dmesg from that
happening.

Has anyone else seen this issue?  Ideas or thoughts on how to resolve
the performance issues?


Hi,

Can you check the output from ifconfig. What is the actual link speed. I 
suspect it has something to do with the MII bus code/implementation.


Also check output from "vmstat -i" during usage to see if the number of 
IRQ/s is low.


--HPS

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: OverDrive 1000 head -r360311 -> r363021 upgrade: USB & Ethernet disappeared, "usb_needs_explore_all: no devclass" (Now: artifact.ci bisect)

2020-07-12 Thread Michal Meloun



On 12.07.2020 8:37, Mark Millard via freebsd-arm wrote:
> 
> 
>> On 2020-Jul-11, at 15:12, Mark Millard  wrote:
>>
>>
>>>
>>> On 2020-Jul-11, at 14:45, Robert Crowston  wrote:
>>>
>>> So what is the mistake I made here?
>>>
>>> Should I have given a globally unique name as the first argument to 
>>> DRIVER_MODULE()? I didn't see that in the man page, and other examples of 
>>> pcib drivers apparently get away with it.
>>>
>>> I did notice the weird message about "driver already loaded from kernel". I 
>>> wondered if that meant I was dragging in code to the core kernel, that 
>>> would otherwise live in an external module?
>>>
>>> Let me know how I can help fix it!
>>>
>>>   -- RHC.
>>
>> It is not an area of expertise for me. I've spent hours just
>> getting to the point of sending the notes that I have sent.
>>
> 
> Having found no evidence of any likely disaster from trying
> the experiment, I've tried:
> 
> # svnlite diff /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c
> Index: /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c
> ===
> --- /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c   (revision 363021)
> +++ /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c   (working copy)
> @@ -739,5 +739,5 @@
>  sizeof(struct bcm_pcib_softc), generic_pcie_fdt_driver);
>  
>  static devclass_t bcm_pcib_devclass;
> -DRIVER_MODULE(pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0);
> +DRIVER_MODULE(bcm_pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0);
>  
> 
> This was enough of a change for Ethernet and USB to become available
> again on the OverDrive 1000.
> 
> Apparently one must search all existing DRIVER_MODULE use and then
> pick naming to have the new DRIVER_MODULE(NAME,BUSNAME,... end up
> with the NAME,BUSNAME as a unique combination of names (or
> combinations for when there is BUSNAME0, BUSNAME1, . . .).
> 
> I also updated the USB3 SSD I use for booting either RPi4
> or Rock64. Be warned that the RPi4 boots are via
> UEFI v1.16 use instead of by sysutils/u-boot-rpi4 use.
> I do not have things set up for sysutils/u-boot-rpi4 as
> stands.
> 
> The SSD booted both contexts fine and the USB worked like
> normal. On the Rock64, the built-in EtherNet also worked
> fine. For the RPi4, a USB3 EtherNet adapter is used and
> it worked fine.
> 
> If someone checks sysutils/u-boot-rpi4 operation and finds
> that it works, then I expect that such a patch as above is
> all that is required.
> 
> Note: If future bcmD's need similar code, care will
> need to be taken naming  in DRIVER_MODULE(,...
> for them so that uniqueness is maintained. My use of
> "bcm_" to match the context is not the only prefix that
> would lead to unique naming currently.
> 
> ===
> Mark Millard
> marklmi at yahoo.com
> ( dsl-only.net went
> away in early 2018-Mar)
> 

Fixed in r363121. Thanks for the report.

Michal Meloun
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Is there any error checking on swap?

2020-07-12 Thread John-Mark Gurney
bob prohaska wrote this message on Sat, Jul 11, 2020 at 20:33 -0700:
> Is there any error checking on swap traffic, along the lines of
> a checksum or parity test? 
> 
> Just curious what happens if a page written out is corrupted  when
> it comes back.

Looks like it doesn't:
https://svnweb.freebsd.org/base/head/sys/vm/swap_pager.c?annotate=361965#l1389

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"