Thread (4 messages) 4 messages, 2 authors, 2017-07-13

Re: [PATCH] blk-mq: only alloc hctx point as many as nr_hw_queues

From: Jens Axboe <axboe@kernel.dk>
Date: 2017-07-13 16:38:40

On 07/13/2017 10:30 AM, weiping zhang wrote:
On Thu, Jul 13, 2017 at 10:14:31AM -0600, Jens Axboe wrote:
quoted
On 07/13/2017 10:10 AM, weiping zhang wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help