i.mx283 usbcore occupies too much CPU time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx283 usbcore occupies too much CPU time

Jump to solution
849 Views
jianhuaqiu
Contributor II

Platform : i.mx283 EVK board, linux 2.6.35

2 test cases is followed:

   1. If the kernel config option of "usb" is checked, that is to say, usbcore driver is a built-in driver in the uImage, when the kernel starts up,shell command of "uptime" say "... load average: 2.01, 1.99,1.97" . That is abnormal cpu loadaverage!

   2. If I remove kernel config option of "usb", I build a uImage file without a built-in usb driver. when this kernel starts up, the cpu load average is " load average 0.2, 0.1 ,0.0". there is no problem.

By the way, there is no user's applications run on the above 2 tested cases, only kernel runs.

Question:

Anyone meet this problem? What causes this abnormal cpu loadaverage problem?

Labels (1)
1 Solution
596 Views
jianhuaqiu
Contributor II

Hi Vitor,

Thanks for your reply.

I found the reason of loadaverage issue.

Please see the attechment of "loadaverage.txt", and focus on the process named "usb_wakeup thread",which PID is 245,STAT is "DW". Because the usb0_id pin of i.mx283 is always high valtage(3.3v) on my board, kernel consider this usbport acting as a USBdevice,then usb_wakeup thread initiate continuous interruptions.

Solutions:
1. ground usb0_id pin;
or
2. remove usb_wakeup.o from arch/arm/plat-mxs/Makefile, then build a kernel without usbwakeup thread

This information may be helpful to others.

Thanks

John

View solution in original post

4 Replies
596 Views
b36401
NXP Employee
NXP Employee

At this moment I have no idea what may go wrong.
Please check which exact processes are using the CPU.
I mean you can tun "top" utility for such purposes.
It may provide more detailed information regarding the issue.

Have a great day,
Victor

0 Kudos
596 Views
jianhuaqiu
Contributor II

Hi Victor,

Thanks for your reply.

Please check out the attachment, you can see that the loadaverage is too high.

Notes:

1. There is no user's application in this firmware.

2. There is built-in usb driver(usbcore) in this kernel.

3. If load a uImage without usb driver(usbcore), loadaverage is in normal range( loadaverage < 0.2 ).

Thanks,

John

在 2017-04-20 10:57:05,"b36401" <admin@community.nxp.com> 写道:

|

|

NXP Community

|

|

Re: i.mx283 usbcore occupies too much CPU time

reply from Victor Linnik in i.MX Community - View the full discussion

At this moment I have no idea what may go wrong.

Please check which exact processes are using the CPU.

I mean you can tun "top" utility for such purposes.

It may provide more detailed information regarding the issue.

Have a great day,

Victor

Reply to this message by replying to this email, or go to the message on NXP Community

Start a new discussion in i.MX Community by email or at NXP Community

Following Re: i.mx283 usbcore occupies too much CPU time in these streams: Inbox

This email was sent by NXP Community because you are a registered user.

You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences

|

|

0 Kudos
596 Views
b36401
NXP Employee
NXP Employee

From the output of "top" utility I do not see any processes loads the CPU.

As for /proc/loadavg data "1/35" field means that there are 35 processes totally and 1 of them is really running (not waiting for something) at that exact moment. I suppose this process was "cat /proc/loadavg" itself.

So I suppose 1.99 load average value is erroneous. Perhaps there is something wrong with load average calculating.

Please try to check the speed (some simple benchmark) with and without USB.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
597 Views
jianhuaqiu
Contributor II

Hi Vitor,

Thanks for your reply.

I found the reason of loadaverage issue.

Please see the attechment of "loadaverage.txt", and focus on the process named "usb_wakeup thread",which PID is 245,STAT is "DW". Because the usb0_id pin of i.mx283 is always high valtage(3.3v) on my board, kernel consider this usbport acting as a USBdevice,then usb_wakeup thread initiate continuous interruptions.

Solutions:
1. ground usb0_id pin;
or
2. remove usb_wakeup.o from arch/arm/plat-mxs/Makefile, then build a kernel without usbwakeup thread

This information may be helpful to others.

Thanks

John