-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
The NuttX poll system call is slow #6840
Comments
@pavel-kirienko are we sure PMP™ is properly accounting for NuttX context switches? It seems logical some of the time spent in poll would be attributable to context switching and running another task. |
@NaterGator Yes, we can be reasonably sure that PMP™ produces sufficiently reliable data. Context switch from/into |
I have finally got to instrument this with HW, The number in the PMP™ do not match the values I am getting A1-A2 From task ublock to the pol call is < 9 uS I am not sure what we are seeing from the PMP™ the the rest of this it thread on the waitlist. |
The timing estimates you provided cannot be directly compared against the data provided by PMP™. PMP™ assesses the contribution of every procedure/function/method to the total CPU load. The contribution per procedure is a function of the amount of time the procedure takes to execute multiplied by the number of its invocations. For example, consider a function X that takes forever to execute and invoked rarely, and a function Y that completes very quickly but is invoked frequently. From the standpoint of any sampling profiler (such as PMP™), the contribution of both could be equal. My point is that the estimated duration of the |
According to the data from the linked thread, |
I think it is good to know, as you pointed out, that when looking at the the PMP™ output there is the 'frequency of use of' and the 'amount of time' that has to be considered. Would you agree in this case nuttx poll is not slow, but just used a lot? |
36 microseconds (6480 cycles) is slow. :) Given the frequent use of this function, I would take a closer look at its implementation and see what can be sped up. |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
The
poll()
system call takes a very long time to execute. Since it is extensively used in many high frequency data processing loops, this issue has a significant impact on overall performance of the system.See this for more context: #6829 (comment)
The text was updated successfully, but these errors were encountered: