Re: mmu_notifiers: turn off lockdep around mm_take_all_locks

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

 



On 07/07/2009 09:15 PM, Peter Zijlstra wrote:
On Tue, 2009-07-07 at 15:06 -0300, Marcelo Tosatti wrote:
KVM guests with CONFIG_LOCKDEP=y trigger the following warning:

BUG: MAX_LOCK_DEPTH too low!
turning off the locking correctness validator.
Pid: 4624, comm: qemu-system-x86 Not tainted 2.6.31-rc2-03981-g3abaf21
#32
Call Trace:
  [<ffffffff81068bab>] __lock_acquire+0x1559/0x15fc
  [<ffffffff810be4d9>] ? mm_take_all_locks+0x99/0x109
  [<ffffffff810be4d9>] ? mm_take_all_locks+0x99/0x109
  [<ffffffff81068d3c>] lock_acquire+0xee/0x112
  [<ffffffff810be516>] ? mm_take_all_locks+0xd6/0x109
  [<ffffffff81402596>] ? _spin_lock_nest_lock+0x20/0x50
  [<ffffffff814025b7>] _spin_lock_nest_lock+0x41/0x50
  [<ffffffff810be516>] ? mm_take_all_locks+0xd6/0x109
  [<ffffffff810be516>] mm_take_all_locks+0xd6/0x109
  [<ffffffff810d0f76>] do_mmu_notifier_register+0xd4/0x199
  [<ffffffff810d1060>] mmu_notifier_register+0x13/0x15
  [<ffffffffa0107f16>] kvm_dev_ioctl+0x13f/0x30e [kvm]
  [<ffffffff810e6a3a>] vfs_ioctl+0x2f/0x7d
  [<ffffffff810e6fb7>] do_vfs_ioctl+0x4af/0x4ec
  [<ffffffff814030b4>] ? error_exit+0x94/0xb0
  [<ffffffff81401f92>] ? trace_hardirqs_off_thunk+0x3a/0x3c
  [<ffffffff8100bc2d>] ? retint_swapgs+0xe/0x13
  [<ffffffff810e703b>] sys_ioctl+0x47/0x6a
  [<ffffffff811d849c>] ? __up_read+0x1a/0x85
  [<ffffffff8100b1db>] system_call_fastpath+0x16/0x1b

Since mm_take_all_locks takes a gazillion locks.

Is there any way around this other than completly shutting down lockdep?

When we created this the promise was that kvm would only do this on a
fresh mm with only a few vmas, has that changed

The number of vmas did increase, but not materially. We do link with more shared libraries though.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux