9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@gmx.de
To: 9fans@9fans.net
Subject: Re: [9fans] atagenioretry: nondma
Date: Sun, 19 May 2013 17:55:48 +0200	[thread overview]
Message-ID: <262d7c11a5d30050cdf45a4a30eab66b@gmx.de> (raw)
In-Reply-To: <13095494dd62b57b68b36d52632bcfb6@kw.quanstro.net>

9front uses a (older) variant of the 9atom ide driver.

from arisawas's output, it seems that the write command times out
in atagenio():

		iowait(drive, 30*1000, 0);
		if(!ctlr->done){
			/*
			 * What should the above timeout be? In
			 * standby and sleep modes it could take as
			 * long as 30 seconds for a drive to respond.
			 * Very hard to get out of this cleanly.
			 */
			atadumpstate(drive, r, lba, count);
			ataabort(drive, 1);
			qunlock(ctlr);
			return atagenioretry(drive, r, lba, count);
		}

atagenioretry() will just cause the command to be retried in pio mode
when it previously was failing in dma mode. think this what erik means
with "assumes dma doesnt work". dma is already off so we fail the
request.

i doubt this is missed interrupts. iowait() calls the interrupt handler
itself before giving up. you can even check, as the driver keeps statistics
about missed interrupts in the ctl file.

the drive seems to not complete the command within the timeout.

what i would try is to check if reading the offending sectors produce
i/o errors as well with dd.

where these sectors ever written before? i dd /dev/zero over the whole
drive before initializing filesystems on it. was something similar done
here as well?

could this be a prblem with the drive going into standby mode and then
the next command taking too long to complete because drive is slow to
spin up?

--
cinap



  reply	other threads:[~2013-05-19 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-19  4:32 arisawa
2013-05-19 14:13 ` erik quanstrom
2013-05-19 15:55   ` cinap_lenrek [this message]
2013-05-19 17:47     ` erik quanstrom
2013-05-19 17:52       ` erik quanstrom
2013-05-20 22:10         ` arisawa
2013-05-21  1:40           ` erik quanstrom
2013-05-22 23:18             ` arisawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=262d7c11a5d30050cdf45a4a30eab66b@gmx.de \
    --to=cinap_lenrek@gmx.de \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).