Re: [PATCH 13/15] block: remove several ->elevator_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 11, 2025 at 12:37:49AM +0530, Nilay Shroff wrote:
> 
> 
> On 4/10/25 7:00 PM, Ming Lei wrote:
> > Both blk_mq_map_swqueue() and blk_mq_realloc_hw_ctxs() are only called
> > from queue initialization or updating nr_hw_queues code, in which
> > elevator switch can't happen any more.
> > 
> > So remove these ->elevator_lock uses.
> > 
> But what if blk_mq_map_swqueue runs in parallel, one context from
> blk_mq_init_allocated_queue and another from blk_mq_update_nr_hw_queues?
> It seems this is possible due to blk_mq_map_swqueue is invoked right
> after queue is added in tag-set from blk_mq_init_allocated_queue.

Good catch, one simple fix is to swap blk_mq_add_queue_tag_set() with
blk_mq_map_swqueue() in blk_mq_init_allocated_queue() since blk_mq_map_swqueue
doesn't rely on BLK_MQ_F_TAG_QUEUE_SHARED.


Thanks,
Ming





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux