On Tue, Aug 20, 2019 at 02:07:43PM -0700, Bart Van Assche wrote:
> On 8/19/19 1:15 AM, Ming Lei wrote:
> > hctx->tags is tagset wide or host-wide, which is protected by 
> > set->tag_list_lock.
> 
> Isn't the purpose of set->tag_list_lock to protect set->tag_list?

In theory, .tags is shared among all queues in tagset, so it should be
protected by tagset wide lock, what is why set->tag_list_lock is held
in blk_mq_update_nr_hw_queues().

However, both sysfs and debugfs read/write doesn't hold this lock because
the .tags won't be shrunk in blk_mq_update_nr_requests(), and
blk_mq_update_nr_hw_queues un-registers debugfs/sysfs before changing .tags.


thanks,
Ming

Reply via email to