Subject: Re: Status of NEW_BUFQ_STRATEGY?
To: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
From: enami tsugutomo <enami@but-b.or.jp>
List: current-users
Date: 11/02/2002 09:03:11
Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de> writes:
> Btw.: there seems to be a queue error:
>
> TAILQ_REMOVE(&prio->bq_write, prio->bq_next, b_actq);
> /*
> * Advance the write pointer.
> */
> prio->bq_write_next =
> TAILQ_NEXT(prio->bq_write_next, b_actq);
> if (prio->bq_write_next == NULL)
> prio->bq_write_next =
> TAILQ_FIRST(&prio->bq_write);
>
> should become
>
> /*
> * Advance the write pointer.
> */
> prio->bq_write_next =
> TAILQ_NEXT(prio->bq_write_next, b_actq);
> if (prio->bq_write_next == NULL)
> prio->bq_write_next =
> TAILQ_FIRST(&prio->bq_write);
> TAILQ_REMOVE(&prio->bq_write, prio->bq_next, b_actq);
>
The latter doesn't work if there is only one element in the queue.
The former *usually* works, since TAILQ_REMOVE() leaves tqe_next of
removed entry unchanged.
> <bufq_prio_get+93> is the instruction generating the fault.
>
> I cannnot see a zero dereference here, confused ...
One possiblility is an interrupt (but the sequence in question in
wdstragety is executed with disk interrupt blocked...).
enami.