Re: ll_rw_blk.c fails to merge requests. Help!

From: Jens Axboe (axboe@suse.de)
Date: Tue Aug 29 2000 - 18:03:48 EST


On Tue, Aug 29 2000, David Mansfield wrote:
> > This one works even better.

Good to know, thanks for testing.

> > + list_add(&req->table, &q->pending_freelist);
> > + if (++q->pending_free > 64) {

And you are right, this is best a fractional value of the total number
of requests.

> I have two comments about this patch. (the reqfree-batching-3)
>
> First. Couldn't it end up indefinitely starving a writer?

Yes, that is right. I have a newer version in my tree, that uses the
complete split pending lists (and nr pending counter) along with
separate wait queues. I'm just doing some testing on it now, to make
sure it is 100% safe. This makes performance even better than the -3
patch here.

> Second. At queue destroy time (blk_cleanup_queue) the pending_list
> should be spliced into the free_list so they won't get leaked.
> Alternatively,
> add a 'count -= blk_cleanup_queue(&q->pending_list)'.

Naturally, -3 was never a proposal for inclusion, just a quick test
patch ;-). This is also in my current tree.

-- 
* Jens Axboe <axboe@suse.de>
* SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:24 EST