так получилось, что предыдущий админ оставил мне машину с парочкой Ксеонов, каждый из которых HT, итого 4 логических, и все это хозяйство с однопроцессорным ядром. обидно, да?
перекомпилял кернель не в первый раз конечно, но в третий :) до этого все было хорошо. раскомментарил строчки
# To make an SMP kernel, the next two are needed
options SMP # Symmetric MultiProcessor Kernel
options APIC_IO # Symmetric (APIC) I/O
убрал явно лишние девайсы типа PCMCIA...
проблема при буте - виснет. привожу /var/log/messages:
Oct 14 18:04:18 freebsd /kernel: Copyright (c) 1992-2002 The FreeBSD Project.
Oct 14 18:04:18 freebsd /kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Oct 14 18:04:18 freebsd /kernel: The Regents of the University of California. All rights reserved.
Oct 14 18:04:18 freebsd /kernel: FreeBSD 4.6-RELEASE #0: Tue Oct 14 17:06:00 MSD 2003
Oct 14 18:04:18 freebsd /kernel: jammer@freebsd.s.ocv.ru:/usr/obj/usr/src/sys/MYKERNEL
Oct 14 18:04:18 freebsd /kernel: Timecounter "i8254" frequency 1193182 Hz
Oct 14 18:04:18 freebsd /kernel: CPU: Pentium 4 (1794.19-MHz 686-class CPU)
Oct 14 18:04:18 freebsd /kernel: Origin = "GenuineIntel" Id = 0xf24 Stepping = 4
Oct 14 18:04:18 freebsd /kernel: Features=0x3febfbff<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,<b28>,ACC>
Oct 14 18:04:18 freebsd /kernel: real memory = 1073217536 (1048064K bytes)
Oct 14 18:04:18 freebsd /kernel: avail memory = 1039896576 (1015524K bytes)
Oct 14 18:04:18 freebsd /kernel: Copyright (c) 1992-2002 The FreeBSD Project.
Oct 14 18:04:18 freebsd /kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Oct 14 18:04:18 freebsd /kernel: The Regents of the University of California. All rights reserved.
Oct 14 18:04:18 freebsd /kernel: FreeBSD 4.6-RELEASE #0: Tue Oct 14 17:06:00 MSD 2003
Oct 14 18:04:18 freebsd /kernel: jammer@freebsd.s.ocv.ru:/usr/obj/usr/src/sys/MYKERNEL
Oct 14 18:04:18 freebsd /kernel: Timecounter "i8254" frequency 1193182 Hz
Oct 14 18:04:18 freebsd /kernel: CPU: Pentium 4 (1794.19-MHz 686-class CPU)
Oct 14 18:04:18 freebsd /kernel: Origin = "GenuineIntel" Id = 0xf24 Stepping = 4
Oct 14 18:04:18 freebsd /kernel: Features=0x3febfbff<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,<b28>,ACC>
Oct 14 18:04:18 freebsd /kernel: real memory = 1073217536 (1048064K bytes)
Oct 14 18:04:18 freebsd /kernel: avail memory = 1039880192 (1015508K bytes)
Oct 14 18:04:18 freebsd /kernel: Programming 24 pins in IOAPIC #0
Oct 14 18:04:18 freebsd /kernel: IOAPIC #0 intpin 2 -> irq 0
Oct 14 18:04:18 freebsd /kernel: Programming 24 pins in IOAPIC #1
Oct 14 18:04:18 freebsd /kernel: Programming 24 pins in IOAPIC #2
Oct 14 18:04:18 freebsd /kernel: AP #1 (PHY# 6) failed!
Oct 14 18:04:18 freebsd /kernel: panic y/n? [y] FreeBSD/SMP: Multiprocessor motherboard
Oct 14 18:04:18 freebsd /kernel: cpu0 (BSP): apic id: 0, version: 0x00050014, at 0xfee00000
Oct 14 18:04:18 freebsd /kernel: cpu1 (AP): apic id: 6, version: 0x00000000, at 0xfee00000
Oct 14 18:04:18 freebsd /kernel: io0 (APIC): apic id: 2, version: 0x00178020, at 0xfec00000
Oct 14 18:04:18 freebsd /kernel: io1 (APIC): apic id: 3, version: 0x00178020, at 0xfec80000
Oct 14 18:04:18 freebsd /kernel: io2 (APIC): apic id: 4, version: 0x00178020, at 0xfec80400
Oct 14 18:04:18 freebsd /kernel: md0: Malloc disk
Oct 14 18:04:18 freebsd /kernel: Using $PIR table, 17 entries at 0xc00fdeb0
Oct 14 18:04:18 freebsd /kernel: npx0: <math processor> on motherboard
Oct 14 18:04:18 freebsd /kernel: npx0: INT 16 interface
Oct 14 18:04:18 freebsd /kernel: pcib0: <Host to PCI bridge> on motherboard
Oct 14 18:04:18 freebsd /kernel: IOAPIC #0 intpin 16 -> irq 2
Oct 14 18:04:18 freebsd /kernel: IOAPIC #0 intpin 19 -> irq 5
Oct 14 18:04:18 freebsd /kernel: IOAPIC #0 intpin 17 -> irq 10
Oct 14 18:04:18 freebsd /kernel: pci0: <PCI bus> on pcib0
Oct 14 18:04:18 freebsd /kernel: pci0: <unknown card> (vendor=0x8086, dev=0x2541) at 0.1
Oct 14 18:04:18 freebsd /kernel: pcib1: <PCI to PCI bridge (vendor=8086 device=2543)> at device 2.0 on pci0
Oct 14 18:04:18 freebsd /kernel: pci1: <PCI bus> on pcib1
Oct 14 18:04:18 freebsd /kernel: pci1: <unknown card> (vendor=0x8086, dev=0x1461) at 28.0
Oct 14 18:04:18 freebsd /kernel: pcib2: <PCI to PCI bridge (vendor=8086 device=1460)> at device 29.0 on pci1
Oct 14 18:04:18 freebsd /kernel: IOAPIC #1 intpin 4 -> irq 11
Oct 14 18:04:18 freebsd /kernel: pci2: <PCI bus> on pcib2
Oct 14 18:04:18 freebsd /kernel: iir0: <Intel Integrated RAID Controller> mem 0xfe200000-0xfe203fff irq 11 at device 2.0 on pci2
Oct 14 18:04:18 freebsd /kernel: pci1: <unknown card> (vendor=0x8086, dev=0x1461) at 30.0
Oct 14 18:04:18 freebsd /kernel: pcib3: <PCI to PCI bridge (vendor=8086 device=1460)> at device 31.0 on pci1
Oct 14 18:04:18 freebsd /kernel: pci3: <PCI bus> on pcib3
Oct 14 18:04:18 freebsd /kernel: uhci0: <Intel 82801CA/CAM (ICH3) USB controller USB-A> port 0x7000-0x701f irq 2 at device 29.0 on pci0
Oct 14 18:04:18 freebsd /kernel: usb0: <Intel 82801CA/CAM (ICH3) USB controller USB-A> on uhci0
Oct 14 18:04:18 freebsd /kernel: usb0: USB revision 1.0
Oct 14 18:04:18 freebsd /kernel: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Oct 14 18:04:18 freebsd /kernel: uhub0: 2 ports with 2 removable, self powered
Oct 14 18:04:18 freebsd /kernel: uhci1: <Intel 82801CA/CAM (ICH3) USB controller USB-B> port 0x7020-0x703f irq 5 at device 29.1 on pci0
Oct 14 18:04:18 freebsd /kernel: usb1: <Intel 82801CA/CAM (ICH3) USB controller USB-B> on uhci1
Oct 14 18:04:18 freebsd /kernel: usb1: USB revision 1.0
Oct 14 18:04:18 freebsd /kernel: uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Oct 14 18:04:18 freebsd /kernel: uhub1: 2 ports with 2 removable, self powered
Oct 14 18:04:18 freebsd /kernel: pcib4: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
Oct 14 18:04:18 freebsd /kernel: IOAPIC #0 intpin 21 -> irq 16
Oct 14 18:04:18 freebsd /kernel: IOAPIC #0 intpin 20 -> irq 17
Oct 14 18:04:18 freebsd /kernel: IOAPIC #0 intpin 23 -> irq 18
Oct 14 18:04:18 freebsd /kernel: pci4: <PCI bus> on pcib4
Oct 14 18:04:18 freebsd /kernel: pci4: <ATI Mach64-GR graphics accelerator> at 3.0 irq 16
Oct 14 18:04:18 freebsd /kernel: fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0x8400-0x843f mem 0xfc200000-0xfc21ffff,0xfc241000-0xfc241fff irq 17 at device 4.0 on pci4
Oct 14 18:04:18 freebsd /kernel: fxp0: Ethernet address 00:02:b3:b0:71:42
Oct 14 18:04:18 freebsd /kernel: inphy0: <i82555 10/100 media interface> on miibus0
Oct 14 18:04:18 freebsd /kernel: inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
Oct 14 18:04:18 freebsd /kernel: fxp1: <Intel Pro 10/100B/100+ Ethernet> port 0x8440-0x847f mem 0xfc220000-0xfc23ffff,0xfc242000-0xfc242fff irq 18 at device 5.0 on pci4
Oct 14 18:04:18 freebsd /kernel: fxp1: Ethernet address 00:02:b3:b0:70:f8
Oct 14 18:04:18 freebsd /kernel: inphy1: <i82555 10/100 media interface> on miibus1
Oct 14 18:04:18 freebsd /kernel: inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
Oct 14 18:04:18 freebsd /kernel: isab0: <PCI to ISA bridge (vendor=8086 device=2480)> at device 31.0 on pci0
Oct 14 18:04:18 freebsd /kernel: isa0: <ISA bus> on isab0
Oct 14 18:04:18 freebsd /kernel: atapci0: <Intel ICH3 ATA100 controller> port 0x7040-0x704f,0-0x3,0-0x7,0-0x3,0-0x7 irq 0 at device 31.1 on pci0
Oct 14 18:04:18 freebsd /kernel: ata0: at 0x1f0 irq 14 on atapci0
Oct 14 18:04:18 freebsd /kernel: ata1: at 0x170 irq 15 on atapci0
Oct 14 18:04:18 freebsd /kernel: pci0: <unknown card> (vendor=0x8086, dev=0x2483) at 31.3 irq 10
Oct 14 18:04:18 freebsd /kernel: orm0: <Option ROMs> at iomem 0xc0000-0xc7fff,0xe3800-0xe3fff on isa0
Oct 14 18:04:18 freebsd /kernel: fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
Oct 14 18:04:18 freebsd /kernel: fdc0: FIFO enabled, 8 bytes threshold
Oct 14 18:04:18 freebsd /kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0
Oct 14 18:04:18 freebsd /kernel: atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
Oct 14 18:04:18 freebsd /kernel: atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
Oct 14 18:04:18 freebsd /kernel: kbd0 at atkbd0
Oct 14 18:04:18 freebsd /kernel: vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Oct 14 18:04:18 freebsd /kernel: sc0: <System console> at flags 0x100 on isa0
Oct 14 18:04:18 freebsd /kernel: sc0: VGA <16 virtual consoles, flags=0x300>
Oct 14 18:04:18 freebsd /kernel: sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
Oct 14 18:04:18 freebsd /kernel: sio0: type 16550A
Oct 14 18:04:18 freebsd /kernel: sio1 at port 0x2f8-0x2ff irq 3 on isa0
Oct 14 18:04:18 freebsd /kernel: sio1: type 16550A
Oct 14 18:04:18 freebsd /kernel: ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
Oct 14 18:04:18 freebsd /kernel: ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
Oct 14 18:04:18 freebsd /kernel: ppc0: FIFO with 16/16/9 bytes threshold
Oct 14 18:04:18 freebsd /kernel: plip0: <PLIP network interface> on ppbus0
Oct 14 18:04:18 freebsd /kernel: lpt0: <Printer> on ppbus0
Oct 14 18:04:18 freebsd /kernel: lpt0: Interrupt-driven port
Oct 14 18:04:18 freebsd /kernel: ppi0: <Parallel I/O> on ppbus0
Oct 14 18:04:18 freebsd /kernel: APIC_IO: Testing 8254 interrupt delivery
Oct 14 18:04:18 freebsd /kernel: APIC_IO: routing 8254 via IOAPIC #0 intpin 2
Oct 14 18:04:18 freebsd /kernel: DUMMYNET initialized (011031)
Oct 14 18:04:18 freebsd /kernel: IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
Oct 14 18:04:18 freebsd /kernel: acd0: CD-RW <TDK CDRW4800B> at ata0-master PIO4
Oct 14 18:04:18 freebsd /kernel: Waiting 15 seconds for SCSI devices to settle
Oct 14 18:04:18 freebsd /kernel: da0 at iir0 bus 1 target 0 lun 0
Oct 14 18:04:18 freebsd /kernel: da0: <IIR Host Drive #00 > Fixed Direct Access SCSI-2 device
Oct 14 18:04:18 freebsd /kernel: da0: Tagged Queueing Enabled
Oct 14 18:04:18 freebsd /kernel: da0: 52399MB (107314200 512 byte sectors: 255H 63S/T 6680C)
Oct 14 18:04:18 freebsd /kernel: Mounting root from ufs:da0s1a
Oct 14 18:04:23 freebsd /kernel: Trafcount module v0.2.1 for FreeBSD loaded. (C) 2001 by Amir Shalem.
Oct 14 18:04:26 freebsd upsd[210]: writeport: cannot write to /dev/cuaa0: Resource temporarily unavailable
Oct 14 18:04:26 freebsd last message repeated 19 times
Oct 14 18:04:26 freebsd upsd[210]: last test: , light test:
Oct 14 18:04:26 freebsd upsd[210]: frequency: 0.00, maxvac: 0.0, minvac: 0.0, voltage: 0.0
Oct 14 18:04:26 freebsd upsd[210]: load: 0.0, recharge: 0.0, temp: 0.0, vdc: 0.00, output voltage: 0.0
Oct 14 18:05:34 freebsd login: ROOT LOGIN (jammer) ON ttyv0
Oct 14 18:06:13 freebsd shutdown: reboot by jammer:
[Unix] FreeBSD 4.6: а не может быть все банально?03.11.03 14:33 Автор: mentat[bugtraq.ru] <Александр> Статус: Elderman
# Optional, these are the defaults:
#options NCPU=2 # number of CPUs
#options NBUS=4 # number of busses
#options NAPIC=1 # number of IO APICs
#options NINTR=24 # number of INTs
так вот компилер от 4.6 такие опции не понимает, что было выяснено в процессе экспериментов.
внимание, вопрос: кроме апгрейда версии бзди, что бы могло помочь? в общем и целом, все работает хорошо, кроме этой проблемы. то есть, видимых причин учиться обновлять версию OS пока нет. кроме того, присутствует некоторая уверенность, что и 4.6 может работать на 4-х процессорах (напоминаю, у меня 2 ксеона, и каждый из них с HT, итого 4 "логических").
> > а как насчет > > options HTT # HyperThreading > > Technology > Кстати, да но только по-моему эта опция в 4.6 не > поддерживается.
хмм...и в самом деле %)))
в общем вместо такого затяжного разбирательства проще было влезть на ВВВ и почитать, т.к. поддержка HTT появилась во Фре только в релизе 4.8 после даты Wed Jan 22 20:14:52 2003 UTC
> в общем вместо такого затяжного разбирательства проще было > влезть на ВВВ и почитать, т.к. поддержка HTT появилась во > Фре только в релизе 4.8 после даты Wed Jan 22 20:14:52 2003 UTC
даже и без нее, проца у меня 2 физических.
а за ссылку спасибо, только в нее удобнее тыкать, если ее в специальное поле пишешь.
речь не только о HT27.10.03 17:36 Автор: RazDolBai Статус: Member
речь может идти о банальной поддержке процессора ядром ;0)))
так что попробуй воткнуть что-нить из 5-го бранча
> даже и без нее, проца у меня 2 физических.
ОКи, учту ;0))
> а за ссылку спасибо, только в нее удобнее тыкать, если ее в > специальное поле пишешь.
речь не только о HT31.10.03 16:43 Автор: jammer <alex naumov> Статус: Elderman
> это там надо регистрироваться и все такое, да? ;-]] Ну как обычная рассылка пишешь свой емайл и придумываешь пароль, для управления подпиской, все ты там. Кстати, вот только что письмецо со схожей проблемой, пока никто не ответил, буду держать в курсе если что.
Hi,
We have encountered a problem where the system hangs. We are running a 4.7
SMP kernel using kernel polling on a Dual Xeon with hyperthreading enabled
(essentially a 4 processor system). As a result, the only HW interrupts in
the system are hardclock (8254), the rtc, serial console and scsi. The
synchronous interrupts are (8254 and rtc). When the system is hung, I have
found that the ipending and iactive bits for the 8254 and rtc are set
(meaning the interrupt is pending and active) although giant lock is not
held and all processors are idle (and halted). This lead me to believe that
somehow the ipending bit was set "just before" the last interrupt returned.
The only way the system would be able to run that interrupt again is if
another interrupt would run and it would notice that ipending is set, and it
would run (an interrupt delay would be seen). In a non-polling system, I
imagine the ethernet interrupts would wake it up. I believe I found a
potential hole where this could happen.
In i386/isa/ipl.s:
#ifdef SMP
cli /* early to prevent INT deadlock */
doreti_next2:
#endif
movl %eax,%ecx
notl %ecx /* set bit = unmasked level */
#ifndef SMP
cli
#endif
andl _ipending,%ecx /* set bit = unmasked pending INT */
jne doreti_unpend
movl %eax,_cpl
I'm concerned in the instance the ipending is checked and deemed to be not
set, but just after another interrupt occurs causing ipending to be set.
Because CPL is not yet unmasked, that interrupt is not forwarded. In
Particular, in i386/isa/apic_vector.s:
3: ; /* other cpu has isr lock */ \
APIC_ITRACE(apic_itrace_noisrlock, irq_num, APIC_ITRACE_NOISRLOCK)
;\
lock ; \
orl $IRQ_BIT(irq_num), _ipending ; \
testl $IRQ_BIT(irq_num), _cpl ; \
jne 4f ; /* this INT masked */ \
call forward_irq ; /* forward irq to lock holder */ \
POP_FRAME ; /* and return */ \
iret ; \
ALIGN_TEXT ; \
The check for _cpl occurs right after the ipending, thus causing a potential
race for checking/modifying the cpl.
One quick solution that I thought might correct this would be in ipl.s,
right after modifying the cpl, recheck the ipending again to see if it
changed, such as:
#ifdef SMP
cli /* early to prevent INT deadlock */
doreti_next2:
#endif
movl %eax,%ecx
notl %ecx /* set bit = unmasked level */
#ifndef SMP
cli
#endif
andl _ipending,%ecx /* set bit = unmasked pending INT */
jne doreti_unpend
movl %eax,_cpl
andl _ipending,%ecx /* set bit = unmasked pending INT */
jne doreti_unpend