Re: idle task running on the wrong CPU

From: John Baldwin <jhb_at_freebsd.org>
Date: Wed, 23 Nov 2005 08:51:57 -0500
On Wednesday 23 November 2005 04:03 am, Kris Kennaway wrote:
> On 6.0-STABLE:
>
>   PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
>    13 root        1 171   52     0K     8K CPU1   0   0:00 100.00% idle:
> cpu1
>
> Note: the cpu1 idle task is running on CPU 0.  Actually it is not
> running, since it's not accumulating any CPU time, and in fact nothing
> at all is being scheduled on CPU 1.

It is running, but is not accumulating time because it sits in a hlt loop.  
Also, the 'state == CPU1' means it is running on CPU1.  The 'C' column is the 
column for the CPU this process last ran on.  If this is a HT CPU disabled by 
default during boot, then that thread has yet to perform a context switch, 
and all threads start off when they are created with the lastcpu being CPU 0, 
so it won't update the 'C' column until it actually does a context switch.  
I'm not sure why it is not accumulating time, however.

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Wed Nov 23 2005 - 12:55:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:48 UTC