public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Andre Hedrick <andre@linux-ide.org>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: 2.5.6: ide driver broken in PIO mode
Date: Wed, 13 Mar 2002 12:06:51 -0800	[thread overview]
Message-ID: <3C8FB15B.67953DDD@zip.com.au> (raw)
In-Reply-To: <a6o30m$25j$1@penguin.transmeta.com> <Pine.LNX.4.10.10203131001230.19703-100000@master.linux-ide.org>

Andre Hedrick wrote:
> 
> ...
> Suparna understands the problem and it is a solution I have described,
> and I have been working with her on a solution but I suspect you will not
> take it.  Because it requires an in process operation of traversing
> several BIOS' in order to statisfy the hardware atomic.

I think I understood the problem a couple of days ago.  Let
me try to express it:

For a PIO-mode transfer, the driver needs to pump (say) 8192
bytes under CPU control into the host controller.  Later, an
interrupt comes back from the device which says "that worked",
or "I/O error".

So clearly the driver has to not signal completion against those
8192 bytes until the interrupt comes in.

So the driver needs to hang on to those 8192 bytes.

And those 8192 bytes may be represented by two vectors in a single
BIO.  That's OK.  The problem occurs when those 8192 bytes are
encapsulated in *mutliple* BIOs in a single request.  This is the
common case.

Apparently, the interface which is offered to the device driver
requires that the driver signal completion against the Nth BIO
before the driver can advance onto the N+1th BIO in the request.
As a consequence of this, the driver is accidentally signalling
completion against the Nth BIO *before* that interrupt has come
back.  So we're telling userspace that the read or write was OK
before we actually know that this is true.

So it seems that the IDE driver currently has some non-working
workarounds in place for this problem.

Andre, is this an accurate description?

If so, then it would seem that either

a) Someone needs to tell Andre (in simple, storage-person terms :))
   what the recommended workaround is or

b) The block layer needs to be extended so the driver can walk
   all the request's segments prior to signalling completion
   against any of them.

-

  reply	other threads:[~2002-03-13 20:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13 13:05 2.5.6: ide driver broken in PIO mode Roman Zippel
2002-03-13 17:41 ` Linus Torvalds
2002-03-13 18:14   ` Andre Hedrick
2002-03-13 20:06     ` Andrew Morton [this message]
2002-03-13 22:37       ` Alan Cox
2002-03-14  5:21         ` Andre Hedrick
2002-03-13 20:37     ` Jens Axboe
2002-03-14  5:56       ` Andre Hedrick
2002-03-13 20:34   ` Jens Axboe
2002-03-13 22:09     ` Martin Dalecki
2002-03-14 16:06     ` Suparna Bhattacharya
2002-03-14 18:42       ` Andrew Morton
2002-03-14 18:50         ` Jens Axboe

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=3C8FB15B.67953DDD@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=andre@linux-ide.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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