Re: [PATCH 15/19] x86/dumpstack: convert show_trace_log_lvl() to the new unwinder

2016-07-21 Thread Byungchul Park
On Thu, Jul 21, 2016 at 04:21:52PM -0500, Josh Poimboeuf wrote: > Convert show_trace_log_lvl() to the new unwinder. dump_trace() has been > deprecated. > > show_trace_log_lvl() is special compared to other users of the unwinder. > It's the only place where both reliable *and* unreliable addresses

Re: [PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

2016-09-19 Thread Byungchul Park
On Mon, Sep 19, 2016 at 11:36:25AM -0500, Nilay Vaish wrote: > On 18 September 2016 at 22:05, Byungchul Park wrote: > > On Thu, Sep 15, 2016 at 10:33:46AM -0500, Nilay Vaish wrote: > >> On 13 September 2016 at 04:45, Byungchul Park > >> wrote: > >>

Re: [PATCH v3 15/15] lockdep: Crossrelease feature documentation

2016-09-19 Thread Byungchul Park
On Fri, Sep 16, 2016 at 10:47:06AM -0500, Nilay Vaish wrote: > > +== > > +Background > > +== > > + > > +What causes deadlock > > + > > + > > +A deadlock occurs when a context is waiting for an event to be issued > > +which cannot be issued because the context or

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-19 Thread Byungchul Park
On Mon, Sep 19, 2016 at 10:50:09AM +0200, Peter Zijlstra wrote: > On Mon, Sep 19, 2016 at 11:41:02AM +0900, Byungchul Park wrote: > > > > But since these threads are independently scheduled there is no point in > > > transferring the point in time thread A does W

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-19 Thread Byungchul Park
On Tue, Sep 20, 2016 at 02:50:38PM +0900, Byungchul Park wrote: > On Mon, Sep 19, 2016 at 10:50:09AM +0200, Peter Zijlstra wrote: > > On Mon, Sep 19, 2016 at 11:41:02AM +0900, Byungchul Park wrote: > > > > > > But since these threads are independently sch

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-20 Thread Byungchul Park
On Tue, Sep 20, 2016 at 02:50:38PM +0900, Byungchul Park wrote: > On Mon, Sep 19, 2016 at 10:50:09AM +0200, Peter Zijlstra wrote: > > On Mon, Sep 19, 2016 at 11:41:02AM +0900, Byungchul Park wrote: > > > > > > But since these threads are independently sch

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-21 Thread Byungchul Park
On Mon, Sep 19, 2016 at 10:50:09AM +0200, Peter Zijlstra wrote: > Clearly I'm still missing stuff... By the way.. do I have to explain more? Lack of explanation? It would be the best to consider 'all valid acquires', which can occur deadlock, but it looks impossible without parsing all code in he

[PATCH 2/5] lockdep: Apply bitlock to bit_spin_lock

2016-06-19 Thread Byungchul Park
Currently, bit_spin_lock does not use lockdep_map at all. Of course, the lock correctness validator is not supported for bit_spin_lock. This patch makes bit_spin_lock possible to use the validator using CONFIG_BITLOCK_ALLOC. Signed-off-by: Byungchul Park --- include/linux/bit_spinlock.h | 57

[PATCH 0/5] Implement bitlock map allocator

2016-06-19 Thread Byungchul Park
and buffer head. And applied it and included it in this patch set. Byungchul Park (5): lockdep: Implement bitlock map allocator lockdep: Apply bitlock to bit_spin_lock lockdep: Apply bit_spin_lock lockdep to zram fs/buffer.c: Remove trailing white space lockdep: Apply bit_spin_lock

[PATCH 1/5] lockdep: Implement bitlock map allocator

2016-06-19 Thread Byungchul Park
the bit-based lock can also use the lock correctness validator with the lockdep_map, allocated for each bit address. Signed-off-by: Byungchul Park --- include/linux/bitlock.h | 20 ++ kernel/locking/Makefile | 1 + kernel/locking/bitlock_map.c | 147

[RFC 12/12] x86/dumpstack: Optimize save_stack_trace

2016-06-19 Thread Byungchul Park
ck_trace() takes 20266 ns [2.796484] save_stack_trace() takes 20902 ns [2.797000] save_stack_trace() takes 38110 ns [2.797510] save_stack_trace() takes 20224 ns [2.798181] save_stack_trace() takes 20172 ns [2.798837] save_stack_trace() takes 20824 ns Signed-off-by: Byungchul Park

[RFC 02/12] lockdep: Add a function building a chain between two hlocks

2016-06-19 Thread Byungchul Park
lease feature wants to do this. Crossrelease feature introduces a additional dependency chain consisting of 2 lock classes using 2 hlock instances, to connect dependency between different contexts. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c

[RFC 09/12] cifs/file.c: Remove trailing white space

2016-06-19 Thread Byungchul Park
Trailing white space is not accepted in kernel coding style. Remove them. Signed-off-by: Byungchul Park --- fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ff882ae..bcf9ead 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c

[PATCH 5/5] lockdep: Apply bit_spin_lock lockdep to BH_Uptodate_Lock

2016-06-19 Thread Byungchul Park
adds bit_spin_init() and bit_spin_free() properly to apply the lock correctness validator. Signed-off-by: Byungchul Park --- fs/buffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/buffer.c b/fs/buffer.c index a75ca74..65c0b8a 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3317,6 +3

[RFC 07/12] pagemap.h: Remove trailing white space

2016-06-19 Thread Byungchul Park
Trailing white space is not accepted in kernel coding style. Remove them. Signed-off-by: Byungchul Park --- include/linux/pagemap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 92395a0..c0049d9 100644 --- a

[RFC 00/12] lockdep: Implement crossrelease feature

2016-06-19 Thread Byungchul Park
ation should be used with commit operation together for crosslock, in order to build a dependency chain properly. Byungchul Park (12): lockdep: Refactor lookup_chain_cache() lockdep: Add a function building a chain between two hlocks lockdep: Make check_pre

[RFC 08/12] lockdep: Apply crossrelease to PG_locked lock

2016-06-19 Thread Byungchul Park
E, we can apply the lockdep detector to lock_page() using PG_locked. Applied it. Signed-off-by: Byungchul Park --- include/linux/mm_types.h | 9 + include/linux/pagemap.h | 95 +--- lib/Kconfig.debug| 9 + mm/filemap.c

[RFC 03/12] lockdep: Make check_prev_add can use a stack_trace of other context

2016-06-19 Thread Byungchul Park
Currently, check_prev_add() can only save its current context's stack trace. But it would be useful if a seperated stack_trace can be taken and used in check_prev_add(). Crossrelease feature can use check_prev_add() with another context's stack_trace. Signed-off-by: Byungchul Park -

[RFC 11/12] lockdep: Call lock_acquire(release) when accessing PG_locked manually

2016-06-19 Thread Byungchul Park
The PG_locked bit can be updated through SetPageLocked() or ClearPageLocked(), not by lock_page() and unlock_page(). SetPageLockded() and ClearPageLocked() also have to be considered to get balanced between acquring and releasing the PG_locked lock. Signed-off-by: Byungchul Park --- fs/cifs

[RFC 05/12] lockdep: Implement crossrelease feature

2016-06-19 Thread Byungchul Park
ation should be used with commit operation together for crosslock, in order to build a dependency chain properly. Signed-off-by: Byungchul Park --- include/linux/irqflags.h | 16 +- include/linux/lockdep.h | 139 +++ include/linux/sched.h| 5 +

[RFC 04/12] lockdep: Make save_trace can copy from other stack_trace

2016-06-19 Thread Byungchul Park
Currently, save_trace() can only save current context's stack trace. However, it would be useful if it can save(copy from) another context's stack trace. Especially, it can be used by crossrelease feature. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 22 ++-

[RFC 10/12] mm/swap_state.c: Remove trailing white space

2016-06-19 Thread Byungchul Park
Trailing white space is not accepted in kernel coding style. Remove them. Signed-off-by: Byungchul Park --- mm/swap_state.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/swap_state.c b/mm/swap_state.c index 69cb246..3fb7013 100644 --- a/mm/swap_state.c +++ b

[RFC 01/12] lockdep: Refactor lookup_chain_cache()

2016-06-19 Thread Byungchul Park
Currently, lookup_chain_cache() provides both "lookup" and "add" functionalities in a function. However each one is useful indivisually. Some features, e.g. crossrelease, can use each one indivisually. Thus, splited these functionalities into 2 functions. Signed-of

[RFC 06/12] lockdep: Apply crossrelease to completion

2016-06-19 Thread Byungchul Park
ks to CONFIG_LOCKDEP_CROSSRELEASE, we can apply the lockdep detector to wait_for_complete() and complete(). Applied it. Signed-off-by: Byungchul Park --- include/linux/completion.h | 121 + kernel/locking/lockdep.c | 18 +++ kernel/sched/completion.c

[PATCH 3/5] lockdep: Apply bit_spin_lock lockdep to zram

2016-06-19 Thread Byungchul Park
() properly to apply the lock correctness validator to bit_spin_lock the rzam is using. Signed-off-by: Byungchul Park --- drivers/block/zram/zram_drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 370c2f7..2bc3bde

[PATCH 4/5] fs/buffer.c: Remove trailing white space

2016-06-19 Thread Byungchul Park
Trailing white space is not accepted in kernel coding style. Remove them. Signed-off-by: Byungchul Park --- fs/buffer.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index e1632ab..a75ca74 100644 --- a/fs/buffer.c +++ b/fs

Re: [PATCH 3/5] lockdep: Apply bit_spin_lock lockdep to zram

2016-06-20 Thread Byungchul Park
On Tue, Jun 21, 2016 at 12:36:19AM +0900, Sergey Senozhatsky wrote: > > Hello, > > just for information Thank you for informing it. > > there was a proposal from -rt people to use normal spinlocks > for table's entries, rather that bitspinlock. I had a patch > some time ago, will obtain some p

Re: [PATCH] sched/fair: Fix update_min_vruntime() to get proper min_vruntime

2016-09-08 Thread Byungchul Park
On Tue, Sep 06, 2016 at 10:48:39AM +0200, Peter Zijlstra wrote: > On Tue, Sep 06, 2016 at 02:05:17PM +0900, Byungchul Park wrote: > > From 295895be8befbab040d6054bb8186c03daabcedd Mon Sep 17 00:00:00 2001 > > From: Byungchul Park > > Date: Tue, 6 Sep 2016 12:22:26 +0900 >

[PATCH v3 05/15] lockdep: Make check_prev_add can use a separate stack_trace

2016-09-13 Thread Byungchul Park
check_prev_add() saves a stack trace of the current. But crossrelease feature needs to use a separate stack trace of another context in check_prev_add(). So make it use a separate stack trace instead of one of the current. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 16

[PATCH v3 13/15] lockdep: Apply lock_acquire(release) on __Set(__Clear)PageLocked

2016-09-13 Thread Byungchul Park
frequently. We might miss many chances to check deadlock if we ignore it. Consider __Set(__Clear)PageLockded as well. Signed-off-by: Byungchul Park --- include/linux/page-flags.h | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/include/linux/page

[PATCH v3 06/15] lockdep: Make save_trace can skip stack tracing of the current

2016-09-13 Thread Byungchul Park
framework. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 3eaa11c..11580ec 100644 --- a/kernel/locking/lockdep.c +++ b

[PATCH v3 02/15] x86/dumpstack: Add save_stack_trace()_fast()

2016-09-13 Thread Byungchul Park
4757 ns [3.135865] save_stack_trace() takes 3420 ns [3.136000] save_stack_trace() takes 3329 ns [3.137000] save_stack_trace() takes 4058 ns [3.137000] save_stack_trace() takes 3499 ns Signed-off-by: Byungchul Park --- arch/x86/kernel/stacktrace.c | 25 + inclu

[PATCH v3 12/15] lockdep: Apply crossrelease to PG_locked lock

2016-09-13 Thread Byungchul Park
ks to CONFIG_LOCKDEP_CROSSRELEASE, we can apply the lockdep detector to lock_page(). Applied it. Signed-off-by: Byungchul Park --- include/linux/mm_types.h | 9 + include/linux/pagemap.h | 100 --- lib/Kconfig.debug| 8 mm/file

[PATCH v3 10/15] lockdep: Apply crossrelease to completion operation

2016-09-13 Thread Byungchul Park
wever, thanks to CONFIG_LOCKDEP_CROSSRELEASE, we can apply the lockdep detector to wait_for_completion() and complete(). Applied it. Signed-off-by: Byungchul Park --- include/linux/completion.h | 121 + kernel/locking/lockdep.c | 17 +++ kernel/

[PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-13 Thread Byungchul Park
can detect deadlock possibility even for lock_page(), wait_for_complete() and so on. Signed-off-by: Byungchul Park --- include/linux/irqflags.h | 12 +- include/linux/lockdep.h | 122 +++ include/linux/sched.h| 5 + kernel/exit.c| 9 + kernel/fork.c| 20

[PATCH v3 08/15] lockdep: Make crossrelease use save_stack_trace_fast()

2016-09-13 Thread Byungchul Park
Currently crossrelease feature uses save_stack_trace() to save backtrace. However, it has much overhead. So this patch makes it use save_stack_trace_norm() instead, which has smaller overhead. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 11/15] pagemap.h: Remove trailing white space

2016-09-13 Thread Byungchul Park
Trailing white space is not accepted in kernel coding style. Remove them. Signed-off-by: Byungchul Park --- include/linux/pagemap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 9735410..0cf6980 100644 --- a

[PATCH v3 15/15] lockdep: Crossrelease feature documentation

2016-09-13 Thread Byungchul Park
This document describes the concept of crossrelease feature, which generalizes what causes a deadlock and how can detect a deadlock. Signed-off-by: Byungchul Park --- Documentation/locking/crossrelease.txt | 785 + 1 file changed, 785 insertions(+) create mode

[PATCH v3 14/15] lockdep: Move data used in CONFIG_LOCKDEP_PAGELOCK from page to page_ext

2016-09-13 Thread Byungchul Park
CONFIG_LOCKDEP_PAGELOCK is keeping data, with which lockdep can check and detect deadlock by page lock, e.g. lockdep_map and cross_lock in struct page. But move it to page_ext since it's a debug feature so it's preferred to keep it in struct page_ext than struct page. Signed-off-by:

[PATCH v3 01/15] x86/dumpstack: Optimize save_stack_trace

2016-09-13 Thread Byungchul Park
.796484] save_stack_trace() takes 20266 ns [2.796484] save_stack_trace() takes 20902 ns [2.797000] save_stack_trace() takes 38110 ns [2.797510] save_stack_trace() takes 20224 ns [2.798181] save_stack_trace() takes 20172 ns [2.798837] save_stack_trace() takes 20824 ns Signed-off-by:

[PATCH v3 00/15] lockdep: Implement crossrelease feature

2016-09-13 Thread Byungchul Park
pinning must be *released* by someone. Using crossrelease feature, we can check dependency and detect deadlock possibility not only for typical lock, but also for lock_page(), wait_for_xxx() and so on, which might be released in any context. See the last patch including the document for more in

[PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

2016-09-13 Thread Byungchul Park
more readable than these functionalities are mixed in a function. Crossrelease feature also needs to use each one separately. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 129 +-- 1 file changed, 81 insertions(+), 48 deletions(-) diff --git a/k

[PATCH v3 09/15] lockdep: Make print_circular_bug() crosslock-aware

2016-09-13 Thread Byungchul Park
be released. So the report format needs to be changed to be aware of this. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 56 +--- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking

[PATCH v3 04/15] lockdep: Add a function building a chain between two classes

2016-09-13 Thread Byungchul Park
add_chain_cache() should be used in the context where the hlock is owned since it might be racy in another context. However crossrelease feature needs to build a chain between two locks regardless of context. So introduce a new function making it possible. Signed-off-by: Byungchul Park

[FYI] Output of 'cat /proc/lockdep' after applying crossrelease

2016-09-13 Thread Byungchul Park
all lock classes: c1c8b858 FD: 38 BD:1 +.+...: cgroup_mutex -> [c1c8b7b0] cgroup_idr_lock -> [c1c934b8] pcpu_alloc_mutex -> [c25d2d9c] &(&idp->lock)->rlock -> [c1ccb5f0] simple_ida_lock -> [c1c9de78] kernfs_mutex -> [c1c8b770] cgroup_file_kn_lock -> [c1c8b7f0] css_set_lock -> [c1c8bbb

Re: [PATCH v3 01/15] x86/dumpstack: Optimize save_stack_trace

2016-09-13 Thread Byungchul Park
On Tue, Sep 13, 2016 at 10:18 PM, Josh Poimboeuf wrote: > On Tue, Sep 13, 2016 at 06:45:00PM +0900, Byungchul Park wrote: >> Currently, x86 implementation of save_stack_trace() is walking all stack >> region word by word regardless of what the trace->max_entries is. >> H

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-13 Thread Byungchul Park
On Tue, Sep 13, 2016 at 7:05 PM, Peter Zijlstra wrote: > On Tue, Sep 13, 2016 at 06:45:06PM +0900, Byungchul Park wrote: >> Crossrelease feature calls a lock 'crosslock' if it is releasable >> in any context. For crosslock, all locks having been held in the >> r

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-13 Thread Byungchul Park
On Wed, Sep 14, 2016 at 12:05 AM, Peter Zijlstra wrote: > > > So the idea is to add support for non-owner serialization primitives, > like completions/semaphores, and so far I've not looked at the code yet. > I did spend 2+ hours trying to decipher your documentation thing, but am > still confused

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-13 Thread Byungchul Park
On Wed, Sep 14, 2016 at 6:42 AM, Peter Zijlstra wrote: > On Tue, Sep 13, 2016 at 09:38:29PM +0200, Peter Zijlstra wrote: > >> > > I _think_ you propose to keep track of all prior held locks and then use >> > > the union of the held list on the block-chain with the prior held list >> > > from the c

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-13 Thread Byungchul Park
On Wed, Sep 14, 2016 at 4:38 AM, Peter Zijlstra wrote: > On Wed, Sep 14, 2016 at 02:12:51AM +0900, Byungchul Park wrote: >> On Wed, Sep 14, 2016 at 12:05 AM, Peter Zijlstra >> wrote: >> > >> > >> > So the idea is to add support for non-owner seria

Re: [PATCH v3 07/15] lockdep: Implement crossrelease feature

2016-09-13 Thread Byungchul Park
On Wed, Sep 14, 2016 at 11:27 AM, Byungchul Park wrote: > On Wed, Sep 14, 2016 at 4:38 AM, Peter Zijlstra wrote: >> On Wed, Sep 14, 2016 at 02:12:51AM +0900, Byungchul Park wrote: >>> On Wed, Sep 14, 2016 at 12:05 AM, Peter Zijlstra >>> wrote: >>> > &g

Re: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system

2016-08-25 Thread Byungchul Park
On Sun, Jul 05, 2015 at 06:43:31PM +0900, byungchul.p...@lge.com wrote: > From: Byungchul Park Hello, This patch was rejected and the next version having tried to apply what peterz recommanded, was almost ignored last year. But now, exactly same thing is already in the tree which was posted

Re: [PATCH 1/1] sched: apply ifdef CONFIG_SMP to meaningful code only on SMP system

2016-08-25 Thread Byungchul Park
On Thu, Aug 25, 2016 at 03:56:59PM +0900, Byungchul Park wrote: > On Sun, Jul 05, 2015 at 06:43:31PM +0900, byungchul.p...@lge.com wrote: > > From: Byungchul Park > > Hello, > > This patch was rejected and the next version having tried to apply what > peterz recommanded,

Re: [PATCH v6 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-15 Thread Byungchul Park
On Tue, Aug 15, 2017 at 09:42:01PM -0400, Steven Rostedt wrote: > > > > @@ -1385,6 +1407,17 @@ static int find_later_rq(struct task_struct > > > > *task) > > > > * already under consideration through > > > > later_mask. > > > > */ > > > >

Re: [PATCH v8 00/14] lockdep: Implement crossrelease feature

2017-08-15 Thread Byungchul Park
On Wed, Aug 16, 2017 at 12:05:31PM +0800, Boqun Feng wrote: > On Wed, Aug 16, 2017 at 09:16:37AM +0900, Byungchul Park wrote: > > On Tue, Aug 15, 2017 at 10:20:20AM +0200, Ingo Molnar wrote: > > > > > > So with the latest fixes there's a new lockdep warni

Re: [PATCH v8 00/14] lockdep: Implement crossrelease feature

2017-08-15 Thread Byungchul Park
On Wed, Aug 16, 2017 at 12:05:31PM +0800, Boqun Feng wrote: > > I see... > > > > Worker A : acquired of wfc.work -> wait for cpu_hotplug_lock to be released > > Task B : acquired of cpu_hotplug_lock -> wait for lock#3 to be released > > Task C : acquired of lock#3 -> wait for completion of bar

Re: [PATCH v8 00/14] lockdep: Implement crossrelease feature

2017-08-15 Thread Byungchul Park
On Wed, Aug 16, 2017 at 01:40:51PM +0800, Boqun Feng wrote: > > > > Worker A : acquired of wfc.work -> wait for cpu_hotplug_lock to be > > > > released > > > > Task B : acquired of cpu_hotplug_lock -> wait for lock#3 to be > > > > released > > > > Task C : acquired of lock#3 -> wait for compl

Re: [PATCH v8 00/14] lockdep: Implement crossrelease feature

2017-08-16 Thread Byungchul Park
On Wed, Aug 16, 2017 at 01:58:08PM +0800, Boqun Feng wrote: > > I'm not sure this caused the lockdep warning but, if they belongs to the > > same class even though they couldn't be the same instance as you said, I > > also think that is another problem and should be fixed. > > > > My point was mo

Re: [PATCH v8 00/14] lockdep: Implement crossrelease feature

2017-08-16 Thread Byungchul Park
On Wed, Aug 16, 2017 at 04:14:21PM +0900, Byungchul Park wrote: > On Wed, Aug 16, 2017 at 01:58:08PM +0800, Boqun Feng wrote: > > > I'm not sure this caused the lockdep warning but, if they belongs to the > > > same class even though they couldn't be the same ins

Re: [PATCH v8 00/14] lockdep: Implement crossrelease feature

2017-08-16 Thread Byungchul Park
On Wed, Aug 16, 2017 at 05:06:23PM +0900, Byungchul Park wrote: > On Wed, Aug 16, 2017 at 04:14:21PM +0900, Byungchul Park wrote: > > On Wed, Aug 16, 2017 at 01:58:08PM +0800, Boqun Feng wrote: > > > > I'm not sure this caused the lockdep warning but, if they belongs to t

Re: [PATCH v6 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-16 Thread Byungchul Park
On Wed, Aug 16, 2017 at 09:32:44AM -0400, Steven Rostedt wrote: > On Wed, 16 Aug 2017 11:17:36 +0900 > Byungchul Park wrote: > > > > Yes, that's what I intended. IOW: > > > > If (we found a proper sd, not having SD_PREFER_SIBLING?) > > use the sd;

[PATCH] lockdep: Make LOCKDEP_CROSSRELEASE part of PROVE_LOCKING

2017-08-16 Thread Byungchul Park
I am not sure if I did as Ingo suggested. Is this what you intended? ->8- >From 64c705bfedf45b2c56a0d2f4c65a998a1b730310 Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Thu, 17 Aug 2017 09:12:18 +0900 Subject: [PATCH] lockdep: Make LOCKDEP_CROSSRELEASE part of PROVE_L

[PATCH v2] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING

2017-08-17 Thread Byungchul Park
Crossrelease added LOCKDEP_CROSSRELEASE and LOCKDEP_COMPLETE configs. It makes little sense to enable them when PROVE_LOCKING is disabled. Make them non-interative option and all part of PROVE_LOCKING. Signed-off-by: Byungchul Park --- lib/Kconfig.debug | 7 ++- 1 file changed, 2

[PATCH v3 3/3] lockdep: Rename LOCKDEP_COMPLETE config

2017-08-17 Thread Byungchul Park
'complete' is an adjective and sounds like 'lockdep is complete'. Anyway, it was not named properly. LOCKDEP_COMPLETIONS would be better to explain what it represents. Signed-off-by: Byungchul Park --- include/linux/completion.h | 8 lib/Kconfig.debug | 4 +

[PATCH v3 2/3] lockdep: Reword title of LOCKDEP_CROSSRELEASE config

2017-08-17 Thread Byungchul Park
Lockdep doesn't have to be made to work with crossrelease and just works with them. Reword the title so that what the option does is clear. Signed-off-by: Byungchul Park --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug

[PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING

2017-08-17 Thread Byungchul Park
Crossrelease added LOCKDEP_CROSSRELEASE and LOCKDEP_COMPLETE configs. It makes little sense to enable them when PROVE_LOCKING is disabled. Make them non-interative option and all part of PROVE_LOCKING. Signed-off-by: Byungchul Park --- lib/Kconfig.debug | 7 ++- 1 file changed, 2

Re: [PATCH v4] bcache: Don't reinvent the wheel but use existing llist API

2017-08-17 Thread Byungchul Park
On Fri, Aug 11, 2017 at 01:42:23PM +0900, Byungchul Park wrote: > Although llist provides proper APIs, they are not used. Make them used. Any opinions about this? > > Signed-off-by: Byungchul Park > Acked-by: Coly Li > --- > drivers/md/bcache/closure.c | 15 ++-

Re: [PATCH v6 0/2] Make find_later_rq() choose a closer cpu in topology

2017-08-17 Thread Byungchul Park
On Mon, Aug 07, 2017 at 12:50:32PM +0900, Byungchul Park wrote: > When cpudl_find() returns any among free_cpus, the cpu might not be > closer than others, considering sched domain. For example: > >this_cpu: 15 >free_cpus: 0, 1,..., 14 (== later_mask) >best_cpu:

Re: [tip:locking/core] locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING

2017-08-17 Thread Byungchul Park
On Thu, Aug 17, 2017 at 12:45:44PM +0200, Ingo Molnar wrote: > > @@ -1164,9 +1164,6 @@ config LOCKDEP_CROSSRELEASE > > > > config LOCKDEP_COMPLETE > > bool "Lock debugging: allow completions to use deadlock detector" > > - depends on PROVE_LOCKING > > - select LOCKDEP_CROSSRELEASE > > -

Re: [PATCH v6 0/2] Make find_later_rq() choose a closer cpu in topology

2017-08-17 Thread Byungchul Park
On Thu, Aug 17, 2017 at 09:51:34PM -0700, Joel Fernandes (Google) wrote: > On Thu, Aug 17, 2017 at 6:25 PM, Byungchul Park > wrote: > > On Mon, Aug 07, 2017 at 12:50:32PM +0900, Byungchul Park wrote: > >> When cpudl_find() returns any among free_cpus, the cpu might not be &g

[PATCH v7 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq()

2017-08-17 Thread Byungchul Park
It would be better to avoid pushing tasks to other cpu within a SD_PREFER_SIBLING domain, instead, get more chances to check other siblings. Signed-off-by: Byungchul Park --- kernel/sched/rt.c | 56 --- 1 file changed, 53 insertions(+), 3

[PATCH v7 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-17 Thread Byungchul Park
It would be better to avoid pushing tasks to other cpu within a SD_PREFER_SIBLING domain, instead, get more chances to check other siblings. Signed-off-by: Byungchul Park --- kernel/sched/deadline.c | 55 ++--- 1 file changed, 52 insertions(+), 3

[PATCH v7 0/2] Make find_later_rq() choose a closer cpu in topology

2017-08-17 Thread Byungchul Park
rt for SD_PREFER_SIBLING Change from v1 -. clean up the patch Byungchul Park (2): sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq() sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq() kernel/sched/deadline.c | 55 +++

Re: [PATCH v4] bcache: Don't reinvent the wheel but use existing llist API

2017-08-17 Thread Byungchul Park
On Fri, Aug 18, 2017 at 02:04:20PM +0800, Coly Li wrote: > On 2017/8/18 上午9:24, Byungchul Park wrote: > > On Fri, Aug 11, 2017 at 01:42:23PM +0900, Byungchul Park wrote: > >> Although llist provides proper APIs, they are not used. Make them used. > > > > Any opin

RE: [PATCH v7 0/2] Make find_later_rq() choose a closer cpu in topology

2017-08-17 Thread Byungchul Park
From: Byungchul Park [mailto:byungchul.p...@lge.com] > Change from v6 >-. add a comment about selection of fallback_cpu incase more than one > exist >-. modify a comment explaining what we do wrt PREFER_SIBLING I could add supplementary comments, thank to Steven and Joel. Th

Re: [PATCH v7 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-18 Thread Byungchul Park
On Fri, Aug 18, 2017 at 12:21:46AM -0700, Joel Fernandes (Google) wrote: > Hi Byungchul, > > On Thu, Aug 17, 2017 at 11:05 PM, Byungchul Park > wrote: > > It would be better to avoid pushing tasks to other cpu within > > a SD_PREFER_SIBLING domain, instead, get mor

[PATCH v8 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq()

2017-08-18 Thread Byungchul Park
It would be better to try to check other siblings first if SD_PREFER_SIBLING is flaged when pushing tasks - migration. Signed-off-by: Byungchul Park --- kernel/sched/rt.c | 56 --- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a

[PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-08-18 Thread Byungchul Park
It would be better to try to check other siblings first if SD_PREFER_SIBLING is flaged when pushing tasks - migration. Signed-off-by: Byungchul Park --- kernel/sched/deadline.c | 55 ++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a

[PATCH v8 0/2] Make find_later_rq() choose a closer cpu in topology

2017-08-18 Thread Byungchul Park
scheduler) Change from v3 -. rename closest_cpu to best_cpu so that it align with rt -. protect referring cpudl.elements with cpudl.lock -. change return value of cpudl_find() to bool Change from v2 -. add support for SD_PREFER_SIBLING Change from v1 -. clean up the patch

Re: [tip:locking/urgent] locking/lockdep: Disable cross-release features for now

2017-10-15 Thread Byungchul Park
the final v4.14 release is close, disable the cross-release lockdep > features for now. > > Bisected-by: Johan Hovold > Debugged-by: Johan Hovold > Reported-by: Johan Hovold > Cc: Arnd Bergmann > Cc: Byungchul Park > Cc: Linus Torvalds > Cc: Peter Zijlstra > Cc:

Re: [RESEND PATCH v2 2/2] lockdep: Remove unnecessary acquisitions wrt workqueue flush

2017-10-16 Thread Byungchul Park
On Fri, Oct 13, 2017 at 10:27:50AM +0200, Peter Zijlstra wrote: > On Fri, Oct 13, 2017 at 04:56:33PM +0900, Byungchul Park wrote: > > On Thu, Oct 12, 2017 at 05:56:35PM +0200, Peter Zijlstra wrote: > > > On Thu, Oct 12, 2017 at 08:38:17AM -0700, Tejun Heo wrote: > > > &g

Re: [RESEND PATCH v2 2/2] lockdep: Remove unnecessary acquisitions wrt workqueue flush

2017-10-16 Thread Byungchul Park
On Mon, Oct 16, 2017 at 07:58:57PM +0900, Byungchul Park wrote: > On Fri, Oct 13, 2017 at 10:27:50AM +0200, Peter Zijlstra wrote: > > On Fri, Oct 13, 2017 at 04:56:33PM +0900, Byungchul Park wrote: > > > On Thu, Oct 12, 2017 at 05:56:35PM +0200, Peter Zijlstra wrote: > >

[PATCH v4] sched/deadline: Change the time to replenish runtime for sleep tasks

2017-05-29 Thread Byungchul Park
as I initially thought, but I'm just curious about your opinions. Could you give me your opinions? It would be appriciated if you do. Thanks, Byungchul ->8- >From c94ba55ddd6e67fe3f6a0a34e79f884b91b747ab Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Tue, 30 May 2017 11:2

Re: [RESEND PATCH] irq_work: Don't reinvent the wheel but use existing llist API

2017-05-29 Thread Byungchul Park
On Fri, May 12, 2017 at 09:45:35AM +0900, Byungchul Park wrote: > Although llist provides proper APIs, they are not used. Make them used. +to pet...@infradead.org +to mi...@kernel.org +to rost...@goodmis.org I am not sure whom should I send this patch to.. Could you check this if you are ri

Re: possible deadlock in lru_add_drain_all

2017-11-01 Thread Byungchul Park
On Tue, Oct 31, 2017 at 04:25:32PM +0100, Peter Zijlstra wrote: > But this report only includes a single (cpu-up) part and therefore is Thanks for fixing me, Peter. I thought '#1 -> #2' and '#2 -> #3', where #2 is 'cpuhp_state', should have been built with two different classes of #2 as the latest

Re: possible deadlock in lru_add_drain_all

2017-11-01 Thread Byungchul Park
On Tue, Oct 31, 2017 at 04:10:24PM +0100, Peter Zijlstra wrote: > On Tue, Oct 31, 2017 at 03:58:04PM +0100, Michal Hocko wrote: > > On Tue 31-10-17 15:52:47, Peter Zijlstra wrote: > > [...] > > > If we want to save those stacks; we have to save a stacktrace on _every_ > > > lock acquire, simply bec

Re: possible deadlock in lru_add_drain_all

2017-11-01 Thread Byungchul Park
On Wed, Nov 01, 2017 at 01:01:01PM +0100, Peter Zijlstra wrote: > On Wed, Nov 01, 2017 at 05:59:27PM +0900, Byungchul Park wrote: > > On Tue, Oct 31, 2017 at 04:10:24PM +0100, Peter Zijlstra wrote: > > > On Tue, Oct 31, 2017 at 03:58:04PM +0100, Michal Hocko wrote: > > >

[RESEND PATCH v2 2/2] sched/deadline: Initialize cp->elements[].cpu to an invalid value

2017-11-01 Thread Byungchul Park
ase. Signed-off-by: Byungchul Park Acked-by: Steven Rostedt (VMware) --- kernel/sched/cpudeadline.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index 9f02035..bcf903f 100644 --- a/kernel/sched/cpudeadline.c ++

[RESEND PATCH v2 1/2] sched/deadline: Add cpudl_maximum_dl() for clean-up

2017-11-01 Thread Byungchul Park
Changes from v1 - Enhance commit msg - Prevent WARN in cpumask_test_cpu() in cpudl_find() when best_cpu == -1 -8<- >From 7735382d07ae6a61d740ae39ba2ecf169d43b8a2 Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Wed, 22 Mar 2017 14:25:56 +0900 Subject: [RESEND PATCH v2 1/2]

[RESEND PATCH v11 0/2] Make find_later_rq() choose a closer cpu in topology

2017-11-01 Thread Byungchul Park
G Change from v1 -. clean up the patch Byungchul Park (2): sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq() sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq() kernel/sched/deadline.c | 82 - kernel/sched/r

[RESEND PATCH v11 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()

2017-11-01 Thread Byungchul Park
It would be better to try to check other siblings first if SD_PREFER_SIBLING is flaged when pushing tasks - migration. Suggested-by: Peter Zijlstra Signed-off-by: Byungchul Park Acked-by: Juri Lelli --- kernel/sched/deadline.c | 82 - 1 file

[RESEND PATCH v11 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq()

2017-11-01 Thread Byungchul Park
It would be better to try to check other siblings first if SD_PREFER_SIBLING is flaged when pushing tasks - migration. Suggested-by: Peter Zijlstra Signed-off-by: Byungchul Park Reviewed-by: Steven Rostedt (VMware) --- kernel/sched/rt.c | 80

[PATCH v3 0/8] cross-release: enhence performance and fix false positives

2017-10-24 Thread Byungchul Park
s from v1 - Fix kconfig description as Ingo suggested - Fix commit message writing out CONFIG_ variable - Introduce a new kernel parameter, crossrelease_fullstack - Replace the number with the output of *perf* - Separate a patch removing white space Byungchul Park (7): lockdep: Introduce CROSSRELE

[PATCH v3 7/8] genhd.h: Remove trailing white space

2017-10-24 Thread Byungchul Park
Trailing white space is not accepted in kernel coding style. Remove them. Signed-off-by: Byungchul Park --- include/linux/genhd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ea652bf..6d85a75 100644 --- a/include

[PATCH v3 1/8] block: use DECLARE_COMPLETION_ONSTACK in submit_bio_wait

2017-10-24 Thread Byungchul Park
From: Christoph Hellwig Simplify the code by getting rid of the submit_bio_ret structure. Signed-off-by: Christoph Hellwig --- block/bio.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/block/bio.c b/block/bio.c index 101c2a9..5e901bf 100644 --- a/bloc

[PATCH v3 6/8] lockdep: Remove unnecessary acquisitions wrt workqueue flush

2017-10-24 Thread Byungchul Park
The workqueue added manual acquisitions to catch deadlock cases. Now crossrelease was introduced, some of those are redundant, since wait_for_completion() already includes the acquisition for itself. Removed it. Signed-off-by: Byungchul Park --- include/linux/workqueue.h | 4 ++-- kernel

[PATCH v3 8/8] block: Assign a lock_class per gendisk used for wait_for_completion()

2017-10-24 Thread Byungchul Park
ght happen while using loop devices, between bios of an upper device and a lower device(=loop device). The safest way to assign different lock classes to different devices is to do it for each gendisk. In other words, this patch assigns a lockdep_map per gendisk and uses it when ini

[PATCH v3 2/8] lockdep: Introduce CROSSRELEASE_STACK_TRACE and make it not unwind as default

2017-10-24 Thread Byungchul Park
abled + this patch applied Performance counter stats for 'qemu_booting_time.sh bzImage' (10 runs): 2.963669551 seconds time elapsed( +- 0.11% ) Signed-off-by: Byungchul Park --- include/linux/lockdep.h | 4 kernel/locking/lockdep.c | 5 + lib/Kconfig.

[PATCH v3 3/8] lockdep: Remove BROKEN flag of LOCKDEP_CROSSRELEASE

2017-10-24 Thread Byungchul Park
Now the performance regression was fixed, re-enable CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS. Signed-off-by: Byungchul Park --- lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 90ea784

[PATCH v3 4/8] lockdep: Add a kernel parameter, crossrelease_fullstack

2017-10-24 Thread Byungchul Park
the kernel. Change CONFIG_CROSSRELEASE_STACK_TRACE default from N to Y, and introduce the new kernel parameter. Signed-off-by: Byungchul Park --- Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/locking/lockdep.c| 18 -- lib/Kco

  1   2   3   4   5   6   7   8   9   10   >