All of lore.kernel.org
 help / color / mirror / Atom feed
* BUG: spinlock lockup
@ 2014-01-18  7:25 naveen yadav
  2014-01-20 10:20 ` Will Deacon
  0 siblings, 1 reply; 5+ messages in thread
From: naveen yadav @ 2014-01-18  7:25 UTC (permalink / raw)
  To: Russell King - ARM Linux, Catalin Marinas, linux-kernel, will.deacon

Dear All,

We are using 3.8.x  kernel on ARM, We are facing soft lockup issue.
Following are the logs.

BUG: spinlock lockup suspected on CPU#0, process1/525
lock: 0xd8ac9a64, .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1


1 . Looks like lock is available as owner is -1, why arch_spin_trylock
is getting failed ?

2. There is a patch : ARM: spinlock: retry trylock operation if strex
fails on free lock
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/240913
In this patch, A loop has been added around strexeq %2, %0, [%3]".
{Comment "retry the trylock operation if the lock appears
to be free but the strex reported failure"}

but arch_spin_trylock is called by __spin_lock_debug and its already
getting called in loops. So what purpose is resolves?

static void __spin_lock_debug(raw_spinlock_t *lock)
{
        u64 i;
        u64 loops = loops_per_jiffy * HZ;

        for (i = 0; i < loops; i++) {
                if (arch_spin_trylock(&lock->raw_lock))
                        return;
                __delay(1);
        }
        /* lockup suspected: */
        spin_dump(lock, "lockup suspected");
}

3. Is this patch useful to us, How can we reproduce this scenario ?
Scenario : Lock is available but arch_spin_trylock  is returning as failure

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-29 10:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-18  7:25 BUG: spinlock lockup naveen yadav
2014-01-20 10:20 ` Will Deacon
2014-01-21  6:37   ` naveen yadav
2014-01-21 10:14     ` Will Deacon
2014-01-29 10:47       ` naveen yadav

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.