Re: RFC on io-stalls patch

Andrea Arcangeli (andrea@suse.de)
Mon, 14 Jul 2003 22:19:24 +0200


On Mon, Jul 14, 2003 at 04:09:08PM -0400, Chris Mason wrote:
> On Mon, 2003-07-14 at 15:51, Jens Axboe wrote:
> > --- 1.47/drivers/block/ll_rw_blk.c Fri Jul 11 10:30:54 2003
> > +++ edited/drivers/block/ll_rw_blk.c Mon Jul 14 20:42:36 2003
> > @@ -549,10 +549,12 @@
> > static struct request *get_request(request_queue_t *q, int rw)
> > {
> > struct request *rq = NULL;
> > - struct request_list *rl;
> > + struct request_list *rl = &q->rq;
> >
> > - rl = &q->rq;
> > - if (!list_empty(&rl->free) && !blk_oversized_queue(q)) {
> > + if ((rw == WRITE) && (blk_oversized_queue(q) || (rl->count < 4)))
> > + return NULL;
> > +
> > + if (!list_empty(&rl->free)) {
> > rq = blkdev_free_rq(&rl->free);
> > list_del(&rq->queue);
> > rl->count--;
> > @@ -947,7 +949,7 @@
>
> Could I talk you into trying a form of this patch that honors
> blk_oversized_queue for everything except the BH_sync requests?

not honoring blk_oversized_queue for BH_sync isn't safe either (still it
would be an order of magnitude safer than not honoring it for all reads
unconditonally) there must be a secondary limit, eating all the
requests with potentially 512k of ram queued into each requests is
unsafe (one can generate many sync requests by forking some hundred
thousand tasks, this isn't only x86).

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/