Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281672 > unrolled thread
| Started by | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| First post | 2015-12-02 12:30 +0100 |
| Last post | 2015-12-03 18:00 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] blk-mq: Reuse hardware context cpumask for tags Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-12-02 12:30 +0100
Re: [PATCH] blk-mq: Reuse hardware context cpumask for tags Sagi Grimberg <sagig@dev.mellanox.co.il> - 2015-12-03 11:10 +0100
Re: [PATCH] blk-mq: Reuse hardware context cpumask for tags Jens Axboe <axboe@kernel.dk> - 2015-12-03 18:00 +0100
| From | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-12-02 12:30 +0100 |
| Subject | [PATCH] blk-mq: Reuse hardware context cpumask for tags |
| Message-ID | <qBdLK-6vD-57@gated-at.bofh.it> |
hctx->cpumask is already populated and let the tag cpumask follow that
instead of going through a new for loop.
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
---
block/blk-mq.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
Nish had suggested to put cpumask_copy after WARN_ON (instead of before).
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 6d6f8fe..6ada3b4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1854,6 +1854,7 @@ static void blk_mq_map_swqueue(struct request_queue *q,
hctx->tags = set->tags[i];
WARN_ON(!hctx->tags);
+ cpumask_copy(hctx->tags->cpumask, hctx->cpumask);
/*
* Set the map size to the number of mapped software queues.
* This is more accurate and more efficient than looping
@@ -1867,14 +1868,6 @@ static void blk_mq_map_swqueue(struct request_queue *q,
hctx->next_cpu = cpumask_first(hctx->cpumask);
hctx->next_cpu_batch = BLK_MQ_CPU_WORK_BATCH;
}
-
- queue_for_each_ctx(q, ctx, i) {
- if (!cpumask_test_cpu(i, online_mask))
- continue;
-
- hctx = q->mq_ops->map_queue(q, i);
- cpumask_set_cpu(i, hctx->tags->cpumask);
- }
}
static void queue_set_hctx_shared(struct request_queue *q, bool shared)
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sagi Grimberg <sagig@dev.mellanox.co.il> |
|---|---|
| Date | 2015-12-03 11:10 +0100 |
| Message-ID | <qByZP-3zg-9@gated-at.bofh.it> |
| In reply to | #1281672 |
Looks good, Reviewed-by: Sagi Grimberg <sagig@mellanox.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Date | 2015-12-03 18:00 +0100 |
| Message-ID | <qBFoD-7HE-25@gated-at.bofh.it> |
| In reply to | #1281672 |
On 12/02/2015 04:27 AM, Raghavendra K T wrote: > hctx->cpumask is already populated and let the tag cpumask follow that > instead of going through a new for loop. Applied for 4.5, thanks. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web