Re: [PATCH V7 1/9] blk-mq: grab .q_usage_counter when queuing request from plug code path

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

 



On Thu, Apr 25, 2019 at 07:32:34AM +0200, Christoph Hellwig wrote:
> On Thu, Apr 25, 2019 at 08:53:34AM +0800, Ming Lei wrote:
> > It isn't in other callers of blk_mq_sched_insert_requests(), it is just
> > needed in some corner case like flush plug context.
> > 
> > For other callers of blk_mq_sched_insert_requests(), it is guaranteed
> > that request queue's ref is held.
> 
> In both Linus' tree and Jens' for-5.2 tree I only see these two
> callers of blk_mq_sched_insert_requests.  What am I missing?

OK, what I meant is that the issue is flush plug context specific.
And I didn't notice that this function is only called by
blk_mq_flush_plug_list().

Then it is fine to move the percpu_ref_get()/percpu_ref_put() into
the function, better with comment on this issue.

Thanks, 
Ming



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux