Re: [patch, rfc]: block layer, queues

From: Jens Axboe (axboe@suse.de)
Date: Sun Apr 16 2000 - 21:20:11 EST


On Sun, Apr 16 2000, Andrea Arcangeli wrote:
> >Are you sure that you don't introduce lots of SMP races, e.g. in drivers
> >that support multiple majors?
>
> Also drivers with multiple "queues" should be checked.

Yeah, I suspect that is what Manfred meant.

> In all cases I'd prefer to get the patches separated in little pieces. The
> most interesting part is the get_request complexity fixage without the
> per-queue freelist but with two gloabl freelists. The other parts are more
> scalability changes than real fixes and they are completly orthogonal with
> the get_request fixage. get_request complexity always bitten us also doing
> I/O to only one disk in the system and fixing that things has more prio
> IMHO :).

Alright, I can see how that would be advantageous. Attached is the
proposed patch for stock 2.3.99-pre6-3 which does just that - two
request free lists and changes none of the locking changes.

I agree that the "big" patch is a 2.5 thing, this one should be
completely safe though. get_request tries to be more clever (and quick),
but some of that is lost with the light-weight patch because we must
provide a separate request table for loop and nbd.

> About the per-queue freelist thing, to allocate the requests I suggest to
> create a slab cache and allocating each request from the cache. The
> current big kmalloc wouldn't be reliable with modules.

I've meant to do this but decided it was a secondary issue. I've changed
this now, not for the attached patch though (not an issue).

> the lo->queue_head is a nbd internal queue and it's serialized by the
> down(&lo->queue_lock) so you don't need and you must not grab the
> io_request_lock there. The current code is correct.

Ok, thanks.

-- 
*  Jens Axboe <axboe@suse.de>
*  Linux CD/DVD-ROM, SuSE Labs
*  http://kernel.dk


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



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:09 EST