evl ps cpu time reporting issue

Giulio Moro <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Hy there,
I found a few issues with the output of ps -st.
The most crucial one is that sometimes it reports excessive CPU usage, e.g. (running watch -n1 evl  ps -st):


  CPU   PID   ISW     CTXSW     SYS       RWA       STAT     TIMEOUT      %CPU      CPUTIME       NAME
    1   947   105     119       203       1          X          -           0.0      0:011.988    test-pd:947:1804289383
    1   952   2       2         3         0          X          -           0.0      0:000.087    systemTask
    1   954   2       2         3         0          X          -           0.0      0:000.056    WSServer_40100
    1   956   2       2         3         0          X          -           0.0      0:000.070    WSClient_signalMonitor40100_bin
    1   1003  2       2         3         0          X          -           0.0      0:000.054    WSServer_5555
    1   1004  2       2         3         0          X          -           0.0      0:000.054    WSClient_gui_data5555_bin
    1   1005  2       2         3         0          X          -           0.0      0:000.044    WSClient_gui_control5555_bin
    1   1006  15      15        47        0          X          -           0.0      0:000.594    WSServer_5432
    1   1007  504     514       505       0          X          -           0.0      0:021.035    WSClient_scope_data5432_bin
    1   1008  2       2         3         0          X          -           0.0      0:000.049    WSClient_scope_control5432_bin
    1   1009  48842   73393     123151    24420      W          -           0.0      0:380.085    scope-trigger-task
    0   1011  6640    31157     37608     23656      W          -         1193652.1      0:642.101    thread:947:0xffffb3c0fe30:2214587712
    1   1012  774278  1546216   776625    0          D       001.393        0.5      7:690.643    libpd-fdTask
    1   1013  0       2         4         0          W          -           0.0      0:000.081    touchSensorRead
    3   1019  2       28822348  28885721  27                 011           48.3   1092:295.224    bela-audio

note that thread:947:0xffffb3c0fe30:2214587712 has 1193652.1% CPU. In another case it reported 1405727.9, in another something like 16000; some other times it shows between 60% and 150% ... In the instances I've seen, it was only this thread that was affected, no other one. The thread should never go anywhere 10%: most of the time it sleeps on an evl_wait_event(); when it's woken up, it reads 4k of data from disk (thus switching to secondary mode), puts it in a buffer, signals another evl condition variable via evl_signal_event() (thus switching to primary mode) and goes back to sleep in evl_wait_event().

Now, I cannot exclude that there may be something wrong in my code, which may justify the occasional 60% reading  (I didn't write it myself, only ported it to evl, and I didn't inspect it closely), but there's clearly something pathological in evl's CPU reporting system with anything above 100%, I guess?

As usual, I am running this on ARM64 (PocketBeagle 2)
evl.0.55 -- #98a8b88 (2025-10-08 22:41:39 +0000) [requires ABI 42]
Linux bela 6.12.49-arm64-ti-evl #4 SMP EVL Sun Nov  2 19:24:32 UTC 2025 aarch64 GNU/Linux

Best,
Giulio
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.