Why does tuna displays incorrect cpu affinity of process when any cpu is offlined?

Solution Verified - Updated -

Issue

  • Why does tuna displays incorrect cpu affinity of process when any cpu is offlined?
# sha1sum /dev/zero &
[1] 31182

# taskset -p 31182
pid 31182's current affinity mask: ffff

# taskset -cp 31182
pid 31182's current affinity list: 0-15

# tuna -t sha1sum -P
                      thread       ctxt_switches
    pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd 
  31182  OTHER     0   0xffff         0           51         sha1sum  

crash> eval -b 0xffff
hexadecimal: ffff  
    decimal: 65535  
      octal: 177777
     binary: 0000000000000000000000000000000000000000000000001111111111111111
   bits set: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0     [cpu-list]

AFTER DISABLING CPU
*******************

# chcpu -d 6
CPU 6 disabled

# lscpu|grep line
On-line CPU(s) list:             0-5,7-15
Off-line CPU(s) list:            6

# taskset -cp 31182
pid 31182's current affinity list: 0-5,7-15

# taskset -p 31182
pid 31182's current affinity mask: ffbf   [bits set: 15 14 13 12 11 10 9 8 7 5 4 3 2 1 0]

# tuna -t sha1sum -P
                      thread       ctxt_switches
    pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd 
  31182  OTHER     0   0x7fbf         0          124         sha1sum  
                       ^^^^^^
                        ||||  <----- [ incorrect ]

crash> eval -b 0x7fbf
hexadecimal: 7fbf  
    decimal: 32703  
      octal: 77677
     binary: 0000000000000000000000000000000000000000000000000111111110111111
   bits set: 14 13 12 11 10 9 8 7 5 4 3 2 1 0 

Environment

  • Red Hat Enterprise Linux 8.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content