From owner-freebsd-current@FreeBSD.ORG Thu May 19 19:01:45 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B796116A4CE for ; Thu, 19 May 2005 19:01:45 +0000 (GMT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9751343D8D for ; Thu, 19 May 2005 19:01:43 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id B38FB3BA68; Thu, 19 May 2005 21:01:41 +0200 (CEST) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) j4JJ1TBv001417; Thu, 19 May 2005 21:01:29 +0200 (CEST) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.3/8.13.3/Submit) id j4JJ1TUr001416; Thu, 19 May 2005 21:01:29 +0200 (CEST) (envelope-from schweikh) Date: Thu, 19 May 2005 21:01:29 +0200 From: Jens Schweikhardt To: Doug White Message-ID: <20050519190129.GA1048@schweikhardt.net> References: <20050516113420.GA786@schweikhardt.net> <20050518150346.S87264@carver.gumbysoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050518150346.S87264@carver.gumbysoft.com> User-Agent: Mutt/1.5.9i cc: freebsd-current@freebsd.org Subject: Re: Timekeeping hosed by factor 3, high lapic[01] interrupt rates X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2005 19:01:45 -0000 Doug et al, On Wed, May 18, 2005 at 03:04:39PM -0700, Doug White wrote: # On Mon, 16 May 2005, Jens Schweikhardt wrote: # # > hello, world\n # > # > the timekeeping on my CURRENT system as of May 15 is very strange. The # > time as reported by date(1) increases too slow by a factor of 3. Things # > with second intervals like sleep 1, tail -f, iostat 1, changing folders # > in mutt all go slower by a factor of 3. # > # > The system bios date however is correct, and a kernel as of March does # > not have this problem, so it's clearly the kernel or some other software # > problem. I have investigated a bit and found the interrupt rates for the # > lapic[01] being three times the value on the broken kernel (about 2kHz # > vs 6kHz), # # Are you running with kern.hz or HZ set to something other than the # default? No, $ sysctl -a | grep hz kern.clockrate: { hz = 1000, tick = 1000, profhz = 666, stathz = 133 } debug.psm.hz: 20 is the same on both systems. ... # the lapic timer values should run about 2*hz. Then something is out of whack... this is from the strange system: $ vmstat -i interrupt total rate irq1: atkbd0 211 8 irq13: npx0 1 0 irq14: ata0 63 2 irq15: ata1 109 4 irq18: em0 17 0 irq24: ahd0 4511 187 irq25: ahc0 16 0 lapic0: timer 190869 7952 lapic1: timer 176174 7340 Total 371971 15498 Note that there's no irq0: clk 745029 1000 appearing. I'm not an expert, but that's unexpected to my eyes. My /boot/device.hints deviate from GENERIC.hints only through hint.atkbd.0.flags="0x1" hint.ppc.0.irq="5" hint.ppc.0.flags="0x20" hint.cd.0.at="scbus0" hint.cd.0.target="3" hint.cd.1.at="scbus0" hint.cd.1.target="4" dmesg and kernel config of the strange system follow. I never used the NO_MIXED_MODE mentioned in UPDATING. Copyright (c) 1992-2005 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 6.0-CURRENT #0: Tue May 17 20:29:49 CEST 2005 toor@hal9000.schweikhardt.net:/share/HEAD/obj/share/HEAD/src/sys/HAL9000 MPTable: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2994.90-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf33 Stepping = 3 Features=0xbfebfbff Features2=0x41d,MON,DS_CPL,CNTX-ID> Hyperthreading: 2 logical CPUs real memory = 1072627712 (1022 MB) avail memory = 1040842752 (992 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 2 ioapic0: Assuming intbase of 0 ioapic1: Assuming intbase of 24 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard bktr_mem: memory holder loaded npx0: [FAST] npx0: on motherboard npx0: INT 16 interface cpu0 on motherboard cpu1 on motherboard pcib0: pcibus 0 on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) pci1: at device 0.1 (no driver attached) pcib2: at device 3.0 on pci0 pci2: on pcib2 em0: port 0xb000-0xb01f mem 0xec000000-0xec01ffff irq 18 at device 1.0 on pci2 em0: Ethernet address: 00:30:48:80:79:71 em0: Speed:N/A Duplex:N/A pcib3: at device 28.0 on pci0 pci3: on pcib3 ahd0: port 0xc000-0xc0ff,0xc400-0xc4ff mem 0xeb000000-0xeb001fff irq 24 at device 1.0 on pci3 ahd0: [GIANT-LOCKED] aic7901A: Ultra320 Wide Channel A, SCSI Id=7, PCI 33 or 66Mhz, 512 SCBs ahc0: port 0xc800-0xc8ff mem 0xeb002000-0xeb002fff irq 25 at device 2.0 on pci3 ahc0: [GIANT-LOCKED] aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs uhci0: port 0xd000-0xd01f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xd400-0xd41f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered pci0: at device 29.4 (no driver attached) pci0: at device 29.5 (no driver attached) pci0: at device 29.7 (no driver attached) pcib4: at device 30.0 on pci0 pci4: on pcib4 bktr0: mem 0xec300000-0xec300fff irq 20 at device 1.0 on pci4 bktr0: [GIANT-LOCKED] bktr0: Hauppauge Model 38104 B208 bktr0: Hauppauge WinCast/TV, Philips PAL I tuner. pci4: at device 1.1 (no driver attached) csa0: mem 0xec200000-0xec200fff,0xec100000-0xec1fffff irq 21 at device 2.0 on pci4 csa: card is Unknown/invalid SSID (CS4614) csa0: [GIANT-LOCKED] pcm0: on csa0 pcm0: pcm0: [GIANT-LOCKED] isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 pci0: at device 31.3 (no driver attached) orm0: at iomem 0xc0000-0xccfff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: [FAST] ppc0: at port 0x278-0x27f irq 5 flags 0x20 on isa0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 lpt0: on ppbus0 lpt0: Polled port sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A unknown: can't assign resources (port) unknown: can't assign resources (memory) unknown: can't assign resources (irq) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) Timecounters tick every 1.000 msec ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to deny, logging limited to 100 packets/entry by default ad0: 76319MB at ata0-master UDMA100 acd0: DVDR at ata1-master UDMA33 da0 at ahd0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 160.000MB/s transfers (80.000MHz, offset 127, 16bit), Tagged Queueing Enabled da0: 35044MB (71771688 512 byte sectors: 255H 63S/T 4467C) da1 at ahd0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 160.000MB/s transfers (80.000MHz, offset 127, 16bit), Tagged Queueing Enabled da1: 35044MB (71771688 512 byte sectors: 255H 63S/T 4467C) da2 at ahd0 bus 0 target 5 lun 0 da2: Fixed Direct Access SCSI-3 device da2: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da2: 35046MB (71775284 512 byte sectors: 255H 63S/T 4467C) da3 at ahd0 bus 0 target 6 lun 0 da3: Fixed Direct Access SCSI-3 device da3: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da3: 35046MB (71775284 512 byte sectors: 255H 63S/T 4467C) SMP: AP CPU #1 Launched! cd2 at ata1 bus 0 target 0 lun 0 cd2: <_NEC DVD_RW ND-2500A 1.06> Removable CD-ROM SCSI-0 device cd2: 33.000MB/s transfers cd2: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/da3s1a ----------------------------------------------------------------------------------- machine i386 cpu I686_CPU ident HAL9000 # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_4BSD # SCHED_4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options MD_ROOT # MD is a potential root device options GEOM_GPT # GUID Partition Tables. options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options SCSI_DELAY=1000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev #options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. # Debugging for use in -current options KDB # Enable kernel debugger support. options DDB # Support DDB. #options GDB # Support remote GDB. #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed device isa # Do not remove. device pci # Floppy drives device fdc # ATA and ATAPI devices device ata device atadisk # ATA disk drives device atapicd # ATAPI cd drives device atapicam # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices device ahd # Adaptec PCI/PCI-X Ultra320 SCSI # SCSI peripherals device scbus # SCSI bus (required for SCSI) device da # Direct Access (disks) device cd # CD device pass # Passthrough device (direct SCSI access) # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device vga # VGA video card driver device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc # Floating point support - do not disable. device npx # Serial (COM) ports device sio # 8250, 16[45]50 based serial ports # Parallel port device ppc device ppbus # Parallel port bus (required) # Pseudo devices. device loop # Network loopback device mem # Memory and kernel memory devices device io # I/O device device random # Entropy device device ether # Ethernet support device pty # Pseudo-ttys (telnet etc) # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! device bpf # Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da device psm # ps/2 mouse # Other customization. options EXT2FS options AHC_ALLOW_MEMIO options ATKBD_DFLT_KEYMAP makeoptions ATKBD_DFLT_KEYMAP="german.iso" options SC_HISTORY_SIZE=200 options SC_DFLT_FONT makeoptions SC_DFLT_FONT=iso options IPFIREWALL options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=100 options IPDIVERT options CPU_ENABLE_SSE # To make an SMP kernel, the next two lines are needed options SMP device apic Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)