Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-27 Thread Ming Lei
On Wed, Feb 27, 2019 at 03:24:51PM +0100, Peter Zijlstra wrote: > On Wed, Feb 27, 2019 at 09:35:56AM +0800, Ming Lei wrote: > > On Tue, Feb 26, 2019 at 07:08:02PM +0100, Peter Zijlstra wrote: > > > On Fri, Feb 15, 2019 at 10:26:59AM +0800, Ming Lei wrote: > > > > There might be lots of blk_flush_qu

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-27 Thread Peter Zijlstra
On Wed, Feb 27, 2019 at 09:35:56AM +0800, Ming Lei wrote: > On Tue, Feb 26, 2019 at 07:08:02PM +0100, Peter Zijlstra wrote: > > On Fri, Feb 15, 2019 at 10:26:59AM +0800, Ming Lei wrote: > > > There might be lots of blk_flush_queue instance which is allocated > > > for each hctx, then lots of class

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-26 Thread Ming Lei
On Tue, Feb 26, 2019 at 07:08:02PM +0100, Peter Zijlstra wrote: > On Fri, Feb 15, 2019 at 10:26:59AM +0800, Ming Lei wrote: > > There might be lots of blk_flush_queue instance which is allocated > > for each hctx, then lots of class key slot may be wasted. > > What is 'lots' ? for someone who does

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-26 Thread Peter Zijlstra
On Fri, Feb 15, 2019 at 10:26:59AM +0800, Ming Lei wrote: > There might be lots of blk_flush_queue instance which is allocated > for each hctx, then lots of class key slot may be wasted. What is 'lots' ? for someone who doesn't really know all that much about the block layer.

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-26 Thread Bart Van Assche
On Tue, 2019-02-26 at 18:24 +0100, Peter Zijlstra wrote: > On Thu, Feb 14, 2019 at 03:00:56PM -0800, Bart Van Assche wrote: > > @@ -472,7 +473,8 @@ struct blk_flush_queue *blk_alloc_flush_queue(struct > > request_queue *q, > > if (!fq) > > goto fail; > > > > - spin_lock_init(&f

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-26 Thread Peter Zijlstra
On Thu, Feb 14, 2019 at 03:00:56PM -0800, Bart Van Assche wrote: > @@ -472,7 +473,8 @@ struct blk_flush_queue *blk_alloc_flush_queue(struct > request_queue *q, > if (!fq) > goto fail; > > - spin_lock_init(&fq->mq_flush_lock); > + lockdep_register_key(&fq->key); > +

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-17 Thread Ming Lei
On Fri, Feb 15, 2019 at 08:08:08AM -0800, Bart Van Assche wrote: > On Fri, 2019-02-15 at 10:26 +0800, Ming Lei wrote: > > There might be lots of blk_flush_queue instance which is allocated > > for each hctx, then lots of class key slot may be wasted. > > > > So I suggest to use one nvmet_loop_flus

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-15 Thread Bart Van Assche
On Fri, 2019-02-15 at 10:26 +0800, Ming Lei wrote: > There might be lots of blk_flush_queue instance which is allocated > for each hctx, then lots of class key slot may be wasted. > > So I suggest to use one nvmet_loop_flush_lock_key for this particular issue, > something like the following patch:

Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-14 Thread Ming Lei
On Thu, Feb 14, 2019 at 03:00:56PM -0800, Bart Van Assche wrote: > Avoid that running test nvme/012 from the blktests suite triggers the > following false positive lockdep complaint: > > > WARNING: possible recursive locking detected > 5.0.0-rc3-xfstest

[PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint

2019-02-14 Thread Bart Van Assche
Avoid that running test nvme/012 from the blktests suite triggers the following false positive lockdep complaint: WARNING: possible recursive locking detected 5.0.0-rc3-xfstests-00015-g1236f7d60242 #841 Not tainted --