Wind River Support Network

HomeDefectsLIN8-5156
Fixed

LIN8-5156 : CLONE - CLONE - Incorrect CPU load for SCHED_FIFO threads via proc

Created: Nov 21, 2016    Updated: Dec 3, 2018
Resolved Date: Dec 1, 2016
Previous ID: LIN7-7032
Found In Version: 8.0.0.11
Fix Version: 8.0.0.12
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Kernel

Description

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.

Steps to Reproduce

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.

Other Downloads


Live chat
Online