Fixed
Created: Nov 16, 2016
Updated: Sep 8, 2018
Resolved Date: Nov 21, 2016
Previous ID: LIN6-11962
Found In Version: 7.0.0.20
Fix Version: 7.0.0.22
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: Kernel
When measuring CPU utilisation of different threads (using "top") we notice that some RT threads report utilisation % that is much greater than 100% (sometimes absurdly high, e.g. 400% or even 3000%). The threads are created SCHED_FIFO.
See attached test code.
Running the attached code on the target you will occasionally see a thread using >100% of a core, which is of course impossible.
NOTE: use "top -H" to see threads.
Example results:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6057 root -17 0 105m 516 352 R 102 0.1 20:37.21 futex_np_test
6056 root -16 0 105m 516 352 R 101 0.1 20:12.93 futex_np_test
6055 root -15 0 105m 516 352 R 96 0.1 19:24.79 futex_np_test
6054 root -14 0 105m 516 352 R 89 0.1 17:53.11 futex_np_test
6053 root -13 0 105m 516 352 R 84 0.1 16:53.51 futex_np_test
6052 root -12 0 105m 516 352 D 59 0.1 11:51.13 futex_np_test
6051 root -11 0 105m 516 352 D 30 0.1 6:07.76 futex_np_test
6050 root -10 0 105m 516 352 D 8 0.1 1:40.70 futex_np_test
6096 root 20 0 2356 1136 784 R 3 0.1 0:01.60 top
It took some time to see a thread exceed 100%, so it does not happen all of the time and may be related to other activity on the target. It may be possible to modify the test to show the behaviour more frequently, or perhaps just adding some external load would help.