Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-02-01 Thread Byungchul Park
On Sat, Jan 30, 2016 at 10:27:43AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > + > > + /* > > +* If this function is called from printk(), then we should > > +* not call printk() more. Or it will cause an infinite > > +* recursive cycle! > > This should be somethin

Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-31 Thread Byungchul Park
On Mon, Feb 01, 2016 at 11:31:12AM +0900, Sergey Senozhatsky wrote: > On (01/29/16 21:43), Byungchul Park wrote: > [..] > > +extern int is_console_lock(raw_spinlock_t *lock); > > + > > static void __spin_lock_debug(raw_spinlock_t *lock) > > { > > u64 i; > > @@ -113,11 +115,19 @@ static void _

Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-31 Thread Sergey Senozhatsky
On (01/29/16 21:43), Byungchul Park wrote: [..] > +extern int is_console_lock(raw_spinlock_t *lock); > + > static void __spin_lock_debug(raw_spinlock_t *lock) > { > u64 i; > @@ -113,11 +115,19 @@ static void __spin_lock_debug(raw_spinlock_t *lock) > return; >

Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-31 Thread Sergey Senozhatsky
On (02/01/16 10:45), Byungchul Park wrote: > But avoiding an unnecessary recursive cycle is better than panic(). What I > handled > in this patch is the warning case which causes unnecessary lockup and don't > need to > happen. Hello, correct, that was one of the reasons why I proposed to retur

Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-31 Thread Byungchul Park
On Sun, Jan 31, 2016 at 09:40:08PM +0900, Sergey Senozhatsky wrote: > On (01/29/16 21:54), Byungchul Park wrote: > > Hello, Andrew > > > > Please take this v5 patch instead of v2 patch, which you took. Or give your > > opinion. > > > > > It causes an infinite recursive cycle when using CONFIG_DEB

Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-31 Thread Sergey Senozhatsky
On (01/29/16 21:54), Byungchul Park wrote: > Hello, Andrew > > Please take this v5 patch instead of v2 patch, which you took. Or give your > opinion. > > > It causes an infinite recursive cycle when using CONFIG_DEBUG_SPINLOCK, > > in the spin_dump(). Backtrace prints printk() -> console_trylock(

Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-30 Thread Ingo Molnar
* Byungchul Park wrote: > + > + /* > + * If this function is called from printk(), then we should > + * not call printk() more. Or it will cause an infinite > + * recursive cycle! This should be something like: > + * If this function is called from within printk() then

Re: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-29 Thread Byungchul Park
an actual deadlock. > > thanks, > byungchul > > -8<- > >From eed077240e0b0d9f14d91037ef1915feab85aa4d Mon Sep 17 00:00:00 2001 > From: Byungchul Park > Date: Fri, 29 Jan 2016 21:23:24 +0900 > Subject: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycl

[PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug code

2016-01-29 Thread Byungchul Park
ycle", since it is not an actual deadlock. thanks, byungchul -8<- >From eed077240e0b0d9f14d91037ef1915feab85aa4d Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Fri, 29 Jan 2016 21:23:24 +0900 Subject: [PATCH v5] lib/spinlock_debug.c: prevent a recursive cycle in the debug c