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

Re: [Xen-devel] [PATCH for-4.10] common/spinlock: Improve the output from check_lock() if it trips



Hi Jan,

On 11/06/2017 11:09 AM, Jan Beulich wrote:
On 31.10.17 at 11:49, <andrew.cooper3@xxxxxxxxxx> wrote:
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -44,7 +44,13 @@ static void check_lock(struct lock_debug *debug)
      if ( unlikely(debug->irq_safe != irq_safe) )
      {
          int seen = cmpxchg(&debug->irq_safe, -1, irq_safe);
-        BUG_ON(seen == !irq_safe);
+
+        if ( seen == !irq_safe )
+        {
+            printk("CHECKLOCK FAILURE: prev irqsafe: %d, curr irqsafe %d\n",
+                   seen, irq_safe);
+            BUG();

This really should use XENLOG_ERR imo, so that the message won't
be lost if warnings are rate limited.

The patch was already merged. I guess a follow-up could be done for Xen 4.10.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.