Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Nov 2004 11:45:47 +0100
From:      =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@DeepCore.dk>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Robert Watson <rwatson@freebsd.org>
Subject:   Re: 5.3-RELEASE: WARNING - WRITE_DMA interrupt timout
Message-ID:  <4195E5DB.2070302@DeepCore.dk>
In-Reply-To: <26249.1100342074@critter.freebsd.dk>
References:  <26249.1100342074@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> In message <4195E1FF.5090906@DeepCore.dk>, =3D?ISO-8859-1?Q?S=3DF8ren_S=
chmidt?=3D wri
> tes:
>=20
>=20
>>>>Timeout is 5 secs, which is a pretty long time in this context IMHO..=

>>>
>>>Five seconds counted from when ?
>>
>>Now thats the nasty part :)
>>ATA starts the timeout when the request is issued to the device, so=20
>>theoretically the disk could take 4.9999 secs to complete the request=20
>>and then the timeout fires before the taskqueue gets its chance at it, =

>>but IMHO thats pretty unlikely...
>=20
> I find that far more likely than kernel threads being stalled for that
> long.  ATA disks doing bad-block stuff takes several seconds on some
> of the disks I've had my hands on.
>=20
>>Anyhow, I can just remove the warning from ATA if that makes anyone=20
>>happy, since its just a warning and ATA doesn't do anything with it at =
all.
>>However, IMNHO this points at a problem somewhere that we should better=
=20
>>understand and fix instead.
>=20
> I would prefer you reset the timer to five seconds in your interrupt
> routine so we can see exactly on which side of that the time is spent.

It would be even better to time how long both ops take and be able to=20
get that via a sysctl or something (I have that on my TODO list but its=20
loooong :) ).

Anyhow resetting it is easy (patch against 5.3R):

Index: ata-queue.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/sys/dev/ata/ata-queue.c,v
retrieving revision 1.32.2.5
diff -u -r1.32.2.5 ata-queue.c
--- ata-queue.c 24 Oct 2004 09:27:37 -0000      1.32.2.5
+++ ata-queue.c 13 Nov 2004 10:44:40 -0000
@@ -216,6 +216,9 @@
         ata_completed(request, 0);
      }
      else {
+       if (!dumping)
+           callout_reset(&request->callout, request->timeout * hz,
+                         (timeout_t*)ata_timeout, request);
         if (request->bio && !(request->flags & ATA_R_TIMEOUT)) {
             ATA_DEBUG_RQ(request, "finish bio_taskqueue");
             bio_taskqueue(request->bio, (bio_task_t *)ata_completed,=20
request);

--=20

-S=F8ren




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4195E5DB.2070302>