Discussion

High system load due to a known kernel / OTG bug

12 3367
Hello,

I'm currently testing 3.4.103 from LeMaker but I'm suffering for a bug that seems known for a while : https://groups.google.com/forum/#!topic/linux-sunxi/iNkoc1dI394

I found another thread that solves the issue modifying the FEX file : https://www.olimex.com/forum/index.php?topic=1757.0
  1. [usbc0]
  2. usb_used = 1
  3. usb_port_type = 1
  4. usb_detect_type = 0
  5. usb_id_gpio = port:PH04<0><1><default><default>
  6. usb_det_vbus_gpio = port:PH05<0><0><default><default>
  7. usb_drv_vbus_gpio = port:PB09<1><0><default><0>
  8. usb_restrict_gpio = port:PH00<1><0><default><0>
  9. usb_host_init_state = 1
  10. usb_restric_flag = 0
  11. usb_restric_voltage = 3550000
  12. usb_restric_capacity = 5
Copy the Code
Is someone else facing this issue ?
Is it known by LeMaker and when they will release a new kernel with this issue fixed ?
In any case, I think LeMaker's script.fex has to be corrected but I duno if it isn't deactivating OTG (changing usb_port_type from 2 to 1 is supposed to do so, but I don't use this feature).

Bye

Laurent
I have also read this information months ago. And at the early version OS images, the OTG is closed by default. But many users do not like that, so we then opened it by default. And I have talked about that in many threads. And when we change the usb_port_type, the OTG can not work full function

Hmm...

Perhaps an option in bpi-config, that explains the CPU load for USB_OTG if enabled, for enabling/disabling USB_OTG?

What is strange is this bug is flying around for months and nobody seems having solving it.
I soon as I upgraded to main system, I'll try on my second one with recent kernel and check if this bug is still here ...

destroyedlolo replied at Wed Dec 31, 2014 11:47
What is strange is this bug is flying around for months and nobody seems having solving it.
I soon a ...

There is an important number of bugs "flying around for months" and nobody does solve it.

So imho this is not strange but a sad fact of life ;)

LinAdmin replied at Fri Jan 2, 2015 14:49
There is an important number of bugs "flying around for months" and nobody does solve it.

So imho ...

Well, some time ago, I had a huge problem with the nasty i915 graphical card on some of my PCes.
It was solved in few days ...

Now, as it doesn't consume CPU, this one is probably harmless ... but anyway

Hi all,


on my side as well, load is quite high !! it's at least 1 (minimum) when I'm fully idle and I should be 0 or maybe 0.05 !!
CPU usage is nearly zero ... so I don't understand what could be causing this.

Any idea ?

You have to disable USB_OTG on your kernel : as per some stuffs google found for me, it seems they are some busy wait polling in the kernel for OTG.

Why busy wait?

Why not set an interrupt for say 100us, then check OTG with that?

You have to ask to this kernel driver developer
I guess it's driven by a timer but or it is too slow, or there is some other issue I don't know, but anyway, if(the load is 1, the CPU utilization is still low(the load means there is at least 1 tasks running or pending every time the kernel sample for load).
So, all is all, the impact is negligible, but I disable this "feature" as I don't I don't use OTG and I like having real load usage.

You have to log in before you can reply Login | Sign Up

Points Rules