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
#include
#include
#include
#include
#include
#include
#include
#include
#include
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.