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

2017-12-21 Thread Byungchul Park
On Tue, Dec 19, 2017 at 10:19:23AM +0900, Byungchul Park wrote: > Changes from v2 > - Run spellchecker over the text and fix typos > - Add acked-by Daniel > > Changes from v1 > - Enhance commit msg > - Prevent WARN in cpumask_test_cpu() in cpudl_find() when best_cpu == -1

Re: [PATCH] kthread: finer-grained lockdep/cross-release completion

2017-12-19 Thread Byungchul Park
On 12/19/2017 6:59 PM, Daniel Vetter wrote: On Mon, Dec 18, 2017 at 09:42:13AM -0800, Linus Torvalds wrote: On Sun, Dec 17, 2017 at 11:11 PM, Daniel Vetter wrote: This didn't seem to have made it into -rc4. Anything needed to get it going? Do you actually see the problem in -rc4? Because w

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

2017-12-18 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 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq()

2017-12-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. Suggested-by: Peter Zijlstra Signed-off-by: Byungchul Park Reviewed-by: Steven Rostedt (VMware) --- kernel/sched/rt.c | 80

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

2017-12-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. Suggested-by: Peter Zijlstra Signed-off-by: Byungchul Park Acked-by: Juri Lelli --- kernel/sched/deadline.c | 82 - 1 file

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

2017-12-18 Thread Byungchul Park
ase. Signed-off-by: Byungchul Park Acked-by: Steven Rostedt (VMware) Acked-by: Daniel Bristot de Oliveira --- 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 100

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

2017-12-18 Thread Byungchul Park
1 From: Byungchul Park Date: Wed, 22 Mar 2017 14:25:56 +0900 Subject: [RESEND PATCH v3 1/2] sched/deadline: Add cpudl_maximum_dl() for clean-up Current code uses cpudl_maximum() to get the root node's cpu, while it directly accesses the root node like 'cp->elements[0].dl' to get the roo

Re: [PATCH] locking/lockdep: Remove the cross-release locking checks

2017-12-15 Thread Byungchul Park
On Sat, Dec 16, 2017 at 6:15 AM, Theodore Ts'o wrote: > On Fri, Dec 15, 2017 at 05:39:25PM +0900, Byungchul Park wrote: >> >> All locks should belong to one class if each path of acquisition >> can be switchable each other within the class at any time. >> Ot

Re: [PATCH] locking/lockdep: Remove the cross-release locking checks

2017-12-15 Thread Byungchul Park
e.g. completion_init_nomap(). >From: Byungchul Park >Date: Fri, 8 Dec 2017 18:27:45 +0900 >Subject: Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray > >1) Firstly, it's hard to assign lock classes *properly*. By >default, it relies on the caller site of lockd

Re: [PATCH] locking/lockdep: Remove the cross-release locking checks

2017-12-14 Thread Byungchul Park
On Fri, Dec 15, 2017 at 3:24 PM, Theodore Ts'o wrote: > On Fri, Dec 15, 2017 at 01:05:43PM +0900, Byungchul Park wrote: >> For example, in the case of fs issues, for now we can >> invalidate wait_for_completion() in submit_bio_wait() > > And this will s

Re: [PATCH] locking/lockdep: Remove the cross-release locking checks

2017-12-14 Thread Byungchul Park
On Thu, Dec 14, 2017 at 2:01 PM, Byungchul Park wrote: > On Wed, Dec 13, 2017 at 7:46 PM, Ingo Molnar wrote: >> >> * Byungchul Park wrote: >> >>> Lockdep works, based on the following: >>> >>>(1) Classifying locks properly >>>(2

Re: About the try to remove cross-release feature entirely by Ingo

2017-12-14 Thread Byungchul Park
On Thu, Dec 14, 2017 at 8:18 PM, Peter Zijlstra wrote: > On Wed, Dec 13, 2017 at 10:07:11PM -0500, Theodore Ts'o wrote: >> interpreted this as the lockdep maintainers saying, "hey, not my >> fault, it's the subsystem maintainer's fault for not properly >> classifying the locks" --- and thus dumpin

Re: About the try to remove cross-release feature entirely by Ingo

2017-12-13 Thread Byungchul Park
On Thu, Dec 14, 2017 at 12:07 PM, Theodore Ts'o wrote: > On Wed, Dec 13, 2017 at 04:13:07PM +0900, Byungchul Park wrote: >> >> Therefore, I want to say the fundamental problem >> comes from classification, not cross-release >> specific. > > You kee

Re: [PATCH] locking/lockdep: Remove the cross-release locking checks

2017-12-13 Thread Byungchul Park
On Wed, Dec 13, 2017 at 7:46 PM, Ingo Molnar wrote: > > * Byungchul Park wrote: > >> Lockdep works, based on the following: >> >>(1) Classifying locks properly >>(2) Checking relationship between the classes >> >> If (1) is not good o

Re: About the try to remove cross-release feature entirely by Ingo

2017-12-12 Thread Byungchul Park
On Wed, Dec 13, 2017 at 3:24 PM, Byungchul Park wrote: > Lockdep works, based on the following: > >(1) Classifying locks properly >(2) Checking relationship between the classes > > If (1) is not good or (2) is not good, then we > might get false positives. > >

About the try to remove cross-release feature entirely by Ingo

2017-12-12 Thread Byungchul Park
Lockdep works, based on the following: (1) Classifying locks properly (2) Checking relationship between the classes If (1) is not good or (2) is not good, then we might get false positives. For (1), we don't have to classify locks 100% properly but need as enough as lockdep works. For (2)

Re: [PATCH] locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS optional

2017-12-11 Thread Byungchul Park
+cc da...@fromorbit.com +cc ty...@mit.edu +cc wi...@infradead.org +cc torva...@linux-foundation.org +cc amir7...@gmail.com On 12/12/2017 4:11 PM, Byungchul Park wrote: At the moment, it's rather premature to enable CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS by default, be

[PATCH] locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS optional

2017-12-11 Thread Byungchul Park
tter to be optional. Signed-off-by: Byungchul Park --- lib/Kconfig.debug | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 2689b7c..bc099f1 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1092,8 +1092,6 @@ config PRO

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-08 Thread Byungchul Park
On 12/8/2017 4:25 PM, Dave Chinner wrote: On Fri, Dec 08, 2017 at 01:45:52PM +0900, Byungchul Park wrote: On Fri, Dec 08, 2017 at 09:22:16AM +1100, Dave Chinner wrote: On Thu, Dec 07, 2017 at 11:06:34AM -0500, Theodore Ts'o wrote: On Wed, Dec 06, 2017 at 06:06:48AM -0800, Matthew Wilcox

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-07 Thread Byungchul Park
On Fri, Dec 08, 2017 at 09:22:16AM +1100, Dave Chinner wrote: > On Thu, Dec 07, 2017 at 11:06:34AM -0500, Theodore Ts'o wrote: > > On Wed, Dec 06, 2017 at 06:06:48AM -0800, Matthew Wilcox wrote: > > > > Unfortunately for you, I don't find arguments along the lines of > > > > "lockdep will save us"

Re: possible deadlock in generic_file_write_iter (2)

2017-12-07 Thread Byungchul Park
On 12/8/2017 2:07 AM, Dmitry Vyukov wrote: On Wed, Dec 6, 2017 at 6:05 AM, Byungchul Park wrote: On 12/4/2017 5:33 PM, Jan Kara wrote: Hello, adding Peter and Byungchul to CC since the lockdep report just looks strange and cross-release seems to be involved. Guys, how did #5 get into the

Re: possible deadlock in generic_file_write_iter (2)

2017-12-05 Thread Byungchul Park
On Tue, Dec 05, 2017 at 10:41:50AM +0100, Jan Kara wrote: > > Hello Byungchul, > > On Tue 05-12-17 13:58:09, Byungchul Park wrote: > > On 12/4/2017 5:33 PM, Jan Kara wrote: > > >adding Peter and Byungchul to CC since the lockdep report just looks > > >s

Re: possible deadlock in generic_file_write_iter (2)

2017-12-05 Thread Byungchul Park
On Tue, Dec 05, 2017 at 10:19:07AM +0100, Dmitry Vyukov wrote: > On Tue, Dec 5, 2017 at 5:58 AM, Byungchul Park wrote: > > On 12/4/2017 5:33 PM, Jan Kara wrote: > >> > >> Hello, > >> > >> adding Peter and Byungchul to CC since the lockdep report just

Re: [PATCH v2 0/4] lockdep/crossrelease: Apply crossrelease to page locks

2017-12-04 Thread Byungchul Park
On 12/5/2017 2:46 PM, Byungchul Park wrote: On 12/5/2017 2:30 PM, Matthew Wilcox wrote: On Mon, Dec 04, 2017 at 02:16:19PM +0900, Byungchul Park wrote: For now, wait_for_completion() / complete() works with lockdep, add lock_page() / unlock_page() and its family to lockdep support. Changes

Re: [PATCH v2 0/4] lockdep/crossrelease: Apply crossrelease to page locks

2017-12-04 Thread Byungchul Park
On 12/5/2017 2:30 PM, Matthew Wilcox wrote: On Mon, Dec 04, 2017 at 02:16:19PM +0900, Byungchul Park wrote: For now, wait_for_completion() / complete() works with lockdep, add lock_page() / unlock_page() and its family to lockdep support. Changes from v1 - Move lockdep_map_cross outside of

Re: possible deadlock in generic_file_write_iter (2)

2017-12-04 Thread Byungchul Park
On 12/4/2017 5:33 PM, Jan Kara wrote: Hello, adding Peter and Byungchul to CC since the lockdep report just looks strange and cross-release seems to be involved. Guys, how did #5 get into the lock chain and what does put_ucounts() have to do with sb_writers there? Thanks! Hello Jan, In order

[PATCH v2 1/4] lockdep: Apply crossrelease to PG_locked locks

2017-12-03 Thread Byungchul Park
page locks. Signed-off-by: Byungchul Park --- include/linux/mm_types.h | 8 include/linux/pagemap.h | 101 --- lib/Kconfig.debug| 7 mm/filemap.c | 4 +- mm/page_alloc.c | 3 ++ 5 files changed, 115 inser

[PATCH v2 4/4] lockdep: Add a boot parameter enabling to track page locks using lockdep and disable it by default

2017-12-03 Thread Byungchul Park
To track page locks using lockdep, we need a huge memory space for lockdep_map per page. So, it would be better to make it disabled by default and provide a boot parameter to turn it on. Do it. Suggested-by: Michal Hocko Signed-off-by: Byungchul Park --- Documentation/admin-guide/kernel

[PATCH v2 3/4] lockdep: Move data of CONFIG_LOCKDEP_PAGELOCK from page to page_ext

2017-12-03 Thread Byungchul Park
CONFIG_LOCKDEP_PAGELOCK needs to keep lockdep_map_cross per page. Since it's a debug feature, it's preferred to keep it in struct page_ext rather than struct page. Move it to struct page_ext. Signed-off-by: Byungchul Park --- include/linux/mm_types.h | 4 --- include/linux/page-fl

[PATCH v2 0/4] lockdep/crossrelease: Apply crossrelease to page locks

2017-12-03 Thread Byungchul Park
allowing the allocation for debugging Byungchul Park (4): lockdep: Apply crossrelease to PG_locked locks lockdep: Apply lock_acquire(release) on __Set(__Clear)PageLocked lockdep: Move data of CONFIG_LOCKDEP_PAGELOCK from page to page_ext lockdep: Add a boot parameter enabling to track page locks

[PATCH v2 2/4] lockdep: Apply lock_acquire(release) on __Set(__Clear)PageLocked

2017-12-03 Thread Byungchul Park
frequently. We might miss many chances to check deadlock if we ignore it. Make __Set(__Clear)PageLockded considered 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

Re: [PATCH] locking/Documentation: Revise Documentation/locking/crossrelease.txt

2017-12-03 Thread Byungchul Park
On Thu, Nov 16, 2017 at 08:22:37AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > On Sat, Nov 11, 2017 at 10:45:24PM +0900, Byungchul Park wrote: > > > This is the big one including all of version 3. > > > > > > You can take only thi

Re: [PATCH v4] printk: Add console owner and waiter logic to load balance console writes

2017-11-27 Thread Byungchul Park
On Fri, Nov 24, 2017 at 04:58:16PM +0100, Petr Mladek wrote: > @@ -1797,13 +1797,6 @@ asmlinkage int vprintk_emit(int facility, int level, > spin_release(&console_owner_dep_map, 1, > _THIS_IP_); > printk_safe_exit_irqrestore(flags); > >

Re: [PATCH v4] printk: Add console owner and waiter logic to load balance console writes

2017-11-27 Thread Byungchul Park
; > _THIS_IP_); > > > > I am not sure that this correctly imitates the real lock > > dependency. The trylock flag means that we are able to skip > > this section when the lock is taken elsewhere. But it is not > > the whole truth. In fact, we are blocked in this cod

Re: [PATCH v4] printk: Add console owner and waiter logic to load balance console writes

2017-11-27 Thread Byungchul Park
On Wed, Nov 08, 2017 at 10:27:23AM -0500, Steven Rostedt wrote: > --- linux-trace.git.orig/kernel/printk/printk.c > +++ linux-trace.git/kernel/printk/printk.c > @@ -86,8 +86,15 @@ EXPORT_SYMBOL_GPL(console_drivers); > static struct lockdep_map console_lock_dep_map = { > .name = "console_lock

Re: [PATCH 1/3] lockdep: Apply crossrelease to PG_locked locks

2017-11-23 Thread Byungchul Park
On Thu, Nov 16, 2017 at 02:07:46PM +0100, Michal Hocko wrote: > On Thu 16-11-17 21:48:05, Byungchul Park wrote: > > On 11/16/2017 9:02 PM, Michal Hocko wrote: > > > for each struct page. So you are doubling the size. Who is going to > > > enable this config option? You

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

2017-11-21 Thread Byungchul Park
On Tue, Nov 14, 2017 at 08:46:44AM +0900, Byungchul Park wrote: > Changes from v2 > - Run spellchecker over the text and fix typos > - Add acked-by Daniel > > Changes from v1 > - Enhance commit msg > - Prevent WARN in cpumask_test_cpu() in cpudl_find() when best_

Re: [PATCH] llist: Put parentheses around parameters of llist_for_each_entry_safe()

2017-11-16 Thread Byungchul Park
On Tue, Sep 26, 2017 at 03:54:51PM +0900, Byungchul Park wrote: > It would be somewhat safer to put parentheses around parameters of > a macro with parameters. Put it. Hello Ingo and Peter, Even though Huang said this change is unnecessary, I'm curious about what you think about th

Re: [PATCH 1/3] lockdep: Apply crossrelease to PG_locked locks

2017-11-16 Thread Byungchul Park
On 11/16/2017 9:02 PM, Michal Hocko wrote: for each struct page. So you are doubling the size. Who is going to enable this config option? You are moving this to page_ext in a later patch which is a good step but it doesn't go far enough because this still consumes those resources. Is there any pr

Re: [PATCH] locking/Documentation: Revise Documentation/locking/crossrelease.txt

2017-11-15 Thread Byungchul Park
On 11/16/2017 4:22 PM, Ingo Molnar wrote: * Byungchul Park wrote: On Sat, Nov 11, 2017 at 10:45:24PM +0900, Byungchul Park wrote: This is the big one including all of version 3. You can take only this. Hello Ingo, Could you consider this? Yeah, I'll have a look in a few days

[PATCH 1/3] lockdep: Apply crossrelease to PG_locked locks

2017-11-15 Thread Byungchul Park
page locks. Signed-off-by: Byungchul Park --- include/linux/mm_types.h | 8 include/linux/pagemap.h | 101 --- lib/Kconfig.debug| 7 mm/filemap.c | 4 +- mm/page_alloc.c | 3 ++ 5 files changed, 115 inser

[PATCH 0/3] lockdep/crossrelease: Apply crossrelease to page locks

2017-11-15 Thread Byungchul Park
For now, wait_for_completion() / complete() works with lockdep. Add lock_page() / unlock_page() and its family to lockdep support. Byungchul Park (3): lockdep: Apply crossrelease to PG_locked locks lockdep: Apply lock_acquire(release) on __Set(__Clear)PageLocked lockdep: Move data of

[PATCH 3/3] lockdep: Move data of CONFIG_LOCKDEP_PAGELOCK from page to page_ext

2017-11-15 Thread Byungchul Park
CONFIG_LOCKDEP_PAGELOCK needs to keep lockdep_map_cross per page. Since it's a debug feature, it's preferred to keep it in struct page_ext rather than struct page. Move it to struct page_ext. Signed-off-by: Byungchul Park --- include/linux/mm_types.h | 4 --- include/linux/page-fl

[PATCH 2/3] lockdep: Apply lock_acquire(release) on __Set(__Clear)PageLocked

2017-11-15 Thread Byungchul Park
frequently. We might miss many chances to check deadlock if we ignore it. Make __Set(__Clear)PageLockded considered 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

Re: [PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()

2017-11-15 Thread Byungchul Park
On 11/16/2017 10:30 AM, Michael S. Tsirkin wrote: On Thu, Nov 16, 2017 at 08:52:39AM +0900, Byungchul Park wrote: On Thu, Nov 09, 2017 at 09:17:29AM +0900, Byungchul Park wrote: I am sorry for having made a mistake on it. Hello Nicholas, Please consider this patch urgently. I'm sorr

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

2017-11-15 Thread Byungchul Park
On Tue, Nov 14, 2017 at 08:46:45AM +0900, Byungchul Park wrote: > Currently, migrating tasks to cpu0 unconditionally happens when the > heap is empty, since cp->elements[].cpu was initialized to 0(=cpu0). > We have to distinguish between the empty case and cpu0 to avoid the &

Re: [PATCH] locking/Documentation: Revise Documentation/locking/crossrelease.txt

2017-11-15 Thread Byungchul Park
On Sat, Nov 11, 2017 at 10:45:24PM +0900, Byungchul Park wrote: > This is the big one including all of version 3. > > You can take only this. Hello Ingo, Could you consider this? I want to offer a better base to someone who helps the doc enhanced. Of course, in the case you agree

Re: [PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()

2017-11-15 Thread Byungchul Park
On Thu, Nov 09, 2017 at 09:17:29AM +0900, Byungchul Park wrote: > I am sorry for having made a mistake on it. Hello Nicholas, Please consider this patch urgently. I'm sorry for having changed the original behavior with the previous patch. The safe version of llist API should be used to

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

2017-11-13 Thread Byungchul Park
1 From: Byungchul Park Date: Wed, 22 Mar 2017 14:25:56 +0900 Subject: [PATCH v3 1/2] sched/deadline: Add cpudl_maximum_dl() for clean-up Current code uses cpudl_maximum() to get the root node's cpu, while it directly accesses the root node like 'cp->elements[0].dl' to get the root nod

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

2017-11-13 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 ++

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

2017-11-13 Thread Byungchul Park
On 11/13/2017 9:46 PM, Daniel Bristot de Oliveira wrote: On 10/12/2017 09:57 AM, Byungchul Park wrote: On Tue, Oct 10, 2017 at 03:44:04PM +0900, Byungchul Park wrote: Currently, migrating tasks to cpu0 unconditionally happens when the heap is empty, since cp->elements[].cpu was initialized

Re: [PATCH] locking/Documentation: Revise Documentation/locking/crossrelease.txt

2017-11-11 Thread Byungchul Park
This is the big one including all of version 3. You can take only this. Thanks, Byungchul On Sat, Nov 11, 2017 at 10:33:34PM +0900, Byungchul Park wrote: > Revise Documentation/locking/crossrelease.txt to improve its readability. > > Signed-off-by: Byungchul Park > --- >

[PATCH] locking/Documentation: Revise Documentation/locking/crossrelease.txt

2017-11-11 Thread Byungchul Park
Revise Documentation/locking/crossrelease.txt to improve its readability. Signed-off-by: Byungchul Park --- Documentation/locking/crossrelease.txt | 329 - 1 file changed, 155 insertions(+), 174 deletions(-) diff --git a/Documentation/locking/crossrelease.txt b

[PATCH v3 5/5] locking/Documentation: Align crossrelease.txt with the width

2017-11-11 Thread Byungchul Park
No change of contents at all. Only adjust the width. (Please merge this to another after the review.) Signed-off-by: Byungchul Park --- Documentation/locking/crossrelease.txt | 59 +- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/Documentation

[PATCH v3 3/5] locking/Documentation: Fix weird expressions.

2017-11-11 Thread Byungchul Park
Fix Weird expressions not reported by checker tools by myself. Signed-off-by: Byungchul Park --- Documentation/locking/crossrelease.txt | 87 ++ 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/Documentation/locking/crossrelease.txt b

[PATCH v3 4/5] locking/Documentation: Add an example to help crossrelease.txt more readable

2017-11-11 Thread Byungchul Park
Add an example explaining the rationale that the limitation that old lockdep implies, can be relaxed. Signed-off-by: Byungchul Park --- Documentation/locking/crossrelease.txt | 23 +++ 1 file changed, 23 insertions(+) diff --git a/Documentation/locking/crossrelease.txt b

[PATCH v3 2/5] locking/Documentation: Fix typos and clear grammar errors

2017-11-11 Thread Byungchul Park
crossrelease.txt includes many typos and grammar errors. Fix them using a few spell checkers and grammar checkers. Clear errors are also fixed by myself. Signed-off-by: Byungchul Park --- Documentation/locking/crossrelease.txt | 170 - 1 file changed, 85

[PATCH v3 0/5] Revise crossrelease.txt

2017-11-11 Thread Byungchul Park
what Ingo pointed out. - Leave original contents unchanged as much as possible. Changes from v1 - Run several tools checking english spell and grammar over the text. - Simplify the document more. Byungchul Park (5): locking/Documentation: Remove meaningless examples and a note lo

[PATCH v3 1/5] locking/Documentation: Remove meaningless examples and a note

2017-11-11 Thread Byungchul Park
crossrelease.txt is too verbose and includes two meaningless examples and an unnecessary note. Remove them. Signed-off-by: Byungchul Park --- Documentation/locking/crossrelease.txt | 48 +- 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a

Re: [PATCH v2] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-09 Thread Byungchul Park
On 11/10/2017 4:30 PM, Ingo Molnar wrote: * Byungchul Park wrote: Event C depends on event A. Event A depends on event B. Event B depends on event C. - NOTE: Precisely speaking, a dependency is one between whether a - waiter for an event can be woken up and whether

Re: [PATCH v2] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-08 Thread Byungchul Park
On Thu, Nov 09, 2017 at 04:20:36PM +0900, Byungchul Park wrote: > Changes from v1 > - Run several tools checking english spell and grammar over the text. > - Simplify the document more. Checker tools also reported other words e.g. crosslock, crossrelease, lockdep, mutex, lockless, and s

[PATCH v2] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-08 Thread Byungchul Park
Changes from v1 - Run several tools checking english spell and grammar over the text. - Simplify the document more. -8<- >From 412bc9eb0d22791f70f7364bda189feb41899ff9 Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Thu, 9 Nov 2017 16:12:23 +0900 Subject: [PATCH v2] locking/l

Re: [PATCH] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-08 Thread Byungchul Park
On Wed, Nov 08, 2017 at 10:34:38AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > I'm afraid the revision is not perfect yet. Of course, the document can > > have got much better english by others than me. > > > > But, > > > > I

[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()

2017-11-08 Thread Byungchul Park
I am sorry for having made a mistake on it. -8<- >From ba9a0f76dffceffa4fa3aa2d9be49cdb0d9b7d4f Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Thu, 9 Nov 2017 09:00:21 +0900 Subject: [PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work() The following

Re: possible deadlock in generic_file_write_iter

2017-11-07 Thread Byungchul Park
11/7/2017 5:31 PM에 Dmitry Vyukov 이(가) 쓴 글: On Tue, Nov 7, 2017 at 9:30 AM, Byungchul Park wrote: 11/7/2017 5:11 PM에 Peter Zijlstra 이(가) 쓴 글: On Tue, Nov 07, 2017 at 09:54:42AM +0900, Byungchul Park wrote: The best I could come up with is something like the below; its not at all pretty and

Re: possible deadlock in generic_file_write_iter

2017-11-07 Thread Byungchul Park
11/7/2017 5:11 PM에 Peter Zijlstra 이(가) 쓴 글: On Tue, Nov 07, 2017 at 09:54:42AM +0900, Byungchul Park wrote: The best I could come up with is something like the below; its not at all pretty and I could see people objecting; least of all myself for the __complete() thing, but I ran out of

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Byungchul Park
On Mon, Nov 06, 2017 at 05:01:07PM +0100, Peter Zijlstra wrote: > On Mon, Nov 06, 2017 at 02:35:44PM +0100, Dmitry Vyukov wrote: > > On Mon, Nov 6, 2017 at 2:33 PM, Al Viro wrote: > > > On Mon, Nov 06, 2017 at 02:15:44PM +0100, Jan Kara wrote: > > > > > >> > Should we annotate these inodes with di

[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

[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 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 ++

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: > > >

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 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

[tip:irq/core] irq/work: Don't reinvent the wheel but use existing llist API

2017-10-31 Thread tip-bot for Byungchul Park
Commit-ID: 16c0890dc66d258fdeccf7b15a133f3930b19143 Gitweb: https://git.kernel.org/tip/16c0890dc66d258fdeccf7b15a133f3930b19143 Author: Byungchul Park AuthorDate: Tue, 31 Oct 2017 02:46:54 +0100 Committer: Ingo Molnar CommitDate: Tue, 31 Oct 2017 10:24:39 +0100 irq/work: Don&#

Re: possible deadlock in lru_add_drain_all

2017-10-30 Thread Byungchul Park
On Mon, Oct 30, 2017 at 09:22:03AM +0100, Michal Hocko wrote: > [Cc Byungchul. The original full report is > http://lkml.kernel.org/r/089e0825eec8955c1f055c83d...@google.com] > > Could you have a look please? This smells like a false positive to me. > > On Fri 27-10-17 15:42:34, Michal Hocko wrot

Re: possible deadlock in lru_add_drain_all

2017-10-30 Thread Byungchul Park
On Mon, Oct 30, 2017 at 09:22:03AM +0100, Michal Hocko wrote: > [Cc Byungchul. The original full report is > http://lkml.kernel.org/r/089e0825eec8955c1f055c83d...@google.com] > > Could you have a look please? This smells like a false positive to me. +cc pet...@infradead.org Hello, IMHO, the fal

Re: [lkp-robot] [locking/lockdep] 2dcd5adfb7: WARNING:possible_circular_locking_dependency_detected

2017-10-30 Thread Byungchul Park
On Sun, Oct 29, 2017 at 10:18:55PM +0800, kernel test robot wrote: > > FYI, we noticed the following commit (built with gcc-5): > > commit: 2dcd5adfb7401b762ddbe4b86dcacc2f3de6b97b ("locking/lockdep: Remove > the BROKEN flag from CONFIG_LOCKDEP_CROSSRELEASE and > CONFIG_LOCKDEP_COMPLETIONS") >

[PATCH] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-10-29 Thread Byungchul Park
--->8- >From c7795104ca6ac6dd9f7fd944aee23a2011a6d3a2 Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Mon, 30 Oct 2017 14:51:26 +0900 Subject: [PATCH] locking/lockdep: Revise Documentation/locking/crossrelease.txt The document should've been written with a better readability. Revise i

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

2017-10-27 Thread Byungchul Park
On Tue, Oct 10, 2017 at 03:37:53PM +0900, Byungchul Park wrote: > It would be better to try to check other siblings first if > SD_PREFER_SIBLING is flaged when pushing tasks - migration. Hello everyone, Could you tell me opinions? > Suggested-by: Peter Zijlstra > Signed-off-by: By

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

2017-10-27 Thread Byungchul Park
On Tue, Oct 10, 2017 at 03:44:03PM +0900, Byungchul Park wrote: > 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 200

[tip:locking/core] block, locking/lockdep: Assign a lock_class per gendisk used for wait_for_completion()

2017-10-26 Thread tip-bot for Byungchul Park
Commit-ID: e319e1fbd9d42420ab6eec0bfd75eb9ad7ca63b1 Gitweb: https://git.kernel.org/tip/e319e1fbd9d42420ab6eec0bfd75eb9ad7ca63b1 Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:56:05 +0900 Committer: Ingo Molnar CommitDate: Thu, 26 Oct 2017 07:54:17 +0200 block, locking/lockdep

Re: [PATCH v5 9/9] block: Assign a lock_class per gendisk used for wait_for_completion()

2017-10-25 Thread Byungchul Park
On Thu, Oct 26, 2017 at 07:50:46AM +0200, Ingo Molnar wrote: > > * Jens Axboe wrote: > > > On 10/25/2017 03:13 AM, Ingo Molnar wrote: > > > > > > * Byungchul Park wrote: > > > > > >> Darrick pos

Re: [RESEND PATCH 1/3] completion: Add support for initializing completion with lockdep_map

2017-10-25 Thread Byungchul Park
On Wed, Oct 25, 2017 at 07:07:06AM +, Bart Van Assche wrote: > > Please, point out logical problems of cross-release than saying it's > > impossbile according to the paper. > > Isn't that the same? If it's impossible to use lock-graphs for detecting > deadlocks > in programs that use mutexes,

[tip:locking/core] workqueue: Remove now redundant lock acquisitions wrt. workqueue flushes

2017-10-25 Thread tip-bot for Byungchul Park
Commit-ID: fd1a5b04dfb899f84ddeb8acdaea6b98283df1e5 Gitweb: https://git.kernel.org/tip/fd1a5b04dfb899f84ddeb8acdaea6b98283df1e5 Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:56:04 +0900 Committer: Ingo Molnar CommitDate: Wed, 25 Oct 2017 12:19:03 +0200 workqueue: Remove now

[tip:locking/core] locking/lockdep: Introduce CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK=y

2017-10-25 Thread tip-bot for Byungchul Park
Commit-ID: e121d64e16484d4a5eba94cd2fa9eb3848b7c9c2 Gitweb: https://git.kernel.org/tip/e121d64e16484d4a5eba94cd2fa9eb3848b7c9c2 Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:56:02 +0900 Committer: Ingo Molnar CommitDate: Wed, 25 Oct 2017 12:19:02 +0200 locking/lockdep

[tip:locking/core] sched/completions: Add support for initializing completions with lockdep_map

2017-10-25 Thread tip-bot for Byungchul Park
Commit-ID: a7967bc31584bd282682981295861e7bcba19e65 Gitweb: https://git.kernel.org/tip/a7967bc31584bd282682981295861e7bcba19e65 Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:56:03 +0900 Committer: Ingo Molnar CommitDate: Wed, 25 Oct 2017 12:19:03 +0200 sched/completions: Add

[tip:locking/core] locking/lockdep: Remove the BROKEN flag from CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS

2017-10-25 Thread tip-bot for Byungchul Park
Commit-ID: 2dcd5adfb7401b762ddbe4b86dcacc2f3de6b97b Gitweb: https://git.kernel.org/tip/2dcd5adfb7401b762ddbe4b86dcacc2f3de6b97b Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:56:01 +0900 Committer: Ingo Molnar CommitDate: Wed, 25 Oct 2017 12:19:01 +0200 locking/lockdep: Remove

[tip:locking/core] locking/lockdep: Add a boot parameter allowing unwind in cross-release and disable it by default

2017-10-25 Thread tip-bot for Byungchul Park
Commit-ID: d141babe4244945f1d001118578e0eb3ce12729d Gitweb: https://git.kernel.org/tip/d141babe4244945f1d001118578e0eb3ce12729d Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:56:00 +0900 Committer: Ingo Molnar CommitDate: Wed, 25 Oct 2017 12:19:01 +0200 locking/lockdep: Add a

[tip:locking/core] locking/lockdep, sched/completions: Change the prefix of lock name for completion variables

2017-10-25 Thread tip-bot for Byungchul Park
Commit-ID: 24208435e343679b21502fb90786084dfaf15369 Gitweb: https://git.kernel.org/tip/24208435e343679b21502fb90786084dfaf15369 Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:55:59 +0900 Committer: Ingo Molnar CommitDate: Wed, 25 Oct 2017 12:19:00 +0200 locking/lockdep, sched

[tip:locking/core] locking/lockdep: Provide empty lockdep_map structure for !CONFIG_LOCKDEP

2017-10-25 Thread tip-bot for Byungchul Park
Commit-ID: 6f0397d7e100f3b3978d6ebb6b2dea29ee7c4a95 Gitweb: https://git.kernel.org/tip/6f0397d7e100f3b3978d6ebb6b2dea29ee7c4a95 Author: Byungchul Park AuthorDate: Wed, 25 Oct 2017 17:55:58 +0900 Committer: Ingo Molnar CommitDate: Wed, 25 Oct 2017 12:19:00 +0200 locking/lockdep

[PATCH v5 2/9] locking/lockdep: Provide empty lockdep_map structure for !CONFIG_LOCKDEP

2017-10-25 Thread Byungchul Park
By this patch, the lockdep_map structure takes no space if lockdep is disabled, making a debug facility's impact on unreleated kernel less. Thanks to this, we don't need #ifdef to sparate code due to the lockdep_map structure. Signed-off-by: Byungchul Park --- include/linux/loc

[PATCH v5 5/9] locking/lockdep: Remove the BROKEN flag from CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS

2017-10-25 Thread Byungchul Park
Now that the performance regression is fixed, re-enable CONFIG_LOCKDEP_CROSSRELEASE=y and CONFIG_LOCKDEP_COMPLETIONS=y. 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 3db9167

[PATCH v5 4/9] locking/lockdep: Add a boot parameter allowing unwind in cross-release and disable it by default

2017-10-25 Thread Byungchul Park
ovold Bisected-by: Johan Hovold Analyzed-by: Thomas Gleixner Suggested-by: Thomas Gleixner Signed-off-by: Byungchul Park --- Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/locking/lockdep.c| 19 +-- 2 files changed, 20 insertions(+), 2 de

[PATCH v5 1/9] block: use DECLARE_COMPLETION_ONSTACK in submit_bio_wait

2017-10-25 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 5f5472e..99d0ca5 100644 --- a/bloc

[PATCH v5 7/9] completion: Add support for initializing completion with lockdep_map

2017-10-25 Thread Byungchul Park
completions in that way. Signed-off-by: Byungchul Park --- include/linux/completion.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/linux/completion.h b/include/linux/completion.h index 9121803..4da4991 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h

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

2017-10-25 Thread Byungchul Park
might 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 initializing co

[PATCH v5 6/9] locking/lockdep: Introduce CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK

2017-10-25 Thread Byungchul Park
The boot parameter, crossrelease_fullstack, was introduced to control whether to enable unwind in cross-release or not. Add a Kconfig doing the same thing. Suggested-by: Ingo Molnar Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 4 lib/Kconfig.debug| 15

[PATCH v5 8/9] workqueue: Remove unnecessary acquisitions wrt workqueue flush

2017-10-25 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. Remove it. Signed-off-by: Byungchul Park --- include/linux/workqueue.h | 4 ++-- kernel

<    1   2   3   4   5   6   7   8   9   10   >