From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zdenek Kabelac Subject: Re: [PATCH] dm-snapshot: workaround for a lockdep warning Date: Wed, 18 Sep 2013 21:07:43 +0200 Message-ID: <5239F9FF.2010407@redhat.com> References: <52394ED9.5010308@redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Mikulas Patocka Cc: dm-devel@redhat.com, Stephen Boyd , "Alasdair G. Kergon" List-Id: dm-devel.ids Dne 18.9.2013 17:57, Mikulas Patocka napsal(a): > > > On Wed, 18 Sep 2013, Zdenek Kabelac wrote: > >> Dne 18.9.2013 02:08, Mikulas Patocka napsal(a): >>> >>> >>> On Tue, 17 Sep 2013, Mikulas Patocka wrote: >>> >>>> BTW. this patch is no longer needed on 3.11 because md->io_lock was >>>> removed there, so the false lockdep warning doesn't happen. >>>> >>>> So we need to get this patch to stable trees 3.5 to 3.10, but not >>>> upstream. How to push the patch there without pushing it upstream? >>>> >>>> Mikulas >>> >>> It's more complicated than that - the original Zdenek's report shows that >>> the false warning happened on kernel "3.11.1-300.fc20.x86_64+debug". But I >>> am not able to reproduce the bug on 3.11, I only reproduced it on 3.5-3.10 >>> kernels. >>> >>> Zdenek, could you reproduce the bug on kernel 3.11? >>> >>> Mikulas >>> >> >> >> Since I do not have clean 3.11 at my hands - I've reproduced it with my -rc6 >> kernel (few patches based on 8495e9c4a9616c9d19f23182d0536485902259db) >> With enabled kmemleak=on lockdep.prove_locking=1 lockdep.lock_stat=1. > > So - try this patch and tell me if it fixes the problem: > > Index: linux-2.6-devel/drivers/md/dm-snap-persistent.c > =================================================================== > --- linux-2.6-devel.orig/drivers/md/dm-snap-persistent.c 2013-05-10 18:27:31.132358000 +0200 > +++ linux-2.6-devel/drivers/md/dm-snap-persistent.c 2013-09-17 18:41:39.023940000 +0200 > @@ -256,7 +256,7 @@ > */ > INIT_WORK_ONSTACK(&req.work, do_metadata); > queue_work(ps->metadata_wq, &req.work); > - flush_work(&req.work); > + flush_workqueue(ps->metadata_wq); > > return req.result; > } > Yes - this seems to eliminate reported INFO. Though I'm getting curious why some tests are running much much much slower when kmemleak and lockdep is in use. Zdenek