From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org
Cc: weiping <zhangweiping@didichuxing.com>
Subject: Re: [PATCH] blk-mq: only alloc hctx point as many as nr_hw_queues
Date: Thu, 13 Jul 2017 10:38:40 -0600 [thread overview]
Message-ID: <6e472c5c-5461-ccc4-1a50-042a2343a3e7@kernel.dk> (raw)
In-Reply-To: <20170713163015.GA10602@bogon.didichuxing.com>
On 07/13/2017 10:30 AM, weiping zhang wrote:
> On Thu, Jul 13, 2017 at 10:14:31AM -0600, Jens Axboe wrote:
>> On 07/13/2017 10:10 AM, weiping zhang wrote:
>>> one hw queue only has one hctx, reduce it's number same as nr_hw_queues.
>>
>> What happens if a device registers with eg 4 hw queues, then later
>> calls blk_mq_update_nr_hw_queues()?
>>
>
> your means, 10 cpu, and device has 10 hw queues, but only register 4,
> and then update it to 10, no place store new hctx. Am i understanding
> right ? if yes, could you tell me why driver do that ? thanks.
It doesn't matter why the driver would do that, the fact is that this is
a feature we support and it's a part of the API. NBD uses it, for
instance. Your patch breaks it, for saving a bit of memory. So I will
not include it.
--
Jens Axboe
prev parent reply other threads:[~2017-07-13 16:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 16:10 [PATCH] blk-mq: only alloc hctx point as many as nr_hw_queues weiping zhang
2017-07-13 16:14 ` Jens Axboe
2017-07-13 16:30 ` weiping zhang
2017-07-13 16:38 ` Jens Axboe [this message]
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=6e472c5c-5461-ccc4-1a50-042a2343a3e7@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=zhangweiping@didichuxing.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