From: Jens Axboe <axboe@suse.de>
To: Andre Hedrick <andre@linuxdiskcert.org>
Cc: Vojtech Pavlik <vojtech@suse.cz>,
Davide Libenzi <davidel@xmailserver.org>,
Anton Altaparmakov <aia21@cam.ac.uk>,
Linus Torvalds <torvalds@transmeta.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.5.3-pre1-aia1
Date: Tue, 22 Jan 2002 11:06:22 +0100 [thread overview]
Message-ID: <20020122110621.K1018@suse.de> (raw)
In-Reply-To: <20020122091653.J1018@suse.de> <Pine.LNX.4.10.10201220054490.16815-100000@master.linux-ide.org>
In-Reply-To: <Pine.LNX.4.10.10201220054490.16815-100000@master.linux-ide.org>
On Tue, Jan 22 2002, Andre Hedrick wrote:
>
> A CLUE HAS ARRIVED ...
>
> On Tue, 22 Jan 2002, Jens Axboe wrote:
>
> > On Mon, Jan 21 2002, Andre Hedrick wrote:
> > > > On Mon, Jan 21, 2002 at 03:53:20PM -0800, Andre Hedrick wrote:
> > > > > On Mon, 21 Jan 2002, Vojtech Pavlik wrote:
> > > > > Okay if the execution of the command block is ATOMIC, and we want to stop
> > > > > an ATOMIC operation to go alter buffers?
> > > >
> > > > YES! I think you got it! Because atomic here doesn't mean 'do it all as
> > > > soon as possible with no delay', but 'do nothing else on the ATA bus
> > > > inbetween'.
> > >
> > > In order to do this you can not issue a sector request larger than an
> > > addressable buffer, since the request walking of the rq->buffer is not
> > > allowed.
> >
> > It's not that it's not allowed, it's that it doesn't work the way you
> > want it. ->buffer is just the first segment, which is 8 sectors max,
> > that much is correct. But nothing prevents your from ending the front
> > of the request and continuing and the drive will never know. Just see
> > task_mulin_intr.
>
> Is this not the effect of stopping the actual IO?
No, not at all. It goes something like this (for multi read, the case
discussed here). Settings for this sample-run are:
- multi mode set to 16 sectors
- request: nr_sectors 24 sectors, current_nr_sectors 8. request is thus
split in 3 parts, we need to partially complete it do finish it.
o ide_do_request, get new active request
o start_request, hand off to ide-disk:do_rw_disk()
o do_rw_disk: setup taskfile, arm interrupt handler, return
[interrupt triggers]
o status is good, we can transfer the 16 sectors the drive expects
o taskfile_input_data for 8 sectors:
nsect = rq->current_nr_sectors;
if (nsect > msect)
nsect = msect;
o call ide_end_request to indicate completion of these 8 sectors.
o calls end_that_request_last to complete the first buffer head
in the request, resetup request for next transfer.
o ide_end_request returns 1, request is not complete.
o taskfile_input_data for 8 sectors.
o call ide_end_request again, still returns 1 (now we have 8 sectors
left in the request)
o now we have transferred the 16 sectors inside the interrupt handler,
since request is not complete rearm interrupt handler and return.
Next time task_mulin_intr is fired, we do the remaining 8 sectors. This
time the drive knows to expect only 8 sectors, since we originally
programmed it for 24 sectors total for this request.
> Then you have to issue another ACB to restart the IO for the next segment?
> The device has to know when to stop sending.
Nope, see the above.
> It may be possible to do this is paging requirement if on a READ(any pio),
> reset or update the rq->buffer prior to reading from the data register.
Yes that's very important, the ordering must be right or we are screwed.
> Now what guarentee will the driver have if a the buffer being a full 8
> sectors before the first read, and if that is not enough for the complete
> segment transaction, then if we reduce the expected transfers size between
> interrupts, it will allow for larger values to be put into the
> sector_count register. This reduction must correspond to the expected and
> required 4k page.
But why? The above scenario works.
> This I can do, and we can move forward.
>
> If the update of the rq->buffer occurrs afterwards, we may face a
> driver--device race w/ an early and missied interrupt asserted.
We don't care about rq->buffer at all. What is important is correct (and
ordered) rq->current_nr_sectors updates so that ide_map_rq returns the
right transfer location.
> This sounds like what "Davide Libenzi" is reporting.
> Not really a losted, but arrived while the rq->buffer is being updated.
> Thus ordering of events are wrong.
It very well could be.
--
Jens Axboe
next prev parent reply other threads:[~2002-01-22 10:07 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-18 2:27 Linux 2.5.3-pre1-aia1 Anton Altaparmakov
2002-01-18 17:32 ` Davide Libenzi
2002-01-18 19:05 ` Jens Axboe
2002-01-18 19:23 ` Davide Libenzi
2002-01-18 19:28 ` Andre Hedrick
2002-01-18 19:48 ` Davide Libenzi
2002-01-18 19:40 ` Andre Hedrick
2002-01-18 19:44 ` Andre Hedrick
2002-01-19 11:40 ` Jens Axboe
2002-01-19 11:37 ` Andre Hedrick
2002-01-19 15:45 ` Jens Axboe
2002-01-19 20:36 ` Andre Hedrick
2002-01-19 21:44 ` Davide Libenzi
2002-01-20 0:31 ` Andre Hedrick
2002-01-20 2:02 ` Davide Libenzi
2002-01-20 10:48 ` Jens Axboe
2002-01-20 18:55 ` Davide Libenzi
2002-01-21 0:12 ` Andre Hedrick
2002-01-21 10:43 ` Vojtech Pavlik
2002-01-21 10:48 ` Jens Axboe
2002-01-21 10:56 ` Jens Axboe
2002-01-21 17:44 ` Davide Libenzi
2002-01-21 11:14 ` Vojtech Pavlik
2002-01-21 11:29 ` Jens Axboe
2002-01-21 11:38 ` Vojtech Pavlik
2002-01-21 11:51 ` Andre Hedrick
2002-01-21 11:34 ` Andre Hedrick
2002-01-21 17:44 ` Jens Axboe
2002-01-21 20:18 ` Andre Hedrick
2002-01-21 22:57 ` Vojtech Pavlik
2002-01-21 23:53 ` Andre Hedrick
2002-01-22 7:20 ` Vojtech Pavlik
2002-01-22 7:52 ` Andre Hedrick
2002-01-22 8:16 ` Jens Axboe
2002-01-22 9:45 ` Andre Hedrick
2002-01-22 10:06 ` Jens Axboe [this message]
2002-01-22 23:18 ` END GAME (Re: Linux 2.5.3-pre1-aia1) Andre Hedrick
2002-01-23 8:55 ` Jens Axboe
2002-01-23 20:57 ` Andre Hedrick
2002-01-22 10:26 ` Linux 2.5.3-pre1-aia1 Anton Altaparmakov
2002-01-22 16:49 ` Linus Torvalds
2002-01-22 18:45 ` Andre Hedrick
2002-01-21 21:44 ` Andre Hedrick
2002-01-22 7:32 ` Jens Axboe
2002-01-21 11:22 ` Andre Hedrick
2002-01-21 11:32 ` Vojtech Pavlik
2002-01-21 11:34 ` Jens Axboe
2002-01-21 1:48 ` Andre Hedrick
2002-01-21 7:36 ` Jens Axboe
2002-01-21 7:46 ` Andre Hedrick
2002-01-21 8:01 ` Jens Axboe
2002-01-21 8:42 ` Andre Hedrick
2002-01-21 9:00 ` Jens Axboe
2002-01-21 8:59 ` Andre Hedrick
2002-01-21 9:07 ` Jens Axboe
2002-01-21 9:48 ` Andre Hedrick
2002-01-18 19:26 ` Andre Hedrick
-- strict thread matches above, loose matches on Subject: below --
2002-01-21 4:40 Andre Hedrick
2002-01-21 4:40 Andre Hedrick
2002-01-21 6:19 ` Matti Aarnio
2002-01-21 22:45 Petr Vandrovec
2002-01-21 23:27 ` Andre Hedrick
2002-01-22 7:58 ` Jens Axboe
2002-01-22 8:52 ` Andre Hedrick
2002-01-22 14:17 ` Denis Vlasenko
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=20020122110621.K1018@suse.de \
--to=axboe@suse.de \
--cc=aia21@cam.ac.uk \
--cc=andre@linuxdiskcert.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=vojtech@suse.cz \
/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