a strange slowing down problem with APM and PCMCIA

Dong Chen (chen@ctpa04.mit.edu)
Fri, 27 Jun 1997 14:41:10 -0400 (EDT)


Hi,

There is a strange problem when I run kernel 2.0.30 on my AST J50 P133.
In short, when APM is enabled in the kernel and the PCMCIA module
i82365.o is loaded, any process running longer than 1 second are slowed down.
(This happens on other AST J series notebooks as well, not sure about
other manufacturer's notebooks.)

If there are keyboard/mouse activities at a frequency > 1Hz, the slowing
down does not occur. If the kernel APM is disabled, or i82365.o
is unloaded, no slowing down happens either.

A summary table: (PCMCIA modules are compiled without APM support.)

kernel APM i82365.o loaded slowing down
no yes no
yes no no
yes yes yes
yes yes no if lots of keyboard typing

i82365.o uses io ports 0x3e0-0x3e1 and loads an interrupt handler
at IRQ 11. I am not sure if this is a kernel or a pcmcia problem.
They seem to be related in a non-trivial way.

Can somebody shed some light on what might cause the problem? Do other
notebooks have similar problems? How should I debug it? Thanks a lot,

Dong Chen
chen@ctp.mit.edu

-----------------------------------------------------------------------
PS. Sample code and timing
-----------------------------------------------------------------------

/* loop_test.c
* To compile: cc -o loop_test loop_test.c -lm
*
* Timing on AST J50, Pentium 133 MHz
*
* nloops seconds (user)
* 10 0.110
* 20 0.230
* 40 0.430
* 80 0.820
* 100 1.070
* 200 3.030 (*)
* 400 13.710 (*)
*/

#include <math.h>

static volatile double x;

main(int argc, char *argv[])
{
int i,j,k,n;

if (argc < 2) {
printf("Usage: %s nloops\n", argv[0]);
exit(0);
}

sscanf(argv[1],"%d",&n);

for (i=0; i<5; i++) {
printf("%d\n", i+1);
for (j=0; j<n; j++) {
for (k=0; k<1000; k++) {
x = sin(1.0);
x = cos(1.0);
}
}
}
printf("done.\n");
}