From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Interesting lockdep message coming out of blktap Date: Mon, 29 Mar 2010 13:11:35 -0700 Message-ID: <4BB10977.6030002@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel Stodden Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org I'm getting this: blktap_validate_params: aio:/dev/vg_lilith-raid/xen-f13-64: capacity: 20971520, sector-size: 512 blktap_validate_params: aio:/dev/vg_lilith-raid/xen-f13-64: capacity: 20971520, sector-size: 512 blktap_device_create: minor 0 sectors 20971520 sector-size 512 blktap_device_create: creation of 253:0: 0 INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 4042, comm: blkid Not tainted 2.6.32 #75 Call Trace: [] __lock_acquire+0x16d0/0x1767 [] ? xen_force_evtchn_callback+0xd/0xf [] ? check_events+0x12/0x20 [] ? apply_to_page_range+0x2ba/0x3c8 [] lock_acquire+0xf2/0x116 [] ? apply_to_page_range+0x2ba/0x3c8 [] ? ftrace_format_kmalloc+0x63/0xdd [] _spin_lock+0x36/0x45 [] ? apply_to_page_range+0x2ba/0x3c8 [] apply_to_page_range+0x2ba/0x3c8 [] ? blktap_map_uaddr_fn+0x0/0x50 [] blktap_device_process_request+0x457/0x989 [] ? get_page_from_freelist+0x49b/0x804 [] ? xen_restore_fl_direct_end+0x0/0x1 [] ? __module_text_address+0xd/0x53 [] ? trace_hardirqs_on_caller+0x111/0x135 [] ? _spin_unlock_irq+0x3c/0x5a [] ? __down_read+0x38/0xad [] ? evtchn_interrupt+0xaa/0x112 [] blktap_device_do_request+0x1dc/0x298 [] ? _spin_unlock_irqrestore+0x56/0x74 [] ? del_timer+0xd7/0xe5 [] ? sync_page_killable+0x0/0x30 [] __generic_unplug_device+0x30/0x35 [] generic_unplug_device+0x29/0x3a [] blk_unplug+0x71/0x76 [] blk_backing_dev_unplug+0xd/0xf [] block_sync_page+0x42/0x44 [] sync_page+0x3f/0x48 [] sync_page_killable+0x9/0x30 [] __wait_on_bit_lock+0x41/0x8a [] __lock_page_killable+0x61/0x68 [] ? wake_bit_function+0x0/0x2e [] ? __might_sleep+0x3d/0x127 [] generic_file_aio_read+0x3db/0x594 [] ? __lock_acquire+0x9a5/0x1767 [] ? check_events+0x12/0x20 [] do_sync_read+0xe3/0x120 [] ? autoremove_wake_function+0x0/0x34 [] ? selinux_file_permission+0x5d/0x10f [] ? security_file_permission+0x11/0x13 [] vfs_read+0xaa/0x16f [] ? trace_hardirqs_on_caller+0x111/0x135 [] sys_read+0x45/0x6c [] system_call_fastpath+0x16/0x1b The lock in question appears to be the pte spinlock, taken in apply_to_page_range() at: 0xffffffff810da9af is in apply_to_page_range (/home/jeremy/git/linux/mm/memory.c:1855). 1850 spinlock_t *uninitialized_var(ptl); 1851 1852 pte = (mm ==&init_mm) ? 1853 pte_alloc_kernel(pmd, addr) : 1854 pte_alloc_map_lock(mm, pmd, addr,&ptl); 1855 if (!pte) 1856 return -ENOMEM; 1857 1858 BUG_ON(pmd_huge(*pmd)); 1859 (I'm pretty sure its really 1854, the usermode mm case.) I have split PTE locks enabled, so this is a per-page pte lock rather than the global mm one. It seems highly unlikely this is not being initialized properly in general, or every pte lock would end up triggering this message. I wonder if something else is going wrong here? I'm not really sure what the blktap code is trying to do here. Any thoughts? Thanks, J