* [PATCH] 2.4.25-pre8: loss of SCSI I/O initiative
@ 2004-02-02 17:42 Martin Peschke3
2004-02-02 18:48 ` Doug Ledford
0 siblings, 1 reply; 4+ messages in thread
From: Martin Peschke3 @ 2004-02-02 17:42 UTC (permalink / raw)
To: marcelo.tosatti, dledford; +Cc: linux-scsi, andmike, axboe, garloff
Marcelo, Doug,
here is another patch, which corrects some 'loss of initiative' problems.
We hit the problems using the zfcp driver in SUSE first, but they
also prevail in the vanilla 2.4 kernel.
While the SCSI mid layer is iterating through a SCSI host's
device list in an attempt to keep I/O running by kicking the
respective queues, it untimely quits the loop if it comes
across an indisposed SCSI device. Hence, it fails to kick the
queues of the remaining SCSI devices on the same host.
Jens Axboe, Mike Anderson, Kurt Garloff and I have agreed that
the right fix comprises the removal of those checks which lead
to the faulty 'break', as scsi_request_fn() takes care of the
respective conditions.
Please apply.
Cheers,
Martin
IBM Deutschland Entwicklung GmbH
Linux for eServer Development
--- linux-2.4.25-pre8/drivers/scsi/scsi_error.c 2003-04-22 08:25:35.000000000 -0700
+++ linux-2.4.25-pre8-patched/drivers/scsi/scsi_error.c 2004-01-28 16:31:34.000000000 -0800
@@ -1257,14 +1257,7 @@
*/
spin_lock_irqsave(&io_request_lock, flags);
for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) {
- request_queue_t *q;
- if ((host->can_queue > 0 && (host->host_busy >= host->can_queue))
- || (host->host_blocked)
- || (host->host_self_blocked)
- || (SDpnt->device_blocked)) {
- break;
- }
- q = &SDpnt->request_queue;
+ request_queue_t *q = &SDpnt->request_queue;
q->request_fn(q);
}
spin_unlock_irqrestore(&io_request_lock, flags);
--- linux-2.4.25-pre8/drivers/scsi/scsi_lib.c 2003-06-12 11:15:16.000000000 -0700
+++ linux-2.4.25-pre8-patched/drivers/scsi/scsi_lib.c 2004-01-28 16:31:34.000000000 -0800
@@ -245,7 +245,6 @@
*/
void scsi_queue_next_request(request_queue_t * q, Scsi_Cmnd * SCpnt)
{
- int all_clear;
unsigned long flags;
Scsi_Device *SDpnt;
struct Scsi_Host *SHpnt;
@@ -283,19 +282,10 @@
if (SDpnt->single_lun
&& list_empty(&q->queue_head)
&& SDpnt->device_busy == 0) {
- request_queue_t *q;
-
for (SDpnt = SHpnt->host_queue;
SDpnt;
SDpnt = SDpnt->next) {
- if (((SHpnt->can_queue > 0)
- && (SHpnt->host_busy >= SHpnt->can_queue))
- || (SHpnt->host_blocked)
- || (SHpnt->host_self_blocked)
- || (SDpnt->device_blocked)) {
- break;
- }
- q = &SDpnt->request_queue;
+ request_queue_t *q = &SDpnt->request_queue;
q->request_fn(q);
}
}
@@ -308,24 +298,14 @@
* flag as the queue function releases the lock and thus some
* other device might have become starved along the way.
*/
- all_clear = 1;
if (SHpnt->some_device_starved) {
+ /* ->request_fn() will reset flag to 1, if needed */
+ SHpnt->some_device_starved = 0;
for (SDpnt = SHpnt->host_queue; SDpnt; SDpnt = SDpnt->next) {
- request_queue_t *q;
- if ((SHpnt->can_queue > 0 && (SHpnt->host_busy >= SHpnt->can_queue))
- || (SHpnt->host_blocked)
- || (SHpnt->host_self_blocked)) {
- break;
- }
- if (SDpnt->device_blocked || !SDpnt->starved) {
+ if (!SDpnt->starved)
continue;
- }
- q = &SDpnt->request_queue;
+ request_queue_t *q = &SDpnt->request_queue;
q->request_fn(q);
- all_clear = 0;
- }
- if (SDpnt == NULL && all_clear) {
- SHpnt->some_device_starved = 0;
}
}
spin_unlock_irqrestore(&io_request_lock, flags);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 2.4.25-pre8: loss of SCSI I/O initiative
2004-02-02 17:42 [PATCH] 2.4.25-pre8: loss of SCSI I/O initiative Martin Peschke3
@ 2004-02-02 18:48 ` Doug Ledford
2004-02-03 9:07 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Doug Ledford @ 2004-02-02 18:48 UTC (permalink / raw)
To: Martin Peschke3
Cc: Marcelo Tosatti, linux-scsi mailing list, andmike, axboe, garloff
On Mon, 2004-02-02 at 12:42, Martin Peschke3 wrote:
>
>
> Marcelo, Doug,
>
> here is another patch, which corrects some 'loss of initiative' problems.
Hi Martin. Both of the patches you posted touch areas of code that are
also touched by some of the patches I'm merging for the everything
tree. So, Marcelo, whether or not to take these depends partially on
your decision as to what to do with the other scsi patches we've got
here and that SuSE has. In particular, it's possible that the mlqueue
patch that I haven't got in my 2.4-everything tree yet may very well
obsolete the need for one of these, and another patch in our tree may
obsolete the need for the other. I'm not sure yet. Anyway, just wanted
to let you know that if you are considering the bigger set of SCSI
patches (and yes, I'm sure you want to see them before you would ever
say yes, I'm just not sure if you've already decided that your answer is
"no") then both of these patches from Martin would have to be merged
with the final product and might not be necessary in the end, or if they
are necessary I'm sure they'll have a slightly different form.
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 2.4.25-pre8: loss of SCSI I/O initiative
@ 2004-02-02 20:42 Martin Peschke3
0 siblings, 0 replies; 4+ messages in thread
From: Martin Peschke3 @ 2004-02-02 20:42 UTC (permalink / raw)
To: Doug Ledford
Cc: Marcelo Tosatti, linux-scsi mailing list, andmike, axboe, garloff
Doug,
I have just checked the latest RedHat EL kernel sources and found
some related changes. Nonetheless, the SCSI DMA pool fix seems to be
needed in RedHat Linux as well. IMO, the 'pure fixes' tree is a better
place for these patches than the 'everything' tree.
Marcelo,
I'd certainly appriciate if the pile of patches being prepared by Doug
was merged into the kernel. It will be fine with me if it is his decision
whether the reported problems are to be solved by the patches I
posted or by Doug's other patches. I just want these problems
being taken care of in some way. I will not be too concerned
(that's your business ;-), if none of both fixes makes it into
2.4.25, but show up in some form in a later 2.4 kernel, as costumers
use distributors' back-level kernels anyway.
Mit freundlichen Grüßen / with kind regards
Martin Peschke
IBM Deutschland Entwicklung GmbH
Linux for eServer Development
Phone: +49-(0)7031-16-2349
Doug Ledford <dledford@redhat.com> on 02/02/2004 19:48:49
To: Martin Peschke3/Germany/IBM@IBMDE
cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>, linux-scsi mailing
list <linux-scsi@vger.kernel.org>, andmike@us.ibm.com,
axboe@suse.de, garloff@suse.de
Subject: Re: [PATCH] 2.4.25-pre8: loss of SCSI I/O initiative
On Mon, 2004-02-02 at 12:42, Martin Peschke3 wrote:
>
>
> Marcelo, Doug,
>
> here is another patch, which corrects some 'loss of initiative' problems.
Hi Martin. Both of the patches you posted touch areas of code that are
also touched by some of the patches I'm merging for the everything
tree. So, Marcelo, whether or not to take these depends partially on
your decision as to what to do with the other scsi patches we've got
here and that SuSE has. In particular, it's possible that the mlqueue
patch that I haven't got in my 2.4-everything tree yet may very well
obsolete the need for one of these, and another patch in our tree may
obsolete the need for the other. I'm not sure yet. Anyway, just wanted
to let you know that if you are considering the bigger set of SCSI
patches (and yes, I'm sure you want to see them before you would ever
say yes, I'm just not sure if you've already decided that your answer is
"no") then both of these patches from Martin would have to be merged
with the final product and might not be necessary in the end, or if they
are necessary I'm sure they'll have a slightly different form.
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 2.4.25-pre8: loss of SCSI I/O initiative
2004-02-02 18:48 ` Doug Ledford
@ 2004-02-03 9:07 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2004-02-03 9:07 UTC (permalink / raw)
To: Doug Ledford
Cc: Martin Peschke3, Marcelo Tosatti, linux-scsi mailing list,
andmike, garloff
On Mon, Feb 02 2004, Doug Ledford wrote:
> On Mon, 2004-02-02 at 12:42, Martin Peschke3 wrote:
> >
> >
> > Marcelo, Doug,
> >
> > here is another patch, which corrects some 'loss of initiative' problems.
>
> Hi Martin. Both of the patches you posted touch areas of code that are
> also touched by some of the patches I'm merging for the everything
> tree. So, Marcelo, whether or not to take these depends partially on
> your decision as to what to do with the other scsi patches we've got
> here and that SuSE has. In particular, it's possible that the mlqueue
> patch that I haven't got in my 2.4-everything tree yet may very well
> obsolete the need for one of these, and another patch in our tree may
> obsolete the need for the other. I'm not sure yet. Anyway, just wanted
> to let you know that if you are considering the bigger set of SCSI
> patches (and yes, I'm sure you want to see them before you would ever
> say yes, I'm just not sure if you've already decided that your answer is
> "no") then both of these patches from Martin would have to be merged
> with the final product and might not be necessary in the end, or if they
> are necessary I'm sure they'll have a slightly different form.
The patches Martin sent could be merged before any pending bigger
merges - they are pretty straight forward. I'd rather not put smaller
changes like that into bigger trees and merge all of those at one time
if only because it doesn't exactly help bug finding...
So in my opinion, they should just go straight to Marcelo.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-02-03 9:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-02 17:42 [PATCH] 2.4.25-pre8: loss of SCSI I/O initiative Martin Peschke3
2004-02-02 18:48 ` Doug Ledford
2004-02-03 9:07 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2004-02-02 20:42 Martin Peschke3
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.