some processes are running on a powered-off core

Hi,

I observe that when I use echo 0 > /sys/devices/system/cpu/cpu3/online to power off the core3, the command ps -aF shows that there are still some processes are running on this core. The tegrastats shows core3 is already off. Could you help to explain? Thanls

[s]For knowing which core a process runs on from ps, you may use psr such as:

ps -eo pid,user,psr,args

[/s]
[s]Sorry for misunderstanding. I have set nvpmodel to 1, rebooted, and I see tegrastats saying CPU1 and CPU2 to be off, but ps reporting processes running on these.
No idea where this discrepancy comes from, though.
Got same information from mpstat:

root@tegra-ubuntu:/home/nvidia# nvpmodel -q
NV Power Mode: MAXQ
1
root@tegra-ubuntu:/home/nvidia# mpstat -A| tail -7
04:20:15 PM  CPU       HI/s    TIMER/s   NET_TX/s   NET_RX/s    BLOCK/s BLOCK_IOPOLL/s  TASKLET/s    SCHED/s  HRTIMER/s      RCU/s
04:20:15 PM    0       0.01      30.05       0.00       5.22       0.14           0.00      18.60      24.56       0.00      20.23
04:20:15 PM    1       0.00       3.31       0.00       0.00       0.02           0.00       0.00       5.00       0.00       2.59
04:20:15 PM    2       0.00       2.70       0.00       0.00       0.00           0.00       0.00       1.56       0.00       3.23
04:20:15 PM    3       0.00      45.79       0.00       0.07       0.03           0.00       0.00      35.24       0.00      18.49
04:20:15 PM    4       0.00      30.24       0.00       0.08       0.03           0.00       0.03      21.19       0.00      15.63
04:20:15 PM    5       0.00      30.89       0.00       0.10       0.03           0.00       0.00      21.90       0.00      13.95

But, intersestingly, using top and pressing ‘1’, I see no cpu1 nor cpu2 :

top - 16:27:54 up 48 min,  2 users,  load average: 1.37, 1.37, 1.31
Tasks: 315 total,   1 running, 314 sleeping,   0 stopped,   0 zombie
%Cpu0  :  3.3 us,  1.7 sy,  0.0 ni, 94.7 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st
%Cpu3  :  4.6 us,  2.0 sy,  0.0 ni, 93.4 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  9.0 us,  3.7 sy,  0.0 ni, 87.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  7.6 us,  4.1 sy,  0.0 ni, 88.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  8039460 total,  5952520 free,  1137448 used,   949492 buff/cache
KiB Swap:  8198140 total,  8198140 free,        0 used.  6743180 avail Mem

[/s]

Sorry again, I’m afraid I have just added confusion.
The process running on core 1 & 2 were just services or irq handlers, watchdogs…The core is not off, it is just unavailable for new process. This explains what reported mpstat or ps -eF.
It seems to me it’s working fine (using R28.2-DP).

However, I have also seen this scenario:

sudo su
root@tegra-ubuntu:/home/nvidia# ps -aF
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
nvidia    1514  1413  0  1956  4252   4 18:45 ttyS0    00:00:00 -bash
<b>root      3038  2435  1  2606  3872   3 18:59 pts/7    00:00:00 sudo su</b>
root      3039  3038  1  2509  3576   0 18:59 pts/7    00:00:00 su
root      3040  3039  0  1631  3188   0 18:59 pts/7    00:00:00 bash
root      3050  3040  0  2101  2852   4 18:59 pts/7    00:00:00 ps -aF
root@tegra-ubuntu:/home/nvidia# echo 0 > /sys/devices/system/cpu/cpu3/online
root@tegra-ubuntu:/home/nvidia# ps -aF
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
nvidia    1514  1413  0  1956  4252   4 18:45 ttyS0    00:00:00 -bash
<b>root      3038  2435  0  2606  3872   3 18:59 pts/7    00:00:00 sudo su</b>
root      3039  3038  0  2509  3576   0 18:59 pts/7    00:00:00 su
root      3040  3039  0  1631  3336   0 18:59 pts/7    00:00:00 bash
root      3052  3040  0  2101  2808   0 18:59 pts/7    00:00:00 ps -aF

Here, the sudo su command being run on core 3, it still appears until you exit. Once you exit, next commands should execute only on online cores.
Could you post some reproducible procedure and logs, with L4T version and if any basic info for your customization ?