Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 2008 15:36:10 +0200
From:      Alexander Melnik <0ld@ukr.net>
To:        "FreeBSD Stable Mailing List" <freebsd-stable@freebsd.org>
Subject:   can't disable hyperthreading on 7.1
Message-ID:  <200812241536.10563.0ld@ukr.net>

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

I have several computers with 2 xeon processors with hyperthreading under FreeBSD 7.1-RC2 and in any case can not turn off hyperthreading:

[old@vmat ~]$ cat /boot/loader.conf
machdep.hyperthreading_allowed="0"
machdep.hlt_logical_cpus="1"

[old@vmat ~]$ sysctl machdep.hyperthreading_allowed
machdep.hyperthreading_allowed: 0

[old@vmat ~]$ sysctl machdep.hlt_logical_cpus
machdep.hlt_logical_cpus: 1

[old@vmat ~]$ sysctl hw.ncpu
hw.ncpu: 4

If machdep.hyperthreading_allowed = "0", the hw.ncpu must be equal to 2?

[old@vmat ~]$ top -nd 1
last pid:   825;  load averages:  0.00,  0.00,  0.00  up 0+00:21:19    15:22:24
17 processes:  1 running, 16 sleeping

Mem: 6228K Active, 6984K Inact, 20M Wired, 9520K Buf, 960M Free
Swap: 2048M Total, 2048M Free


  PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
  762 root        1   4    0  8428K  3936K sbwait 2   0:00  0.00% sshd
  767 old         1   8    0  4396K  2212K wait   2   0:00  0.00% bash
  765 old         1  44    0  8428K  3952K select 0   0:00  0.00% sshd
  571 root        1  44    0  3184K  1200K select 1   0:00  0.00% syslogd
  706 root        1  44    0  5876K  3196K select 0   0:00  0.00% sendmail
  716 root        1   8    0  3212K  1276K nanslp 2   0:00  0.00% cron
  759 root        1   5    0  3184K  1088K ttyin  2   0:00  0.00% getty
  758 root        1   5    0  3184K  1088K ttyin  3   0:00  0.00% getty
  760 root        1   5    0  3184K  1088K ttyin  0   0:00  0.00% getty
  700 root        1  44    0  5752K  3276K select 0   0:00  0.00% sshd
  710 smmsp       1  20    0  5876K  3200K pause  2   0:00  0.00% sendmail
  297 root        1  96    0  3128K  1208K select 0   0:00  0.00% dhclient
  737 root        1  96    0  3240K  1152K select 3   0:00  0.00% inetd
  163 root        1  20    0  1380K   804K pause  0   0:00  0.00% adjkerntz
  512 root        1  44    0  1888K   564K select 0   0:00  0.00% devd
  313 _dhcp       1  44    0  3128K  1320K select 0   0:00  0.00% dhclient
  825 old         1  44    0  3496K  1656K CPU0   0   0:00  0.00% top

	
If machdep.hlt_logical_cpus = "1" in the output top in any case should not be seen processors 2 and 3?

[old@vmat ~]$ uname -a
FreeBSD vmat.ic 7.1-RC2 FreeBSD 7.1-RC2 #0: Wed Dec 24 13:54:22 EET 2008     root@vmat.ic:/usr/obj/usr/src/sys/GENERIC  i386

[old@vmat ~]$ dmesg
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.1-RC2 #0: Wed Dec 24 13:54:22 EET 2008
    root@vmat.ic:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2793.02-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf43  Stepping = 3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x641d<SSE3,DTES64,MON,DS_CPL,CNXT-ID,CX16,xTPR>
  AMD Features=0x20100000<NX,LM>
  Logical CPUs per core: 2
real memory  = 1073479680 (1023 MB)
avail memory = 1036804096 (988 MB)
ACPI APIC Table: <DELL   PE1800  >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  6
 cpu3 (AP): APIC ID:  7
ioapic0: Changing APIC ID to 8
ioapic1: Changing APIC ID to 9
ioapic2: Changing APIC ID to 10
ioapic0 <Version 2.0> irqs 0-23 on motherboard
ioapic1 <Version 2.0> irqs 32-55 on motherboard
ioapic2 <Version 2.0> irqs 64-87 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <DELL PE1800> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 0.0 on pci1
pci2: <ACPI PCI bus> on pcib2
mpt0: <LSILogic 1030 Ultra4 Adapter> port 0xec00-0xecff mem 0xfe9f0000-0xfe9fffff,0xfe9e0000-0xfe9effff irq 42 at device 4.0 on pci2
mpt0: [ITHREAD]
mpt0: MPI Version=1.2.12.0
amr0: <LSILogic MegaRAID 1.53> mem 0xf80f0000-0xf80fffff irq 32 at device 6.0 on pci2
amr0: [ITHREAD]
amr0: delete logical drives supported by controller
amr0: <LSILogic PERC 4/SC> Firmware 352D, BIOS 1.10, 64MB RAM
pcib3: <ACPI PCI-PCI bridge> at device 0.2 on pci1
pci3: <ACPI PCI bus> on pcib3
em0: <Intel(R) PRO/1000 Network Connection 6.9.6> port 0xdcc0-0xdcff mem 0xfe7e0000-0xfe7fffff irq 69 at device 7.0 on pci3
em0: [FILTER]
em0: Ethernet address: 00:14:22:75:5a:54
pcib4: <ACPI PCI-PCI bridge> at device 4.0 on pci0
pci4: <ACPI PCI bus> on pcib4
pcib5: <ACPI PCI-PCI bridge> at device 6.0 on pci0
pci5: <ACPI PCI bus> on pcib5
uhci0: <Intel 82801EB (ICH5) USB controller USB-A> port 0xbce0-0xbcff irq 16 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: <Intel 82801EB (ICH5) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801EB (ICH5) USB controller USB-B> port 0xbcc0-0xbcdf irq 19 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: <Intel 82801EB (ICH5) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <Intel 82801EB (ICH5) USB controller USB-C> port 0xbca0-0xbcbf irq 18 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <Intel 82801EB (ICH5) USB controller USB-C> on uhci2
usb2: USB revision 1.0
uhub2: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
ehci0: <Intel 82801EB/R (ICH5) USB 2.0 controller> mem 0xfeb00000-0xfeb003ff irq 23 at device 29.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
usb3: <Intel 82801EB/R (ICH5) USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb3
uhub3: 6 ports with 6 removable, self powered
pcib6: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci6: <ACPI PCI bus> on pcib6
pci6: <simple comms> at device 3.0 (no driver attached)
vgapci0: <VGA-compatible display> port 0xc800-0xc8ff mem 0xf0000000-0xf7ffffff,0xfe3f0000-0xfe3fffff irq 17 at device 5.0 on pci6
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH5 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfc00-0xfc0f at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
cpu0: <ACPI CPU> on acpi0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
p4tcc1: <CPU Frequency Thermal Control> on cpu1
cpu2: <ACPI CPU> on acpi0
p4tcc2: <CPU Frequency Thermal Control> on cpu2
cpu3: <ACPI CPU> on acpi0
p4tcc3: <CPU Frequency Thermal Control> on cpu3
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcafff,0xcb000-0xcb7ff,0xec000-0xeffff pnpid ORM0000 on isa0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
plip0: <PLIP network interface> on ppbus0
plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
acd0: CDRW <HL-DT-ST RW/DVD GCC-4521B/1.05> at ata0-master UDMA33
Waiting 5 seconds for SCSI devices to settle
amr0: delete logical drives supported by controller
amrd0: <LSILogic MegaRAID logical drive> on amr0
amrd0: 69360MB (142049280 sectors) RAID 5 (optimal)
ses0 at amr0 bus 0 target 6 lun 0
ses0: <SDR GEM318P 1> Fixed Processor SCSI-2 device
ses0: 166.664MB/s transfers (41.666MHz, offset 31, 32bit)
ses0: SAF-TE Compliant Device
SMP: AP CPU #2 Launched!
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
Trying to mount root from ufs:/dev/amrd0s1a

Sorry for my bad English.
-- 
Bye! A.M.



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