From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bvanassche@acm.org>,
Christoph Hellwig <hch@infradead.org>,
Ming Lei <ming.lei@redhat.com>, Hannes Reinecke <hare@suse.com>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH 3/8] block: Remove request_queue.nr_queues
Date: Mon, 30 Sep 2019 16:00:42 -0700 [thread overview]
Message-ID: <20190930230047.44113-4-bvanassche@acm.org> (raw)
In-Reply-To: <20190930230047.44113-1-bvanassche@acm.org>
Commit 897bb0c7f1ea ("blk-mq: Use proper cpumask iterator"; v4.6)
removed the last use of request_queue.nr_queues from outside
blk_mq_init_allocate_queue(). Remove this member variable to make
struct request_queue smaller. This patch does not change any
functionality.
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-mq.c | 6 +++---
include/linux/blkdev.h | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 29275f5a996f..25b8a9b44a31 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2867,9 +2867,9 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
/* init q->mq_kobj and sw queues' kobjects */
blk_mq_sysfs_init(q);
- q->nr_queues = nr_hw_queues(set);
- q->queue_hw_ctx = kcalloc_node(q->nr_queues, sizeof(*(q->queue_hw_ctx)),
- GFP_KERNEL, set->numa_node);
+ q->queue_hw_ctx = kcalloc_node(nr_hw_queues(set),
+ sizeof(*(q->queue_hw_ctx)), GFP_KERNEL,
+ set->numa_node);
if (!q->queue_hw_ctx)
goto err_sys_init;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6032bb740cf4..fe32e07c5e3c 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -411,7 +411,6 @@ struct request_queue {
/* sw queues */
struct blk_mq_ctx __percpu *queue_ctx;
- unsigned int nr_queues;
unsigned int queue_depth;
--
2.23.0.444.g18eeb5a265-goog
next prev parent reply other threads:[~2019-09-30 23:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 23:00 [PATCH 0/8] Block layer patches for kernel v5.5 Bart Van Assche
2019-09-30 23:00 ` [PATCH 1/8] block: Fix three kernel-doc warnings Bart Van Assche
2019-09-30 23:00 ` [PATCH 2/8] block: Fix writeback throttling W=1 compiler warnings Bart Van Assche
2019-09-30 23:00 ` Bart Van Assche [this message]
2019-09-30 23:00 ` [PATCH 4/8] block: Remove "dying" checks from sysfs callbacks Bart Van Assche
2019-09-30 23:00 ` [PATCH 5/8] block: Reduce sysfs_lock locking inside blk_cleanup_queue() Bart Van Assche
2019-09-30 23:00 ` [PATCH 6/8] block: Document all members of blk_mq_tag_set and bkl_mq_queue_map Bart Van Assche
2019-09-30 23:00 ` [PATCH 7/8] null_blk: Improve nullb_device_##NAME##_store() readability Bart Van Assche
2019-09-30 23:00 ` [PATCH 8/8] null_blk: Enable modifying 'submit_queues' after an instance has been configured Bart Van Assche
2019-10-02 3:28 ` [PATCH 0/8] Block layer patches for kernel v5.5 Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190930230047.44113-4-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=hare@suse.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).