From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Stodden Subject: Re: blktap lockdep hiccup Date: Mon, 6 Sep 2010 18:46:57 -0700 Message-ID: <1283824017.3138.27.camel@agari.van.xensource.com> References: <1282546470-5547-1-git-send-email-daniel.stodden@citrix.com> <1282546470-5547-2-git-send-email-daniel.stodden@citrix.com> <4C802934.2000305@goop.org> <1283468932.3092.3924.camel@ramone.somacoma.net> <4C8597E5.4070802@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C8597E5.4070802@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: Xen , Tom Kopec List-Id: xen-devel@lists.xenproject.org On Mon, 2010-09-06 at 21:39 -0400, Jeremy Fitzhardinge wrote: > On 09/03/2010 09:08 AM, Daniel Stodden wrote: > > On Thu, 2010-09-02 at 18:46 -0400, Jeremy Fitzhardinge wrote: > >> On 08/22/2010 11:54 PM, Daniel Stodden wrote: > >>> Response processing doesn't really belong into hard irq context. > >>> > >>> Another potential problem this avoids is that switching interrupt cpu > >>> affinity in Xen domains can presently lead to event loss, if > >>> RING_FINAL_CHECK is run from hard irq context. > >> I just got this warning from a 32-bit pv domain. I think it may relate > >> to this change. The warning is > > We clearly spin_lock_irqsave all through the blkif_do_interrupt frame. > > > > It follows that something underneath quite unconditionally chose to > > reenable them again (?) > > > > Either: Can you add a bunch of similar WARN_ONs along that path? > > > > Or: This lock is quite coarse-grained. The lock only matters for queue > > access, and we know irqs are reenabled, so no need for flags. In fact we > > only need to spin_lock_irq around the __blk_end_ calls and > > kick_pending_. > > > > But I don't immediately see what's to blame, so I'd be curious. > > I haven't got around to investigating this in more detail yet, but > there's also this long-standing lockdep hiccup in blktap: Ack. Let's fix that somewhere this week and see if we can clean up the spin locking problem too then. Daniel > Starting auto Xen domains: lurch alloc irq_desc for 1235 on node 0 > alloc kstat_irqs on node 0 > block tda: sector-size: 512 capacity: 614400 > INFO: trying to register non-static key. > the code is fine but needs lockdep annotation. > turning off the locking correctness validator. > Pid: 4266, comm: tapdisk2 Not tainted 2.6.32.21 #146 > Call Trace: > [] __lock_acquire+0x1df/0x16e5 > [] ? xen_force_evtchn_callback+0xd/0xf > [] ? check_events+0x12/0x20 > [] ? apply_to_page_range+0x295/0x37d > [] lock_acquire+0xcd/0xf1 > [] ? apply_to_page_range+0x295/0x37d > [] ? apply_to_page_range+0x195/0x37d > [] _spin_lock+0x31/0x40 > [] ? apply_to_page_range+0x295/0x37d > [] apply_to_page_range+0x295/0x37d > [] ? blktap_map_uaddr_fn+0x0/0x55 > [] ? xen_make_pte+0x8a/0x8e > [] blktap_device_process_request+0x43d/0x954 > [] ? xen_force_evtchn_callback+0xd/0xf > [] ? check_events+0x12/0x20 > [] ? xen_force_evtchn_callback+0xd/0xf > [] ? check_events+0x12/0x20 > [] ? mark_held_locks+0x52/0x70 > [] ? _spin_unlock_irq+0x30/0x3c > [] ? trace_hardirqs_on_caller+0x125/0x150 > [] blktap_device_run_queue+0x1c5/0x28f > [] ? unbind_from_irq+0x18/0x198 > [] ? check_events+0x12/0x20 > [] blktap_ring_poll+0x7c/0xc7 > [] do_select+0x387/0x584 > [] ? do_select+0x0/0x584 > [] ? __pollwait+0x0/0xcc > [] ? pollwake+0x0/0x56 > [] ? pollwake+0x0/0x56 > [] ? pollwake+0x0/0x56 > [] ? pollwake+0x0/0x56 > [] ? __lock_acquire+0x16d6/0x16e5 > [] ? xen_force_evtchn_callback+0xd/0xf > [] ? check_events+0x12/0x20 > [] ? xen_force_evtchn_callback+0xd/0xf > [] ? check_events+0x12/0x20 > [] ? xen_force_evtchn_callback+0xd/0xf > [] core_sys_select+0x20c/0x2da > [] ? core_sys_select+0x3e/0x2da > [] ? check_events+0x12/0x20 > [] ? xen_restore_fl_direct_end+0x0/0x1 > [] ? kmem_cache_free+0x18e/0x1c8 > [] ? sock_destroy_inode+0x19/0x1b > [] ? destroy_inode+0x2f/0x44 > [] ? pvclock_clocksource_read+0x4b/0xa2 > [] ? xen_clocksource_read+0x21/0x23 > [] ? xen_clocksource_get_cycles+0x9/0x16 > [] ? ktime_get_ts+0xb2/0xbf > [] sys_select+0x96/0xbe > [] system_call_fastpath+0x16/0x1b > block tdb: sector-size: 512 capacity: 20971520 > block tdc: sector-size: 512 capacity: 146800640 > block tdd: sector-size: 512 capacity: 188743680 > > J >