linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Conway <nconway.list@ukaea.org.uk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk@arm.linux.org.uk>,
	Martin Dalecki <dalecki@evision-ventures.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.15 IDE 61
Date: Tue, 14 May 2002 17:03:54 +0100	[thread overview]
Message-ID: <3CE1356A.B09C62F1@ukaea.org.uk> (raw)
In-Reply-To: <E177dYp-00083c-00@the-village.bc.nu>

Alan Cox wrote:
> 
> > I think you're wrong Alan.  Take a good IDE chipset as an example: both
> > channels can be active at the same time, but you still can't talk to one
> > drive while the other drive on the same channel is DMAing.
> 
> Sure.

Phew, at least we agree on something.  In fact I _think_ we were maybe
talking at cross-purposes and not disagreeing about anything that
actually mattered :-)

> > It doesn't matter how you perform the queue abstraction in this case:
> > the fact that the device+channel+cable is busy in an asynchronous manner
> > makes it impossible for the block layer to deal with this.  [[Or am I
> > way off base?!]]
> 
> I think you are way off base. If you have a single queue for both hda and
> hdb then requests will get dumped into that in a way that processing that
> queue implicitly does the ordering you require.

Hmm, OK. So the queue will potentially fill up with requests for both
hda and hdb.  The request_fn for this queue will get called, sometimes
by the block layer, sometimes not, and can handle all/some/none of the
requests at each call.  If it decides to handle (say) one of the
requests by initiating DMA and then returns while bytes are
transferring, then let's think what happens next time it gets called... 
If it's called as a result of the DMA-complete interrupt, then no
worries because the DMAing is finished.  If it's called instead by the
block-layer because another request has been added, it needs to know
that it shouldn't do anything until the DMAing finishes.  It could find
that out by looking at a channel->busy flag.  If it doesn't use a busy
flag, then what provides the locking?

I'm slowly growing more sure that I've missed the point.  But please
point to the mistake in the above logic to help me learn...

> From an abstract hardware point of view each ide controller is a queue not
> each device. Not following that is I think the cause of much of the existing
> pain and suffering.

Agreed.  And in the case of a cmd640 (etc.), the queue should handle
both channels.

cheers
Neil

  parent reply	other threads:[~2002-05-14 16:09 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-14  9:49 [PATCH] 2.5.15 IDE 61 Neil Conway
2002-05-14  8:52 ` Martin Dalecki
2002-05-14 10:12   ` Neil Conway
2002-05-14  9:30     ` Martin Dalecki
2002-05-14 11:10       ` Neil Conway
2002-05-14 10:21         ` Martin Dalecki
2002-05-14 11:38           ` Russell King
2002-05-14 10:49             ` Martin Dalecki
2002-05-14 12:10             ` Alan Cox
2002-05-14 11:11               ` Martin Dalecki
2002-05-14 12:47                 ` Alan Cox
2002-05-14 12:30                   ` Martin Dalecki
2002-05-15 14:43                 ` Pavel Machek
2002-05-14 12:00               ` Russell King
2002-05-14 11:03                 ` Martin Dalecki
2002-05-14 13:03               ` Neil Conway
2002-05-14 13:27                 ` Andre Hedrick
2002-05-14 14:45                 ` Alan Cox
2002-05-14 14:30                   ` Martin Dalecki
2002-05-14 16:20                     ` Neil Conway
2002-05-14 16:32                       ` Jens Axboe
2002-05-14 16:47                         ` Neil Conway
2002-05-14 16:51                           ` Jens Axboe
2002-05-15 11:37                             ` Neil Conway
2002-05-14 22:51                           ` Mike Fedyk
2002-05-14 16:26                     ` Jens Axboe
2002-05-14 19:34                     ` Anton Altaparmakov
2002-05-15  6:16                       ` Jens Axboe
2002-05-15  8:32                         ` Anton Altaparmakov
2002-05-15  9:42                           ` Martin Dalecki
2002-05-15  9:32                       ` Martin Dalecki
2002-05-15 11:44                         ` Neil Conway
2002-05-15 11:02                           ` Martin Dalecki
2002-05-15 13:10                             ` Alan Cox
2002-05-15 13:34                               ` Neil Conway
2002-05-15 13:04                                 ` Martin Dalecki
2002-05-15 14:08                               ` benh
2002-05-15 16:40                         ` Denis Vlasenko
2002-05-15 11:55                           ` Neil Conway
2002-05-17  7:07                             ` Mike Fedyk
2002-05-17 11:06                               ` Neil Conway
2002-05-17 10:12                                 ` Martin Dalecki
2002-05-14 16:03                   ` Neil Conway [this message]
2002-05-14 16:46                     ` Alan Cox
2002-05-14 12:52       ` Daniela Engert
  -- strict thread matches above, loose matches on Subject: below --
2002-05-06  3:53 Linux-2.5.14 Linus Torvalds
2002-05-13  9:48 ` [PATCH] 2.5.15 IDE 61 Martin Dalecki

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=3CE1356A.B09C62F1@ukaea.org.uk \
    --to=nconway.list@ukaea.org.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dalecki@evision-ventures.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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).