Re: [PATCH] as i/o hang with aacraid driver 2.6.0-test1

Mark Haverkamp
2003-07-31T14:40:56Z

On Thu, 2003-07-31 at 00:16, Nick Piggin wrote:
> James Bottomley wrote:
>
> >On Fri, 2003-07-18 at 12:46, Mark Haverkamp wrote:
> >
> >>I'll try out your test harness on our hardware and see what happens.
> >>
>
> Sorry for coming in a few weeks late here. Thanks everyone who
> has been taking time on this.
>
> What is the status of this stuff? I see Andrew's latest tree still
> has your "HACK: ***" in it, James. Who is putting together a complete
> patch for Andrew?
>
> >
> >OK, I think I found the problem.
> >
>
> Yes, the problem with AS just the I-don't-know-about-requeue thing.
> As you have found there are other non AS problems there.
>
> Thanks again everyone.

Nick,

Here is the requeue function I have been using for a while. It is based
on your original requeue function. It has been working for me.

Mark.

===== drivers/block/as-iosched.c 1.9 vs edited =====
--- 1.9/drivers/block/as-iosched.c Fri Jul 25 11:19:44 2003
+++ edited/drivers/block/as-iosched.c Thu Jul 31 07:30:04 2003
@@ -1307,12 +1307,30 @@
}

/*
- * FIXME: HACK for AS requeue problems
+ * requeue the request. The request has not been completed, nor is it a
+ * new request, so don't touch accounting.
*/
static void as_requeue_request(request_queue_t *q, struct request *rq)
{
- elv_completed_request(q, rq);
- __elv_add_request(q, rq, 0, 0);
+ struct as_data *ad = q->elevator.elevator_data;
+ struct as_rq *arq = RQ_DATA(rq);
+
+ if (arq) {
+ if (arq->io_context && arq->io_context->aic) {
+ arq->state = AS_RQ_DISPATCHED;
+ atomic_inc(&arq->io_context->aic->nr_dispatched);
+ }
+ } else
+ WARN_ON(!(rq->flags & REQ_HARDBARRIER) && blk_fs_request(rq));
+
+ list_add_tail(&rq->queuelist, ad->dispatch);
+
+ /* Stop anticipating - let this request get through */
+ if (ad->antic_status == ANTIC_WAIT_REQ
+ || ad->antic_status == ANTIC_WAIT_NEXT)
+ as_antic_stop(ad);
+
+ return;
}

static void

--
Mark Haverkamp <markh@osdl.org>