Improve CPU load calculation#105
Conversation
JamesOHeaDLS
left a comment
There was a problem hiding this comment.
Overall it looks good. I have added some inline review comments to the code.
Have you tested how the system behaves if no CPU is recognised?
Thanks,
James
|
I made this test Now, the usage percentage of each task is summed into the first core usage. |
c1c0c8a to
6623190
Compare
227e8de to
af9855d
Compare
|
@JamesOHeaDLS, I think that all of your suggestions are sorted. As I have made a few changes, would be nice to have a look again just in case I've missed something. Thanks. |
JamesOHeaDLS
left a comment
There was a problem hiding this comment.
Looks good overall. I have made a couple of comments/suggestions
3c2294c to
5494862
Compare
|
A personal reminder to change the debug level of each task frequency/time/percentage from |
The PowerPMAC firmware already adjusts BgDeltaTime when BgSleepTime changes Remove repeated snippet caused by merging with conflicts
Gets the number of cores for each type of CPU. Defines in which core the tasks are executed - for ARM arch it reads from the controller. It doesn't take in account Ethercat tasks. Calculates the CPU load for each core based on the tasks defined - maximum of 4 cores.
PR #103 sorts that in the correct way
Move debug messages to getCpuNumCores Changed from debugf to printf as it runs only during the startup.
9cc2b88 to
c3497fd
Compare
|
Tagged as 2-6-4b3. |
Improve CPU load calculation for Power PMAC, being possible to read the usage for up to 4 cores.
For ARM architecture, supports custom core management reading the core that executes each task (phase, servo, RT and background).