On Fri, Jan 26, 2024 at 06:30:02PM +0100, Thomas Gleixner wrote:
> > Furthermore, now that Dept was introduced, false positive alarms was
> > reported by that. Replaced it with try lock annotation.
>
> I still have zero idea what this is about.
Lockdep is working on lock/unlock, while dept is
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to dma fence wait.
Signed-off-by: Byungchul Park
---
drivers/dma-buf/dma-fence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
(_wait);
That's it!
Signed-off-by: Byungchul Park
---
include/linux/dept_sdt.h | 62
1 file changed, 62 insertions(+)
create mode 100644 include/linux/dept_sdt.h
diff --git a/include/linux/dept_sdt.h b/include/linux/dept_sdt.h
new file mode 100644
index
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to swait, assuming an input 'ret' in ___swait_event()
macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/swait.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
for the refill on the lack by any chance, using
irq work and workqueue that fits on the contrained environment.
Signed-off-by: Byungchul Park
---
include/linux/dept.h| 19 --
kernel/dependency/dept.c| 104 +++-
kernel/dependency/dept_object.h | 10
the whole history buffer for that,
since it'd cost too high, alternatively, let's keep the latest one at
least when the same class'ed waits consecutively appear.
Signed-off-by: Byungchul Park
---
kernel/dependency/dept.c | 21 -
1 file changed, 20 insertions(+), 1 deletion
Makes Dept able to track dependencies by hashed-waitqueue waits.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index 7725b7579b78..fe89282c3e96 100644
--- a/include/linux
on
lockdep annotaions, dept interpets rwsem_acquire_read() as a potential
wait and might report a deadlock by the wait. So replaced it with
trylock version of annotation.
Signed-off-by: Byungchul Park
---
fs/jbd2/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/jbd2
iple reporting thanks to simple and quite
generalized design. Of course, false positive reports should be fixed
anyway but it's no longer as a critical problem as it was.
Signed-off-by: Byungchul Park
---
include/linux/dept.h| 567 ++
include/linux/hardirq.h |3 +
inc
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to hashed-waitqueue wait, assuming an input 'ret' in
___wait_var_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 2 +-
1 file changed, 1 insertion(+), 1
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to waitqueue wait, assuming an input 'ret' in
___wait_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Makes Dept able to track dependencies by
wait_for_completion()/complete().
Signed-off-by: Byungchul Park
---
include/linux/completion.h | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/include/linux/completion.h b/include/linux/completion.h
This document describes the concept of Dept.
Signed-off-by: Byungchul Park
---
Documentation/dependency/dept.txt | 735 ++
1 file changed, 735 insertions(+)
create mode 100644 Documentation/dependency/dept.txt
diff --git a/Documentation/dependency/dept.txt
b
it makes hard to interpret dept's report in that
case. So made it print the event requestor's stacktrace instead of the
event context's start, in place of [S] in report.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 13 +++
kernel/dependency/dept.c | 83
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to wait_for_completion()/complete().
Signed-off-by: Byungchul Park
---
include/linux/completion.h | 4 ++--
kernel/sched/completion.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
Makes Dept able to track PG_locked waits and events. It's going to be
useful in practice. See the following link that shows dept worked with
PG_locked and can detect real issues:
https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.p...@lge.com/
Signed-off-by: Byungchul
be too big to accept.
It'd be better to keep the minimum data in the case, which is timestamp
called 'wgen' that Dept makes use of. So made Dept able to work with an
external wgen when needed.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 18 ++
include/linux
, conservatively let Dept not track dependencies
across different syscalls.
Signed-off-by: Byungchul Park
---
arch/arm64/kernel/syscall.c | 3 ++
arch/x86/entry/common.c | 4 +++
include/linux/dept.h| 39 -
kernel/dependency/dept.c| 67
ntial wait
and might report a deadlock by the wait. So replaced it with trylock
version of annotation.
Signed-off-by: Byungchul Park
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 63447eb85dab..da969f7269b5 100644
--- a/kernel/c
This document describes the APIs of Dept.
Signed-off-by: Byungchul Park
---
Documentation/dependency/dept_api.txt | 117 ++
1 file changed, 117 insertions(+)
create mode 100644 Documentation/dependency/dept_api.txt
diff --git a/Documentation/dependency/dept_api.txt
b
How to place Dept this way looks so ugly. But it's inevitable for now.
The way should be enhanced gradually.
Signed-off-by: Byungchul Park
---
include/linux/irqflags.h| 7 +-
include/linux/local_lock_internal.h | 1 +
include/linux/lockdep.h | 102
Makes Dept able to track dependencies by waitqueue waits.
Signed-off-by: Byungchul Park
---
include/linux/wait.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 8aa3372f21a0..3177550a1b42 100644
--- a/include/linux/wait.h
+++ b/include
be turned
on/off depending on the purpose.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 15 ++---
include/linux/dept_ldt.h | 6 ++--
include/linux/dept_sdt.h | 12 +---
kernel/dependency/dept.c | 66 ++--
lib/Kconfig.debug| 10
Wrapped the base APIs for easier annotation on typical lock.
Signed-off-by: Byungchul Park
---
include/linux/dept_ldt.h | 77
1 file changed, 77 insertions(+)
create mode 100644 include/linux/dept_ldt.h
diff --git a/include/linux/dept_ldt.h b/include
It'd be useful to show Dept internal stats and dependency graph on
runtime via proc for better information. Introduced the knobs.
Signed-off-by: Byungchul Park
---
kernel/dependency/Makefile| 1 +
kernel/dependency/dept.c | 24 +++-
kernel/dependency/dept_internal.h | 26
Workqueue already provides concurrency control. By that, any wait in a
work doesn't prevents events in other works with the control enabled.
Thus, each work would better be considered a different context.
So let Dept assign a different context id to each work.
Signed-off-by: Byungchul Park
Makes Dept able to track dma fence waits.
Signed-off-by: Byungchul Park
---
drivers/dma-buf/dma-fence.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 0393a9bba3a8..d6f9b339b143 100644
--- a/drivers/dma-buf/dma-fence.c
Makes Dept able to track dependencies by swaits.
Signed-off-by: Byungchul Park
---
include/linux/swait.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/swait.h b/include/linux/swait.h
index d324419482a0..277ac74f61c3 100644
--- a/include/linux/swait.h
+++ b/include/linux
llist_head and llist_node can be used by very primitives. For example,
Dept for tracking dependency uses llist things in its header. To avoid
header dependency, move those to types.h.
Signed-off-by: Byungchul Park
---
include/linux/llist.h | 8
include/linux/types.h | 8
2
t() but __schedule().
(feedback from Linus and Matthew)
2. Use try version at lockdep_acquire_cpus_lock() annotation.
3. Distinguish each syscall context from another.
Byungchul Park (28):
llist: Move llist_{head,node} definition to types.h
dept: Implement Dept(Dependency
on
lockdep annotaions, dept interpets rwsem_acquire_read() as a potential
wait and might report a deadlock by the wait. So replaced it with
trylock version of annotation.
Signed-off-by: Byungchul Park
---
fs/jbd2/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/jbd2
Makes Dept able to track dependencies by waitqueue waits.
Signed-off-by: Byungchul Park
---
include/linux/wait.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 3473b663176f..ebeb4678859f 100644
--- a/include/linux/wait.h
+++ b/include
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to waitqueue wait, assuming an input 'ret' in
___wait_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
This document describes the concept of Dept.
Signed-off-by: Byungchul Park
---
Documentation/dependency/dept.txt | 735 ++
1 file changed, 735 insertions(+)
create mode 100644 Documentation/dependency/dept.txt
diff --git a/Documentation/dependency/dept.txt
b
the whole history buffer for that,
since it'd cost too high, alternatively, let's keep the latest one at
least when the same class'ed waits consecutively appear.
Signed-off-by: Byungchul Park
---
kernel/dependency/dept.c | 21 -
1 file changed, 20 insertions(+), 1 deletion
be too big to accept.
It'd be better to keep the minimum data in the case, which is timestamp
called 'wgen' that Dept makes use of. So made Dept able to work with an
external wgen when needed.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 18 ++
include/linux
for the refill on the lack by any chance, using
irq work and workqueue that fits on the contrained environment.
Signed-off-by: Byungchul Park
---
include/linux/dept.h| 19 --
kernel/dependency/dept.c| 104 +++-
kernel/dependency/dept_object.h | 10
ntial wait
and might report a deadlock by the wait. So replaced it with trylock
version of annotation.
Signed-off-by: Byungchul Park
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index a86972a91991..b708989f789f 100644
--- a/kernel/c
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to dma fence wait.
Signed-off-by: Byungchul Park
---
drivers/dma-buf/dma-fence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to hashed-waitqueue wait, assuming an input 'ret' in
___wait_var_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 2 +-
1 file changed, 1 insertion(+), 1
, conservatively let Dept not track dependencies
across different syscalls.
Signed-off-by: Byungchul Park
---
arch/arm64/kernel/syscall.c | 3 ++
arch/x86/entry/common.c | 4 +++
include/linux/dept.h| 39 -
kernel/dependency/dept.c| 67
be turned
on/off depending on the purpose.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 15 ++---
include/linux/dept_ldt.h | 6 ++--
include/linux/dept_sdt.h | 12 +---
kernel/dependency/dept.c | 66 ++--
lib/Kconfig.debug| 10
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to wait_for_completion()/complete().
Signed-off-by: Byungchul Park
---
include/linux/completion.h | 4 ++--
kernel/sched/completion.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
it makes hard to interpret dept's report in that
case. So made it print the event requestor's stacktrace instead of the
event context's start, in place of [S] in report.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 13 +++
kernel/dependency/dept.c | 83
How to place Dept this way looks so ugly. But it's inevitable for now.
The way should be enhanced gradually.
Signed-off-by: Byungchul Park
---
include/linux/irqflags.h| 7 +-
include/linux/local_lock_internal.h | 1 +
include/linux/lockdep.h | 102
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to swait, assuming an input 'ret' in ___swait_event()
macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/swait.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Makes Dept able to track dependencies by swaits.
Signed-off-by: Byungchul Park
---
include/linux/swait.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/swait.h b/include/linux/swait.h
index d324419482a0..277ac74f61c3 100644
--- a/include/linux/swait.h
+++ b/include/linux
Workqueue already provides concurrency control. By that, any wait in a
work doesn't prevents events in other works with the control enabled.
Thus, each work would better be considered a different context.
So let Dept assign a different context id to each work.
Signed-off-by: Byungchul Park
Makes Dept able to track dependencies by
wait_for_completion()/complete().
Signed-off-by: Byungchul Park
---
include/linux/completion.h | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/include/linux/completion.h b/include/linux/completion.h
Makes Dept able to track dma fence waits.
Signed-off-by: Byungchul Park
---
drivers/dma-buf/dma-fence.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 8aa8f8cb7071..76dba11f0dab 100644
--- a/drivers/dma-buf/dma-fence.c
It'd be useful to show Dept internal stats and dependency graph on
runtime via proc for better information. Introduced the knobs.
Signed-off-by: Byungchul Park
---
kernel/dependency/Makefile| 1 +
kernel/dependency/dept.c | 24 +++-
kernel/dependency/dept_internal.h | 26
ion.
3. Distinguish each syscall context from another.
Byungchul Park (27):
llist: Move llist_{head,node} definition to types.h
dept: Implement Dept(Dependency Tracker)
dept: Add single event dependency tracker APIs
dept: Add lock dependency tracker APIs
dept: Tie to Lockdep
Makes Dept able to track dependencies by hashed-waitqueue waits.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index 7725b7579b78..fe89282c3e96 100644
--- a/include/linux
Wrapped the base APIs for easier annotation on typical lock.
Signed-off-by: Byungchul Park
---
include/linux/dept_ldt.h | 77
1 file changed, 77 insertions(+)
create mode 100644 include/linux/dept_ldt.h
diff --git a/include/linux/dept_ldt.h b/include
Makes Dept able to track PG_locked waits and events. It's going to be
useful in practice. See the following link that shows dept worked with
PG_locked and can detect real issues:
https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.p...@lge.com/
Signed-off-by: Byungchul
(_wait);
That's it!
Signed-off-by: Byungchul Park
---
include/linux/dept_sdt.h | 62
1 file changed, 62 insertions(+)
create mode 100644 include/linux/dept_sdt.h
diff --git a/include/linux/dept_sdt.h b/include/linux/dept_sdt.h
new file mode 100644
index
llist_head and llist_node can be used by very primitives. For example,
Dept for tracking dependency uses llist things in its header. To avoid
header dependency, move those to types.h.
Signed-off-by: Byungchul Park
---
include/linux/llist.h | 8
include/linux/types.h | 8
2
iple reporting thanks to simple and quite
generalized design. Of course, false positive reports should be fixed
anyway but it's no longer as a critical problem as it was.
Signed-off-by: Byungchul Park
---
include/linux/dept.h| 567 ++
include/linux/hardirq.h |3 +
inc
iple reporting thanks to simple and quite
generalized design. Of course, false positive reports should be fixed
anyway but it's no longer as a critical problem as it was.
Signed-off-by: Byungchul Park
---
include/linux/dept.h| 567 ++
include/linux/hardirq.h |3 +
inc
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to dma fence wait.
Signed-off-by: Byungchul Park
---
drivers/dma-buf/dma-fence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
it makes hard to interpret dept's report in that
case. So made it print the event requestor's stacktrace instead of the
event context's start, in place of [S] in report.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 13 +++
kernel/dependency/dept.c | 83
Makes Dept able to track dependencies by
wait_for_completion()/complete().
Signed-off-by: Byungchul Park
---
include/linux/completion.h | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/include/linux/completion.h b/include/linux/completion.h
for the refill on the lack by any chance, using
irq work and workqueue that fits on the contrained environment.
Signed-off-by: Byungchul Park
---
include/linux/dept.h| 19 --
kernel/dependency/dept.c| 104 +++-
kernel/dependency/dept_object.h | 10
the whole history buffer for that,
since it'd cost too high, alternatively, let's keep the latest one at
least when the same class'ed waits consecutively appear.
Signed-off-by: Byungchul Park
---
kernel/dependency/dept.c | 21 -
1 file changed, 20 insertions(+), 1 deletion
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to swait, assuming an input 'ret' in ___swait_event()
macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/swait.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to waitqueue wait, assuming an input 'ret' in
___wait_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to hashed-waitqueue wait, assuming an input 'ret' in
___wait_var_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 2 +-
1 file changed, 1 insertion(+), 1
Wrapped the base APIs for easier annotation on typical lock.
Signed-off-by: Byungchul Park
---
include/linux/dept_ldt.h | 77
1 file changed, 77 insertions(+)
create mode 100644 include/linux/dept_ldt.h
diff --git a/include/linux/dept_ldt.h b/include
Makes Dept able to track dependencies by swaits.
Signed-off-by: Byungchul Park
---
include/linux/swait.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/swait.h b/include/linux/swait.h
index d324419482a0..277ac74f61c3 100644
--- a/include/linux/swait.h
+++ b/include/linux
Makes Dept able to track dependencies by waitqueue waits.
Signed-off-by: Byungchul Park
---
include/linux/wait.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 3473b663176f..ebeb4678859f 100644
--- a/include/linux/wait.h
+++ b/include
Makes Dept able to track dependencies by hashed-waitqueue waits.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index 7725b7579b78..fe89282c3e96 100644
--- a/include/linux
This document describes the concept of Dept.
Signed-off-by: Byungchul Park
---
Documentation/dependency/dept.txt | 283 ++
1 file changed, 283 insertions(+)
create mode 100644 Documentation/dependency/dept.txt
diff --git a/Documentation/dependency/dept.txt
b
t() but __schedule().
(feedback from Linus and Matthew)
2. Use try version at lockdep_acquire_cpus_lock() annotation.
3. Distinguish each syscall context from another.
Byungchul Park (27):
llist: Move llist_{head,node} definition to types.h
dept: Implement Dept(De
, conservatively let Dept not track dependencies
across different syscalls.
Signed-off-by: Byungchul Park
---
arch/arm64/kernel/syscall.c | 3 ++
arch/x86/entry/common.c | 4 +++
include/linux/dept.h| 39 -
kernel/dependency/dept.c| 67
be turned
on/off depending on the purpose.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 15 ++---
include/linux/dept_ldt.h | 6 ++--
include/linux/dept_sdt.h | 12 +---
kernel/dependency/dept.c | 66 ++--
lib/Kconfig.debug| 10
Makes Dept able to track PG_locked waits and events. It's going to be
useful in practice. See the following link that shows dept worked with
PG_locked and can detect real issues:
https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.p...@lge.com/
Signed-off-by: Byungchul
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to wait_for_completion()/complete().
Signed-off-by: Byungchul Park
---
include/linux/completion.h | 4 ++--
kernel/sched/completion.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
Makes Dept able to track dma fence waits.
Signed-off-by: Byungchul Park
---
drivers/dma-buf/dma-fence.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 8aa8f8cb7071..76dba11f0dab 100644
--- a/drivers/dma-buf/dma-fence.c
ntial wait
and might report a deadlock by the wait. So replaced it with trylock
version of annotation.
Signed-off-by: Byungchul Park
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index a86972a91991..b708989f789f 100644
--- a/kernel/c
How to place Dept this way looks so ugly. But it's inevitable for now.
The way should be enhanced gradually.
Signed-off-by: Byungchul Park
---
include/linux/irqflags.h| 7 +-
include/linux/local_lock_internal.h | 1 +
include/linux/lockdep.h | 102
be too big to accept.
It'd be better to keep the minimum data in the case, which is timestamp
called 'wgen' that Dept makes use of. So made Dept able to work with an
external wgen when needed.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 18 ++
include/linux
It'd be useful to show Dept internal stats and dependency graph on
runtime via proc for better information. Introduced the knobs.
Signed-off-by: Byungchul Park
---
kernel/dependency/Makefile| 1 +
kernel/dependency/dept.c | 24 +++-
kernel/dependency/dept_internal.h | 26
Workqueue already provides concurrency control. By that, any wait in a
work doesn't prevents events in other works with the control enabled.
Thus, each work would better be considered a different context.
So let Dept assign a different context id to each work.
Signed-off-by: Byungchul Park
on
lockdep annotaions, dept interpets rwsem_acquire_read() as a potential
wait and might report a deadlock by the wait. So replaced it with
trylock version of annotation.
Signed-off-by: Byungchul Park
---
fs/jbd2/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/jbd2
llist_head and llist_node can be used by very primitives. For example,
Dept for tracking dependency uses llist things in its header. To avoid
header dependency, move those to types.h.
Signed-off-by: Byungchul Park
---
include/linux/llist.h | 8
include/linux/types.h | 8
2
(_wait);
That's it!
Signed-off-by: Byungchul Park
---
include/linux/dept_sdt.h | 62
1 file changed, 62 insertions(+)
create mode 100644 include/linux/dept_sdt.h
diff --git a/include/linux/dept_sdt.h b/include/linux/dept_sdt.h
new file mode 100644
index
On Mon, Feb 12, 2024 at 04:16:41PM +0100, Thomas Gleixner wrote:
> On Tue, Jan 30 2024 at 11:58, Byungchul Park wrote:
> > On Fri, Jan 26, 2024 at 06:30:02PM +0100, Thomas Gleixner wrote:
> >> On Wed, Jan 24 2024 at 20:59, Byungchul Park wrote:
> >>
> >> Wh
On Fri, Jan 26, 2024 at 06:30:02PM +0100, Thomas Gleixner wrote:
> On Wed, Jan 24 2024 at 20:59, Byungchul Park wrote:
>
> Why is lockdep in the subsystem prefix here? You are changing the CPU
> hotplug (not hotplus) code, right?
>
> > cb92173d1f0 ("locking/lockdep
On Fri, Jan 26, 2024 at 06:30:02PM +0100, Thomas Gleixner wrote:
> On Wed, Jan 24 2024 at 20:59, Byungchul Park wrote:
>
> Why is lockdep in the subsystem prefix here? You are changing the CPU
> hotplug (not hotplus) code, right?
I will fix the typo ;( Thank you.
I referred t
annotation for that.
Furthermore, now that Dept was introduced, false positive alarms was
reported by that. Replaced it with try lock annotation.
Signed-off-by: Byungchul Park
---
fs/jbd2/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/jbd2/transaction.c b/fs
introduced, false positive alarms was
reported by that. Replaced it with try lock annotation.
Signed-off-by: Byungchul Park
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index a86972a91991..b708989f789f 100644
--- a/kernel/cpu.c
++
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to waitqueue wait, assuming an input 'ret' in
___wait_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Wrapped the base APIs for easier annotation on typical lock.
Signed-off-by: Byungchul Park
---
include/linux/dept_ldt.h | 77
1 file changed, 77 insertions(+)
create mode 100644 include/linux/dept_ldt.h
diff --git a/include/linux/dept_ldt.h b/include
It'd be useful to show Dept internal stats and dependency graph on
runtime via proc for better information. Introduced the knobs.
Signed-off-by: Byungchul Park
---
kernel/dependency/Makefile| 1 +
kernel/dependency/dept.c | 24 +++-
kernel/dependency/dept_internal.h | 26
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to hashed-waitqueue wait, assuming an input 'ret' in
___wait_var_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 2 +-
1 file changed, 1 insertion(+), 1
it makes hard to interpret dept's report in that
case. So made it print the event requestor's stacktrace instead of the
event context's start, in place of [S] in report.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 13 +++
kernel/dependency/dept.c | 83
be too big to accept.
It'd be better to keep the minimum data in the case, which is timestamp
called 'wgen' that Dept makes use of. So made Dept able to work with an
external wgen when needed.
Signed-off-by: Byungchul Park
---
include/linux/dept.h | 18 ++
include/linux
Makes Dept able to track PG_locked waits and events. It's going to be
useful in practice. See the following link that shows dept worked with
PG_locked and can detect real issues:
https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.p...@lge.com/
Signed-off-by: Byungchul
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to dma fence wait.
Signed-off-by: Byungchul Park
---
drivers/dma-buf/dma-fence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
Makes Dept able to track dependencies by hashed-waitqueue waits.
Signed-off-by: Byungchul Park
---
include/linux/wait_bit.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index 7725b7579b78..fe89282c3e96 100644
--- a/include/linux
1 - 100 of 480 matches
Mail list logo