On Tue, Nov 25, 2014 at 03:47:40PM +0100, Hannes Reinecke wrote:
> I'd rather have a single map to get request/tags from; otherwise
> we'd be arbitrarily starving internal requests even though the
> 'main' tag map is empty.

At least in blk-mq the assumption is that a driver needs very few
internal tags, and it might need access to them in "emergency"
situations like resets or aborts.

> My plan was more to mark a certain range of tags as 'reserved',
> and add another helper/argument to allow to dip into the reserved
> pool, too.

We can add this as optional behavior, but I think the existing blk-mq
behavior is a good default.

> A tentative patch is attached.
> Idea is to call blk_queue_init_tags() with the actual tag size and
> then blk_resize_tags() to limit the number of tags for the request
> queue.
> The driver can then use 'blk_allocate_tag' with the appropriate max
> depth to get tags from the range [max_depth:real_max_depth].

I'd much prefer the blk-mq approach with two maps.  Either way please
make sure whatever you come up is compatible with blk-mq.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to