interrupt locked for 20ms by mtdblockd

Jian Peng jipeng at broadcom.com
Mon Dec 18 12:58:14 EST 2006


I am using 2.6.12 with mtd released at 03/16/2006. Recently, I found out
that interrupt can be locked for 20ms by mtdblockd. Here is how I traced
it.

Run infinite loop

	while (1) {
		usleep(1 * 1000);
		unsigned now = gettime();
		if (now > prev && now - prev > 18) {
			printf("got delay of %d milliseconds\n",
now-prev);
		}
		prev = now;
	}

And at the same time, run dd to write to /dev/mtdblock0
 
time dd if=/dev/zero of=/dev/mtdblock0 bs=512 count=10000
 
then, using LTT (Linux trace toolkit), I can identify where the
interrupt lock happen and found out that mtdblockd sometimes can lock
interrupt for 20ms. This is a serious problem since other real time
tasks can not survive if interrupt was locked for so long time. Any
suggestion?
 
Thanks,
Jian





More information about the linux-mtd mailing list