------=_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">