From: Vojtech Pavlik <vojtech@suse.cz>
To: Andre Hedrick <andre@linuxdiskcert.org>
Cc: Jens Axboe <axboe@suse.de>,
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 08:20:30 +0100 [thread overview]
Message-ID: <20020122082030.A12720@suse.cz> (raw)
In-Reply-To: <20020121235743.A28134@suse.cz> <Pine.LNX.4.10.10201211535030.15703-100000@master.linux-ide.org>
In-Reply-To: <Pine.LNX.4.10.10201211535030.15703-100000@master.linux-ide.org>; from andre@linuxdiskcert.org on Mon, Jan 21, 2002 at 03:53:20PM -0800
On Mon, Jan 21, 2002 at 03:53:20PM -0800, Andre Hedrick wrote:
> On Mon, 21 Jan 2002, Vojtech Pavlik wrote:
>
> > On Mon, Jan 21, 2002 at 12:18:21PM -0800, Andre Hedrick wrote:
> >
> > > > > Again, the HOST(Linux) is not following the device side rules so expect
> > > > > difficulty when we depart. The Brain Damage is how to talk to the
> > > > > hardware, and it is clear we are not doing it right because we are bending
> > > > > the rules stuff it into and API that not acceptable. However we are
> > > > > stuck. Again, simplicity works, generate a MEMPOOL for PIO such that the
> > > > > buffer pages are contigious and the 4k page dance is a NOOP. Until that
> > > > > time we will be fussing about.
> > > >
> > > > Andre,
> > > >
> > > > Do you know how to say "I was wrong"? You are walking off-track again.
> > > > It's clearly the way that Vojtech and I describe, otherwise current code
> > > > would just not work. And 2.4, 2.2, 2.0 neither.
> > >
> > > I will and have done so in the past when I am, and it would be nice if you
> > > and Linus could do the same. However since both are going to enforce the
> > > partial completion of IO on page boundaries or 4k, and you are not
> > > allowed to pause or stop in the middle of a command execution to play
> > > memory games under ATA/IDE PIO rules, period.
> >
> > Maybe I'm again totally off-the-track, but I see no reason why I
> > couldn't stop in the middle of a PIO transfer (that is anytime, not even
> > on a sector boundary), do whatever I wish, like change the destination
> > buffer or whatever, and then continue. Sure, I can't send ANY commands
> > to the drive, and reading the status might not be a good idea either,
> > but I believe I can do anything else on the system. Is there a reason
> > why this shouldn't be possible?
>
> 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'.
> But that is not the real question. The real question is do we stop
> and ATOMIC process to return data of a partial completeion, and then
> return to a HALTED ATOMIC and hope it will still go?
Yes, and we can do this, and there is no reason why this should not
work.
> DEAD Method:
> issue atomic write 255 sectors
> write 8 sector or 4k or 1 page of memory
>
> interrupt_issued
> exit atomic write
> update top layer buffers
> return;
> continue write_loop;
> exit on completion and update remainder.
>
> BASTARDIZED Method:
> issue write 255 sectors
> truncate to max of 8 sectors
> issue atomic write 8 sectors
> interrupt_issued
> end request and notify 4k page complete
> make new request and merge and repeat.
> note there is a new memcpy fo new request. (max 16 to completion)
>
>
> OLD Method, with Request Page Walking:
> issue atomic write 255 sectors
> write sectors
> interrupt_issued
> walk copy of request
> continue write_loop;
> exit on completion and request and free local buffer.
>
> CORRECT Method:
> collect contigious physical buffer of 255 sectors
> memcpy_to_local (one memcpy)
> issue atomic write 255 sectors
> write sectors
> interrupt_issued
> update pointer
> continue write_loop;
> exit on completion and request and free local buffer.
>
> The price of the overhead and the direct flakyness of the driver we are
> running from is returning, so the alternative is to disable MULTI-Sector
> Operations.
That's pretty much nonsense, beg my pardon. The real correct way would
be:
issue read of 255 sectors using READ_MULTI, max_mult = 16
receive interrupt
inw() first 4k to buffer A
inw() second 4k to buffer B
don't do anything else until the next interrupt
There is absolutely no need for an intermediate scratch buffer, you can
put the inw()ed data anywhere you like, and if you need any post
processing, you can do it as well, at any time.
--
Vojtech Pavlik
SuSE Labs
next prev parent reply other threads:[~2002-01-22 7:20 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 [this message]
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
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=20020122082030.A12720@suse.cz \
--to=vojtech@suse.cz \
--cc=aia21@cam.ac.uk \
--cc=andre@linuxdiskcert.org \
--cc=axboe@suse.de \
--cc=davidel@xmailserver.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