Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2005 00:12:03 -0700
From:      Lei Sun <lei.sun@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   only see cpu0 working after rebuilding kernel with SMP support
Message-ID:  <d396fddf05072200121b068cd9@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I wanted to enable the second logical CPU on my P4 HT. and...

Something seems to be strange to me as:

All of the processes are running with CPU0 and none is working with CPU1

---------------------------------------------------------------------------=
------------------------------
last pid:   479;  load averages:  0.00,  0.02,  0.03                 =20
                                                              up
0+00:10:34  00:05:10
21 processes:  1 running, 20 sleeping
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% id=
le
Mem: 6072K Active, 4748K Inact, 18M Wired, 8000K Buf, 1975M Free
Swap: 4071M Total, 4071M Free

  PID USERNAME PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND
  437 ls        96    0  6116K  2944K select 0   0:00  0.00%  0.00% sshd
  440 root       8    0  3128K  1996K wait   0   0:00  0.00%  0.00% bash
  426 root       5   -4  1616K  1212K ttyin  0   0:00  0.00%  0.00% login
  434 root       4    0  6136K  2884K sbwait 0   0:00  0.00%  0.00% sshd
  438 ls         8    0  3088K  1852K wait   0   0:00  0.00%  0.00% bash
  439 ls         8    0  1608K  1284K wait   0   0:00  0.00%  0.00% su
  259 root      96    0  1324K   892K select 0   0:00  0.00%  0.00% syslogd
  376 root      96    0  3476K  2668K select 0   0:00  0.00%  0.00% sendmai=
l
  479 root      96    0  2304K  1572K CPU0   0   0:00  0.00%  0.00% top
  392 root       8    0  1364K  1052K nanslp 0   0:00  0.00%  0.00% cron
  433 root       5    0  1288K   952K ttyin  0   0:00  0.00%  0.00% getty
  432 root       5    0  1288K   952K ttyin  0   0:00  0.00%  0.00% getty
  430 root       5    0  1288K   952K ttyin  0   0:00  0.00%  0.00% getty
  428 root       5    0  1288K   952K ttyin  0   0:00  0.00%  0.00% getty
  431 root       5    0  1288K   952K ttyin  0   0:00  0.00%  0.00% getty
  429 root       5    0  1288K   952K ttyin  0   0:00  0.00%  0.00% getty
  427 root       5    0  1288K   952K ttyin  0   0:00  0.00%  0.00% getty
  370 root      96    0  3384K  2476K select 0   0:00  0.00%  0.00% sshd
  380 smmsp     20    0  3356K  2696K pause  0   0:00  0.00%  0.00% sendmai=
l
  181 root      20    0  1192K   648K pause  0   0:00  0.00%  0.00% adjkern=
tz
  241 root     114    0   516K   356K select 0   0:00  0.00%  0.00% devd
---------------------------------------------------------------------------=
------------------------------

Here is the steps and places I read and followed

1. I followed the custom kernel documents from
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-buil=
ding.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-conf=
ig.html
http://www.freebsddiary.org/smp.php

and compiled the custom kernel

and my kernel config:
-------------------------------------------------
...
options         SMP
device          apic                    # I/O APIC
...
-------------------------------------------------

2. Then I compiled the custom kernel, and installed it

3. I check the startup output, and found
SMP: AP CPU #1 Launched!

So my question is, how come in top, only cpu0 is working, and no entry for =
cpu1?

Thanks in advance:)

Lei



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d396fddf05072200121b068cd9>