From: Linus Torvalds Date: Mon, 10 Oct 2016 00:29:33 +0000 (-0700) Subject: Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block X-Git-Tag: v4.9-rc1~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12e3d3cdd975fe986cc5c35f60b1467a8ec20b80;p=platform%2Fkernel%2Flinux-amlogic.git Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block Pull blk-mq irq/cpu mapping updates from Jens Axboe: "This is the block-irq topic branch for 4.9-rc. It's mostly from Christoph, and it allows drivers to specify their own mappings, and more importantly, to share the blk-mq mappings with the IRQ affinity mappings. It's a good step towards making this work better out of the box" * 'for-4.9/block-irq' of git://git.kernel.dk/linux-block: blk_mq: linux/blk-mq.h does not include all the headers it depends on blk-mq: kill unused blk_mq_create_mq_map() blk-mq: get rid of the cpumask in struct blk_mq_tags nvme: remove the post_scan callout nvme: switch to use pci_alloc_irq_vectors blk-mq: provide a default queue mapping for PCI device blk-mq: allow the driver to pass in a queue mapping blk-mq: remove ->map_queue blk-mq: only allocate a single mq_map per tag_set blk-mq: don't redistribute hardware queues on a CPU hotplug event --- 12e3d3cdd975fe986cc5c35f60b1467a8ec20b80 diff --cc block/blk-mq-tag.c index cef618f,2eae3d5..dcf5ce3 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@@ -412,9 -673,8 +406,8 @@@ struct blk_mq_tags *blk_mq_init_tags(un void blk_mq_free_tags(struct blk_mq_tags *tags) { - bt_free(&tags->bitmap_tags); - bt_free(&tags->breserved_tags); + sbitmap_queue_free(&tags->bitmap_tags); + sbitmap_queue_free(&tags->breserved_tags); - free_cpumask_var(tags->cpumask); kfree(tags); } diff --cc block/blk-mq-tag.h index 09f4cc0,5569641..d166273 --- a/block/blk-mq-tag.h +++ b/block/blk-mq-tag.h @@@ -17,8 -42,8 +17,6 @@@ struct blk_mq_tags struct request **rqs; struct list_head page_list; -- - cpumask_var_t cpumask; - int alloc_policy; }; diff --cc block/blk-mq.c index dc5f47f,f1c5263..b65f572 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@@ -224,11 -245,21 +224,11 @@@ struct request *blk_mq_alloc_request(st return ERR_PTR(ret); ctx = blk_mq_get_ctx(q); - hctx = q->mq_ops->map_queue(q, ctx->cpu); + hctx = blk_mq_map_queue(q, ctx->cpu); blk_mq_set_alloc_data(&alloc_data, q, flags, ctx, hctx); - rq = __blk_mq_alloc_request(&alloc_data, rw, 0); - if (!rq && !(flags & BLK_MQ_REQ_NOWAIT)) { - __blk_mq_run_hw_queue(hctx); - blk_mq_put_ctx(ctx); - - ctx = blk_mq_get_ctx(q); - hctx = blk_mq_map_queue(q, ctx->cpu); - blk_mq_set_alloc_data(&alloc_data, q, flags, ctx, hctx); - rq = __blk_mq_alloc_request(&alloc_data, rw, 0); - ctx = alloc_data.ctx; - } blk_mq_put_ctx(ctx); + if (!rq) { blk_queue_exit(q); return ERR_PTR(-EWOULDBLOCK); diff --cc drivers/block/nbd.c index ccfcfc1,4c6dd1a..ba405b5 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@@ -881,7 -881,7 +881,6 @@@ static int nbd_init_request(void *data static struct blk_mq_ops nbd_mq_ops = { .queue_rq = nbd_queue_rq, -- .map_queue = blk_mq_map_queue, .init_request = nbd_init_request, .timeout = nbd_xmit_timeout, };