-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any xhci speed limits on NanoPI? #17
Comments
To be more specific, a camera app deploys glib for event/callback handling. So the slowdown could be either due to less frequent event timer clocking on NanoPi, or due to slower xhci "bus" clock itself. As I said, your kernels give a nice advantage of approx 20%: 500fps instead of 400fps. But it actually should be 800fps. |
For instance, can you point to related fixes on their code? Could be the way the hardware is implemented? |
Sorry, I don't digg into kernel development due to the lack of time. To my experience, FriendlyArm 4.4 was affected at least by this bug, which flooded the syslog, ruining the performance.
Yes, I guess it could be. On desktops SATA disks and USB controllers usually do not share the same bus. While here, sdcard and usbs are on the same hci. And the eMMC port is hci as well, correct? So they could easily flood each other. One hope might be PCIe To USB 3.0 X4 HAT for M4, which wires USB3 directly to PCIe. Yet, not clear how PCIe 2x (two lanes!) can do 5Gbs for USB3.0... Yeah, so unfortunately, this board is full of fake sh*t. Do you think other Rockships can do any better? |
I am not a hardware guy, so not much to add about that. I think for the price Rockchip is the best you can get. I am not sure there is support for the HAT on mainline 5.4 , but 5.5 is almost there, so there could be an improvement with the HAT, but i read you get a higher board temp. anyway, rc5 is out and it is time to give it a try soon... |
Do you accept sponsorship to improve certain software problems? |
I don't think i have the skills and time to improve the kernel. it is just amateur's work. But i can try to help if i can. |
Oh, not really the kernel development that much. I do have a lot of housekeeping requests related to our product. Currently your kernel ships a lot of modules, which are definitely no-use. For example, nouveau. I'd be happy to support filtering modules folder to the bare minimum required by this platform. |
Another significant usability problem is: nobody could ever understand what's going wrong during early boot without any logging option! I've spend days trying to get uboot or UART to print something without any luck. There must be a clear instruction how to get UART to work. There must be a uboot build to start posting boot status over HDMI as early as possible. I'd support these items right away. |
USB-TTL Boot log you get with these parameters:
The kernel then sets to 115K. |
I use minicom, configure the port and then fire with:
|
I've measured, looks like the base system is ~300MB, but kernel modules bring additional 800MB, which is crazy :) |
I used RK binaries to embed in u-boot. You might have a look at Armbian which builds atf and u-boot from source, but you need to use their build system. Here is the script to build from source: /~https://github.com/armbian/build/blob/master/config/sources/families/rockchip.conf |
I really try hard to make it work. My UART dongle is this one. All is set, but no signal (see screenshot). I'm thinking that I need to re-program the CP2102 to add 1500000 baudrate support as mentioned here, but the procedure is not clear enough. |
I've checked with ESP32 this UART dongle works well. What chip your UART dongle is based on? |
Be careful with some UART dongle, i have learned the hard way, some have 3.41v on TX/RX that does not work on NanoPi boards. A long time ago I told FE about the problem while trying to find out why my USB-TTL never worked, and for some other board, it worked. I ended up buying https://www.friendlyarm.com/index.php?route=product/product&product_id=178 , problem fixed. Don't know if it is your case, measure the TX and RX and see what you get. |
OK, I got UART for NanoPI M4 to work with this dongle. It's actually an MSP430 programmator, based on a different chip I guess. Not FE's, but works. Thank you very much for your confidence! Is there a way to do shell login through UART? |
At the end, it will prompt for the login (UART). You type ubuntu / ubuntu. |
|
|
Nice eMMC read speed! Which one is that? I can get only 9MB/sec out of mine. |
it's a 32 GB SD card (Sandisk Ultra) , 80 MB/s read. Vendor info. But many builds i think is wearing out too fast also. |
I need to raise ethernet, yet I don't copy most of the kernel modules due to ramdisk economy. The boot log gives me:
Am I missing some particular kernel module for ethernet support? TTY login does not start as well, perhaps due to the missing modules as well:
Any clue here? Thanks a lot! |
I have of course dumped your active module set and brought their .ko files into the rootfs. But this does not help. What am I missing? This is my log: https://gist.github.com/dmikushin/5d762745573361d0c923d6aacc904ecb |
Please, attach a complete boot log. |
Yes sure, please see here: https://gist.github.com/dmikushin/10bdc259f3bd7f6485861d5cd6183c9c |
|
Two more tests:
|
Some tips:
|
If I add I am booting into the RAM, so there is only one boot/ partition alone, and the boot process should finish at the initrd state, so the root argument is effectively not in use. |
At this point, I'm quite certain the cause of the problem is that initrd cannot have kernel modules. Don't have an exact pointer, but appears to be it. Am going to test this. |
You should not add this to the boot.cmd!
|
Unfortunately, I cannot recompile from your release, because source code zip/tar.gz does not contain any source/patches. Do you wish to share them? |
I mean do you add anything special on top of https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.8.tar.gz ? |
So what I did now: I created a kernel defconfig based on your kernel config with all modules (=m) removed and all active modules in lsmod added back (=y). The resulting kernel is only 2M larger than original. It boots, yet with non-working UART - I will check this out, thanks for the pointer! And thanks for so kindly leading my way!! |
@avafinger Are you talking about /etc/securetty? I'm trying to find what you've suggested, is it a systemctl service? |
I can only see that in stock FriendlyDesktop |
Maybe you mean |
Yes. and |
Make sure you have:
|
Meanwhile, I've tested two xhci measures. First, wrote a simple CPU core locker, which should bound application threads to individual cores. However, this does not affect the performance or makes it worse, depending on core indexes selection. Second, I've installed
This also does not improve the performance, yet works in principle: if min/max bounds are lower, then xhci application is slower. I will also look into how callback threads are waiting for sync. There is a chance that on ARM glib is using a timer with limited resolution, rounding delays towards higher values. I'd highly appreciate any other ideas! |
What seem strange is a USB 3.0 camera won't work on its full FPS, as it does on the desktop, even with the newest EOAN kernel. I have to admit, 5.4 kernel so far shows the best FPS rate of all options, which is a pretty nice job!
FriendlyArm's 4.4 had ugly bugs on xhci, making USB 3.0 mostly not working at all. This was fixed only very recently.
Still, 5.4 kernel is yet far beyond the expected frame rate of desktop. I see CPU load is only about 30%. USB3 device is shown 5000M SuperSpeed, which is correct. The FPS rate seems to get down, if sdcard is intensively in use. Do you know of any measures to improve the xhci performance?
The text was updated successfully, but these errors were encountered: