public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Dalecki <dalecki@evision-ventures.com>
To: Jens Axboe <axboe@suse.de>
Cc: Miles Lane <miles@megapathdsl.net>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.5.9 -- OOPS in IDE code (symbolic dump and boot log included)
Date: Tue, 23 Apr 2002 10:43:19 +0200	[thread overview]
Message-ID: <3CC51EA7.5040801@evision-ventures.com> (raw)
In-Reply-To: <1019549894.1450.41.camel@turbulence.megapathdsl.net> <3CC51494.8040309@evision-ventures.com> <20020423091809.GM810@suse.de>

> Martin,
> 
> There are several 'issues' with the ide-cd changes, in fact I think they
> are horrible. I'll take part of the blame for that, I'll explain.

Well... I refer you to my change long, where I indeed admitted directly
that it's an ugly band aid ;-).

> The ata_ar_get() doesn't belong inside the do_request() strategies, the
> reason I did that for ide-disk was to get going on the tcq stuff and not
> spend too much time rewriting the ide request handling at that point. It

Right. it belongs one level up. The request handling should
possible learn whatever it it's handling ATA or ATAPI devices.
In esp. the ide_start_dma() changes where no pretty...

> was _never_ meant to propagate into the other ide drivers, and in fact
> the code in ide-disk has several tcq specific parts that really cannot
> work in ide-cd. Such as (ide-cd.c:ide_cdrom_do_request()):
> 
> 	spin_lock...
> 
> 	ar = ata_ar_get()
> 	if (!ar) {
> 		spin_unlock;
> 		return ide_started;
> 	}
> 	...
> 
> ide-disk guarentees that if ata_ar_get() fails, it's because we have
> some pending commands on the drive. The ide_started is bogus too, in
> this context it really should be ide_didnt_start_jack, but it works for
> ide-disk because of the above assumptions.

Fortunately it can't happen becouse the other devices don't
support TCQ.

> Don't tell me you can read ide_cdrom_do_request() right now without a
> barf bag :-)

Ohhh. there are a lot of other things I'm unhappy about there as well.

> I'd suggest moving the ata_ar_get() at the ide_queue_commands() level,
> and just pass { drive, ar } to the do_request() strategies. That's also
> why ide-disk.c:idedisk_do_request() has this comment:

Yes this was my intention for the future. The only driver which will have
problems with this is ide-scsi.c - it's not obvious (at least right now)
to me how to change the do_request signature there.

> 	/*
> 	 * get a new command (push ar further down to avoid grabbing
> 	 * lock here
> 	 */
> 	spin_lock_irqsave(DRIVE_LOCK(drive), flags);
> 
> 	ar = ata_ar_get(drive);
> 	...
> 
> I've been meaning to do this once tcq settled down, just didn't get
> around to it yet. But please don't start moving stuff like this into
> ide-cd too.

You notice that I didn't even care to change the write request code-path?
BTW.> It became obvious to me as well that even all the drivers out
there not supporting TCQ will have to get the TCQ parts of struct ata_device
initialized - with a trivial queue depth. drive->tcq should therefore be really
just a memmber of struct ata_device()..


  reply	other threads:[~2002-04-23  9:45 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-23  8:18 2.5.9 -- OOPS in IDE code (symbolic dump and boot log included) Miles Lane
2002-04-23  8:00 ` Martin Dalecki
2002-04-23  9:18   ` Jens Axboe
2002-04-23  8:43     ` Martin Dalecki [this message]
2002-04-23  9:54       ` Jens Axboe
2002-04-23 17:39   ` Miles Lane
2002-04-23 17:54     ` Miles Lane
2002-04-24  8:06       ` Martin Dalecki
2002-04-24  9:11         ` Jens Axboe
2002-04-24  8:20           ` Martin Dalecki
2002-04-25 11:07           ` Martin Dalecki
2002-04-25 17:25             ` Jens Axboe
2002-04-25 17:34               ` Jens Axboe
2002-04-25 21:02                 ` Linus Torvalds
2002-04-26  7:33                   ` [PATCH] 2.5.10 UTS_VERSION Martin Dalecki
2002-04-26  9:52                     ` Keith Owens
2002-04-26  8:58                       ` Martin Dalecki
2002-04-26  7:41                   ` [PATCH] 2.5.10 IDE 42 Martin Dalecki
2002-04-26 16:09                     ` Pavel Machek
2002-04-26 17:31                       ` Dave Jones
2002-04-26 17:37                       ` Linus Torvalds
2002-04-26 20:05                         ` Oliver Xymoron
2002-04-26 21:34                           ` Martin Dalecki
2002-04-26 22:25                           ` Martin Dalecki
2002-04-26 21:32                         ` Martin Dalecki
2002-04-26 23:21                           ` Rene Rebe
2002-04-26 21:42                       ` Martin Dalecki
2002-04-26 16:10                     ` Sebastian Droege
2002-04-26 21:28                       ` Martin Dalecki
2002-04-26 22:44                         ` Padraig Brady
2002-04-28  9:18                           ` Kai Henningsen
2002-05-05 15:54                   ` [PATCH] 2.5.13 IDE 52 Martin Dalecki
2002-05-05 17:09                     ` Jens Axboe
2002-05-05 16:16                       ` Martin Dalecki
2002-05-05 15:55                   ` [PATCH] 2.5.13 IDE 53 Martin Dalecki
2002-05-06  9:53                     ` Russell King
2002-05-06  8:55                       ` Martin Dalecki
2002-05-06 23:48                         ` jw schultz
2002-05-05 15:56                   ` [PATCH 2.5.13 IDE 54 Martin Dalecki
2002-05-07 12:52                     ` Paul Mackerras
2002-05-07 12:06                       ` Martin Dalecki
2002-05-07 14:40                         ` benh
2002-05-07 13:40                           ` Martin Dalecki
2002-05-07 15:18                             ` benh
2002-05-07 14:07                       ` Alan Cox
2002-05-07 13:24                         ` Martin Dalecki
2002-04-24  9:29         ` 2.5.9 -- OOPS in IDE code (symbolic dump and boot log included) Luigi Genoni
2002-04-23 18:23   ` Melchior FRANZ
  -- strict thread matches above, loose matches on Subject: below --
2002-04-24  0:56 rwhron
2002-04-24  8:15 ` Martin Dalecki
2002-04-24 13:01   ` Melchior FRANZ
2002-04-24 13:30 rwhron
2002-04-24 13:33 ` Jens Axboe
2002-04-24 13:39   ` Martin Dalecki
2002-04-24 14:01 rwhron
2002-04-24 13:45 ` 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=3CC51EA7.5040801@evision-ventures.com \
    --to=dalecki@evision-ventures.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles@megapathdsl.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