+#if defined(DEBUG) && NCPUS == 1
+ /*
+ * XXX this recursive use of the VM won't work on a MP
+ * (or when otherwise debugging simple locks). We might
+ * be called with the page queue lock held (e.g. from
+ * the pageout daemon) and vm_map_pageable might call
+ * vm_fault_unwire which would try to lock the page queues
+ * again. For debugging we hack and drop the lock.
+ */
+ int hadit = !simple_lock_try(&vm_page_queue_lock);
+ simple_unlock(&vm_page_queue_lock);
+#endif