On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote: > With multiple maps, nr_cpu_ids is no longer the maximum number of > hardware queues we support on a given devices. The initializer of > the tag_set can have set ->nr_hw_queues larger than the available > number of CPUs, since we can exceed that with multiple queue maps. > > Reviewed-by: Hannes Reinecke <[email protected]> > Signed-off-by: Jens Axboe <[email protected]> > --- > block/blk-mq.c | 28 +++++++++++++++++++++------- > 1 file changed, 21 insertions(+), 7 deletions(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 0fab36372ace..60a951c4934c 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -2663,6 +2663,19 @@ static void blk_mq_realloc_hw_ctxs(struct > blk_mq_tag_set *set, > mutex_unlock(&q->sysfs_lock); > } > > +/* > + * Maximum number of queues we support. For single sets, we'll never have ^ hardware? > + * more than the CPUs (software queues). For multiple sets, the tag_set > + * user may have set ->nr_hw_queues larger. > + */
Anyway: Reviewed-by: Bart Van Assche <[email protected]>
