Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-09 Thread Byungchul Park
On Thu, Mar 10, 2016 at 09:38:34AM +0900, Byungchul Park wrote: > On Wed, Mar 09, 2016 at 03:07:01PM +0900, Byungchul Park wrote: > > On Wed, Mar 09, 2016 at 11:00:37AM +0900, Byungchul Park wrote: > > > On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > > > > > > > * Byungchul Park

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-09 Thread Byungchul Park
On Thu, Mar 10, 2016 at 09:38:34AM +0900, Byungchul Park wrote: > On Wed, Mar 09, 2016 at 03:07:01PM +0900, Byungchul Park wrote: > > On Wed, Mar 09, 2016 at 11:00:37AM +0900, Byungchul Park wrote: > > > On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > > > > > > > * Byungchul Park

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-09 Thread Byungchul Park
On Wed, Mar 09, 2016 at 03:07:01PM +0900, Byungchul Park wrote: > On Wed, Mar 09, 2016 at 11:00:37AM +0900, Byungchul Park wrote: > > On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > > > > > * Byungchul Park wrote: > > > > > > > diff --git

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-09 Thread Byungchul Park
On Wed, Mar 09, 2016 at 03:07:01PM +0900, Byungchul Park wrote: > On Wed, Mar 09, 2016 at 11:00:37AM +0900, Byungchul Park wrote: > > On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > > > > > * Byungchul Park wrote: > > > > > > > diff --git a/kernel/locking/semaphore.c

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-08 Thread Byungchul Park
On Wed, Mar 09, 2016 at 11:00:37AM +0900, Byungchul Park wrote: > On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > > > * Byungchul Park wrote: > > > > > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > > > index b8120ab..6634b68

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-08 Thread Byungchul Park
On Wed, Mar 09, 2016 at 11:00:37AM +0900, Byungchul Park wrote: > On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > > > * Byungchul Park wrote: > > > > > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > > > index b8120ab..6634b68 100644 > > > ---

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-08 Thread Byungchul Park
On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > > index b8120ab..6634b68 100644 > > --- a/kernel/locking/semaphore.c > > +++ b/kernel/locking/semaphore.c

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-03-08 Thread Byungchul Park
On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > > index b8120ab..6634b68 100644 > > --- a/kernel/locking/semaphore.c > > +++ b/kernel/locking/semaphore.c > > @@ -130,13 +130,14

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-18 Thread Byungchul Park
On Wed, Feb 17, 2016 at 11:40:49AM +0100, Peter Zijlstra wrote: > Mucking with the semaphore implementation just because printk() is > terminally broken shite really doesn't fly. Jan is currently working on the terminally broken shite, and I expect it makes printk() robuster. I just tried this

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-18 Thread Byungchul Park
On Wed, Feb 17, 2016 at 11:40:49AM +0100, Peter Zijlstra wrote: > Mucking with the semaphore implementation just because printk() is > terminally broken shite really doesn't fly. Jan is currently working on the terminally broken shite, and I expect it makes printk() robuster. I just tried this

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-18 Thread Byungchul Park
On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > > index b8120ab..6634b68 100644 > > --- a/kernel/locking/semaphore.c > > +++ b/kernel/locking/semaphore.c

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-18 Thread Byungchul Park
On Wed, Feb 17, 2016 at 10:28:29AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > > index b8120ab..6634b68 100644 > > --- a/kernel/locking/semaphore.c > > +++ b/kernel/locking/semaphore.c > > @@ -130,13 +130,14

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-17 Thread Peter Zijlstra
some discussion thanks to Sergey and Peter. So I focused > on preventing the deadlock. > > -8<- > From 43e029ca920890ac644e30d873be69cf5d01efdb Mon Sep 17 00:00:00 2001 > From: Byungchul Park <byungchul.p...@lge.com> > Date: Wed, 17 Feb 2016 17:22:18 +0900 > Su

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-17 Thread Peter Zijlstra
some discussion thanks to Sergey and Peter. So I focused > on preventing the deadlock. > > -8<- > From 43e029ca920890ac644e30d873be69cf5d01efdb Mon Sep 17 00:00:00 2001 > From: Byungchul Park > Date: Wed, 17 Feb 2016 17:22:18 +0900 > Subject: [PATCH v3] lock/semapho

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-17 Thread Ingo Molnar
* Byungchul Park wrote: > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > index b8120ab..6634b68 100644 > --- a/kernel/locking/semaphore.c > +++ b/kernel/locking/semaphore.c > @@ -130,13 +130,14 @@ EXPORT_SYMBOL(down_killable); > int

Re: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-17 Thread Ingo Molnar
* Byungchul Park wrote: > diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c > index b8120ab..6634b68 100644 > --- a/kernel/locking/semaphore.c > +++ b/kernel/locking/semaphore.c > @@ -130,13 +130,14 @@ EXPORT_SYMBOL(down_killable); > int down_trylock(struct semaphore *sem) >

[PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-17 Thread Byungchul Park
t;- >From 43e029ca920890ac644e30d873be69cf5d01efdb Mon Sep 17 00:00:00 2001 From: Byungchul Park <byungchul.p...@lge.com> Date: Wed, 17 Feb 2016 17:22:18 +0900 Subject: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up() One of semaphore acquisition functions, down_trylock(

[PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up()

2016-02-17 Thread Byungchul Park
t;- >From 43e029ca920890ac644e30d873be69cf5d01efdb Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Wed, 17 Feb 2016 17:22:18 +0900 Subject: [PATCH v3] lock/semaphore: Avoid an unnecessary deadlock within up() One of semaphore acquisition functions, down_trylock() is implemented using raw_spin_lock_irqsave(&g