From: Davin McCall <davmac@ozonline.com.au>
To: Davin McCall <davmac@ozonline.com.au>
Cc: B.Zolnierkiewicz@elka.pw.edu.pl, linux-kernel@vger.kernel.org,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] various IDE patches/cleanups
Date: Fri, 30 Jan 2004 14:34:59 +1100 [thread overview]
Message-ID: <20040130143459.2c206af9.davmac@ozonline.com.au> (raw)
In-Reply-To: <20040130143355.630346cc.davmac@ozonline.com.au>
4th patch notes
---------------
choose_drive() selects which drive in a hwgroup will have a request serviced.
It tries not to return a drive whose queue is plugged, but there's a small
mistake which means it might do this sometimes.
Once we've guarenteed that the returned drive is never plugged, it's possible
to remove a check in ide_do_request() (or actually, modify it, seeing as the
drive can still get plugged between requests in the tcq case).
- (ide-io.c)
- ide_do_request()
- Move check of blk_queue_plugged() just after the check for the service
routine returning ide_released. So we only check it between tcq
requests.
- choose_drive()
- A plugged drive can't benefit from "nice" behaviour. Neither can
a drive with no requests in its queue.
--- linux-2.6.0-patch3/drivers/ide/ide-io.c Thu Jan 29 12:43:26 2004
+++ linux-2.6.0/drivers/ide/ide-io.c Thu Jan 29 12:48:09 2004
@@ -776,7 +776,9 @@
if (!drive->sleep
/* FIXME: use time_before */
&& 0 < (signed long)(WAKEUP(drive) - (jiffies - best->service_time))
- && 0 < (signed long)((jiffies + t) - WAKEUP(drive)))
+ && 0 < (signed long)((jiffies + t) - WAKEUP(drive))
+ && !blk_queue_plugged(drive->queue)
+ && !elv_queue_empty(drive->queue))
{
ide_stall_queue(best, IDE_MIN(t, 10 * WAIT_MIN_SLEEP));
goto repeat;
@@ -908,14 +910,6 @@
break;
}
- if (blk_queue_plugged(drive->queue)) {
- if (drive->using_tcq)
- break;
-
- printk(KERN_ERR "ide: huh? queue was plugged!\n");
- break;
- }
-
/*
* we know that the queue isn't empty, but this can happen
* if the q->prep_rq_fn() decides to kill a request
@@ -967,8 +961,11 @@
spin_lock_irq(&ide_lock);
if (hwif->irq != masked_irq)
enable_irq(hwif->irq);
- if (startstop == ide_released)
+ if (startstop == ide_released) {
+ if (blk_queue_plugged(drive->queue))
+ break;
goto queue_next;
+ }
if (startstop == ide_stopped)
hwgroup->busy = 0;
}
next prev parent reply other threads:[~2004-01-30 3:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-03 4:28 [PATCH] fix issues with loading PCI ide drivers as modules (linux 2.6.0) Davin McCall
2004-01-04 1:56 ` Bartlomiej Zolnierkiewicz
2004-01-04 3:21 ` Davin McCall
2004-01-04 3:52 ` Bartlomiej Zolnierkiewicz
2004-01-04 6:31 ` Davin McCall
2004-01-04 14:47 ` Bartlomiej Zolnierkiewicz
2004-01-05 2:09 ` Davin McCall
2004-01-05 14:16 ` Bartlomiej Zolnierkiewicz
2004-01-06 2:51 ` Davin McCall
2004-01-06 11:13 ` Bartlomiej Zolnierkiewicz
2004-01-06 13:09 ` Davin McCall
2004-01-06 13:45 ` Davin McCall
2004-01-30 3:27 ` [PATCH] various IDE patches/cleanups Davin McCall
2004-01-30 3:30 ` Davin McCall
2004-01-30 3:33 ` Davin McCall
2004-01-30 3:34 ` Davin McCall [this message]
2004-01-30 3:35 ` Davin McCall
2004-02-05 5:21 ` Davin McCall
2004-02-05 6:37 ` Davin McCall
2004-02-03 19:41 ` Bartlomiej Zolnierkiewicz
2004-02-05 3:51 ` Davin McCall
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=20040130143459.2c206af9.davmac@ozonline.com.au \
--to=davmac@ozonline.com.au \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome