[Bug 344195] New: PROBLEM: Periodic interupts stop after a few seconds under 8192Hz clock freq
https://bugzilla.novell.com/show_bug.cgi?id=344195 Summary: PROBLEM:Periodic interupts stop after a few seconds under 8192Hz clock freq Product: SUSE Linux 10.1 Version: Final Platform: HP OS/Version: SLES 9 Status: NEW Severity: Critical Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: huxx@huawei.com QAContact: qa@suse.de Found By: Development ---------------------------------------------------- Most recent kernel where this bug did not occur: 2.6.5-7.191 ---------------------------------------------------- Distribution: SuSE Linux Enterprise Server 9 Service Pack Version 3 ---------------------------------------------------- Hardware Environment: HP-DL380-G5 Intel(R) Xeon(R) CPU 5110 @ 1.60GHz 4GB RAM ---------------------------------------------------- Software Environment: GCC 3.3.3 and my RTC test program: #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <linux/rtc.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> unsigned long long counter = 0; int fd = -1; void *thread_entry(void *param) { unsigned long data = 0; for (;;) { // This read system call will block each timer scale interval (1/8192s) read(fd, &data, sizeof(unsigned long)); counter++; } } int main(void) { int i, retval, irqcount = 0; unsigned long hz, pie; struct rtc_time rtc_tm; pthread_t thread; fd = open ("/dev/rtc", O_RDONLY); if (fd == -1) { perror("/dev/rtc"); exit(errno); } /* The frequencies 128Hz, 256Hz, ... 8192Hz are only allowed for root. */ retval = ioctl(fd, RTC_IRQP_SET, 4096); if (retval == -1) { perror("ioctl"); exit(errno); } ioctl(fd, RTC_IRQP_READ, &hz); fprintf(stderr, "%ldHz\r\n", hz); /* Enable periodic interrupts */ retval = ioctl(fd, RTC_PIE_ON, 0); if (retval == -1) { perror("ioctl"); exit(errno); } ioctl(fd, RTC_IRQP_READ, &hz); fprintf(stderr, " %ldHz\r\n", hz); pthread_create(&thread, NULL, thread_entry, NULL); for (;;) { ioctl(fd, RTC_PIE_ON, 0); ioctl(fd, RTC_IRQP_READ, &hz); fprintf(stderr, "counter is %ld, %ldHz\r\n", counter, hz); fflush(stderr); sleep(1); } return 0; } /* end main */ ---------------------------------------------------- Problem Description: Under 2.6.5-7.191, the test program goes well: # ./rtc_test counter is 0, 0Hz counter is 4100, 0Hz counter is 8203, 0Hz counter is 12304, 0Hz counter is 16405, 0Hz counter is 20508, 0Hz counter is 24609, 0Hz counter is 28712, 0Hz But, under 2.6.5-7.244, the periodic interupts freezed after a few seconds: # ./rtc_test counter is 0, 1024Hz counter is 4108, 1024Hz counter is 4547, 1024Hz counter is 4547, 1024Hz counter is 4547, 1024Hz counter is 4547, 1024Hz counter is 4547, 1024Hz // The counter freezed at random value # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 0: 378101 360121 360123 360121 IO-APIC-edge timer 1: 9 2 0 0 IO-APIC-edge i8042 2: 0 0 0 0 XT-PIC cascade 8: 1 2 0 4547 IO-APIC-edge rtc 9: 0 0 0 0 IO-APIC-level acpi 12: 58 0 0 0 IO-APIC-edge i8042 14: 48 0 9 4 IO-APIC-edge ide0 16: 1 0 1 1 IO-APIC-level eth0 17: 119067 122348 7501 2424 IO-APIC-level cciss0, eth1 21: 31 0 32 36 IO-APIC-level uhci_hcd NMI: 1458101 1458028 1458027 1458026 LOC: 1458018 1458007 1458018 1458018 ERR: 0 MIS: 0 ---------------------------------------------------- Steps to reproduce: 1.Save the test program as 'rtc.c' file. 2.Use 'gcc -l pthread -o rtc_test rtc.c' command to compile and link it. 3.Use './rtc_test' command to run and wait for bug comes. The only difference between SLES9SP2 and SLES9SP3 is that boot_hpet_disable is set to 1 in SLES9SP2. So, periodic interrupt handler is rtc_interrupt in SLES9SP2 while it is hpet_rtc_interrupt in SLES9SP3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=344195#c1 胡小翔 胡 <huxx@huawei.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |huxx@huawei.com Component|Kernel |Maintenance --- Comment #1 from 胡小翔 胡 <huxx@huawei.com> 2007-11-26 18:03:09 MST --- Tested releases and results: SLES8SP3(i386) OK SLES9SP2(i386) OK SLES9SP3(i386) NG SLES9SP4_KOTD_1125 NG SLES9SP3(x64) NG SLES10(x64) NG -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=344195 胡小翔 胡 <huxx@huawei.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |juwang@novell.com Found By|Development |Field Engineer Priority|P5 - None |P1 - Urgent -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=344195#c2 --- Comment #2 from 胡小翔 胡 <huxx@huawei.com> 2007-11-28 18:27:29 MST --- SLES9SP2-EM64T+HP-DL380-G5: # dmesg | grep HPET ACPI: HPET (v001 HP P56 0x00000002 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=344195#c3 --- Comment #3 from 胡小翔 胡 <huxx@huawei.com> 2007-11-28 18:28:49 MST --- SLES9SP2-EM64T+HP-DL380-G5: # dmesg | grep HPET ACPI: HPET (v001 HP P56 0x00000002 0x0000162e) @ 0x00000000cfe581c0 ACPI: HPET id: 0x8086a201 base: 0xfed00000 time.c: Using 14.318180 MHz HPET timer. time.c: Using HPET based timekeeping. # uname -a Linux HP-G5-232 2.6.5-7.191-smp #1 SMP Tue Jun 28 14:58:56 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux # dmesg | grep Kernel Kernel command line: hpet=disable root=6803 vga=0x317 selinux=0 splash=silent console=tty0 resume=/dev/cciss/c0d0p1 elevator=cfq showopts SLES9SP2-i386+HP-DL380-G5: # dmesg | grep HPET ACPI: HPET (v001 HP P56 0x00000002 0x0000162e) @ 0x7fe581c0 ACPI: HPET id: 0x8086a201 base: 0xfed00000 # uname -a Linux mdntest123 2.6.5-7.191-smp #1 SMP Tue Jun 28 14:58:56 UTC 2005 i686 i686 i386 GNU/Linux # dmesg | grep Kernel Kernel command line: root=6802 vga=0x317 selinux=0 resume=/dev/cciss/c0d0p1 elevator=cfq splash=silent How to prevent the kernel from using HPET timer at least? 'hpet=disable' seems not working. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=344195 User lmb@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=344195#c4 Lars Marowsky-Bree <lmb@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lmb@novell.com Status|NEW |RESOLVED Resolution| |INVALID --- Comment #4 from Lars Marowsky-Bree <lmb@novell.com> 2007-12-05 07:14:03 MST --- This bug is reported against SUSE Linux 10.1, but mentions SLES9 SP3 in the body, but not the latest kernel release for SLES9 SP3. It does not appear to have gone through our regular support channels; bugzilla for enterprise products is not open to customers directly. Please file this bug through NTS so it can be properly handled. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com