Problem with Linux interrupt latency?

Pawan Singh (psingh@turnstone.com)
Mon, 26 Jun 2000 21:02:38 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_00A1_01BFDFB1.DC549780
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I am running RedHat 6.0 Linux kernel on AMD SC400 66Mhz (x486). I have =
two serial ports, a 28.8 modem and an AMD lance ethernet card. Kernel is =
stripped of all keyboard, mouse, graphics etc... driver support except =
for above mentioned devices. The file system is a RAMDISK (5M) - total =
ram is 32M. the user processes running are: init, syslogd, inetd. Kernel =
processes: kswapd, kpiod, etc... are also running.

Here is the weirdness I am seeing.

int main()
{

float a =3D 3.456;
float b =3D 7.678;
float c =3D 0;
// iopl(3);
// asm("cli");
for (long i=3D0; i<10000; i++) {
c +=3D a+b;
}
// asm("sti");

}

This process takes on an average 1 second for the computation (I am =
using kernel floating point emulation).

If I uncomment the commented out code =3D i.e. disable interrupts, the =
code completes in 8 milliseconds.

We made sure that there are no other things happening in the system i.e. =
other interrupts, processes etc...

Why is there such a big difference in time? I would suspect that since =
this is the only process running, and total compute time is 8 =
milliseconds and x86 linux kernels HZ variable is set to 100, at most it =
will be interrupted once.
So the compute time will be:

< 8ms + time in the kernel for processing timer interrupt + scheduler =
etc... + left over computations.

Am I missing something? Is this normal?

Setting the process to a realtime process using sched_sxxxx routines did =
not help either.

I noticed the same problem on a workstation with Pentium III - 700Mhz, =
but it is proportional to the CPU speed. i.e. divide 1 second by the =
factor number of times Pentium III is faster than 486-66.

Thanks
Pawan
psingh@turnstone.com

------=_NextPart_000_00A1_01BFDFB1.DC549780
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Hi,
 
I am running RedHat 6.0 Linux kernel on = AMD SC400=20 66Mhz (x486). I have two serial ports, a 28.8 modem and an AMD lance = ethernet=20 card. Kernel is stripped of all keyboard, mouse, graphics etc... driver = support=20 except for above mentioned devices. The file system is a RAMDISK (5M) - = total=20 ram is 32M. the user processes running are: init, syslogd, inetd. Kernel = processes: kswapd, kpiod, etc... are also running.
 
Here is the weirdness I am = seeing.
 
int main()
{
 
    float a =3D = 3.456;
    float b =3D = 7.678;
    float c =3D = 0;
    // = iopl(3);
    // = asm("cli");
   for (long i=3D0; = i<10000; i++)=20 {
         c=20 +=3D a+b;
   }
   // = asm("sti");
 
}
 
This process takes on an average 1 = second for the=20 computation (I am using kernel floating point emulation).
 
If I uncomment the commented out code = =3D i.e.=20 disable interrupts, the code completes in 8 milliseconds.
 
We made sure that there are no other = things=20 happening in the system i.e. other interrupts, processes = etc...
 
Why is there such a big difference in = time? I would=20 suspect that since this is the only process running, and total compute = time is 8=20 milliseconds and x86 linux kernels HZ variable is set to 100, at most it = will be=20 interrupted once.
So the compute time will = be:
 
   < 8ms + time in the = kernel for=20 processing timer interrupt + scheduler etc... + left over=20 computations.
 
Am I missing something? Is this=20 normal?
 
Setting the process to a realtime = process using=20 sched_sxxxx routines did not help either.
 
I noticed the same problem on a = workstation with=20 Pentium III - 700Mhz, but it is proportional to the CPU speed. i.e. = divide 1=20 second by the factor number of times Pentium III is faster than=20 486-66.
 
Thanks
Pawan
psingh@turnstone.com
 
 
 
------=_NextPart_000_00A1_01BFDFB1.DC549780-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/