As per procfs man
/proc/[pid]/stat (39) processor %d (since Linux 2.2.8) CPU number last executed on.
I can see, there is -1 value for some tasks
$ cat /proc/1185/task/1283/stat | awk '{print $39}'
-1
or
$ cat /proc/1283/stat | awk '{print $39}'
-1
Top shows 3 for this thread. (in thread mode and selecting P = Last Used Cpu (SMP) field)
What does this -1 signifies, which processor number it corresponds to?
Also, why this number is greater than existing cpu sometimes,
$ cat /proc/1800/stat | awk '{print $39}'
17
$ cat /sys/devices/system/cpu/online
0-15
$ ps -eLo pid,psr | grep 1800
1800 14
What exactly (39) processor represents in /proc/[pid[/stat file ?
Seems, like lack of documentation.