[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-68e9dc29f8f42c79d2a3755223ed910ce36b4ae2@git.kernel.org>
Date: Mon, 3 Jun 2019 06:20:14 -0700
From: tip-bot for Yuyang Du <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, torvalds@...ux-foundation.org, peterz@...radead.org,
duyuyang@...il.com, tglx@...utronix.de,
linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: [tip:locking/core] locking/lockdep: Check redundant dependency only
when CONFIG_LOCKDEP_SMALL
Commit-ID: 68e9dc29f8f42c79d2a3755223ed910ce36b4ae2
Gitweb: https://git.kernel.org/tip/68e9dc29f8f42c79d2a3755223ed910ce36b4ae2
Author: Yuyang Du <duyuyang@...il.com>
AuthorDate: Mon, 6 May 2019 16:19:36 +0800
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 3 Jun 2019 11:55:50 +0200
locking/lockdep: Check redundant dependency only when CONFIG_LOCKDEP_SMALL
As Peter has put it all sound and complete for the cause, I simply quote:
"It (check_redundant) was added for cross-release (which has since been
reverted) which would generate a lot of redundant links (IIRC) but
having it makes the reports more convoluted -- basically, if we had an
A-B-C relation, then A-C will not be added to the graph because it is
already covered. This then means any report will include B, even though
a shorter cycle might have been possible."
This would increase the number of direct dependencies. For a simple workload
(make clean; reboot; make vmlinux -j8), the data looks like this:
CONFIG_LOCKDEP_SMALL: direct dependencies: 6926
!CONFIG_LOCKDEP_SMALL: direct dependencies: 9052 (+30.7%)
Suggested-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Yuyang Du <duyuyang@...il.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: bvanassche@....org
Cc: frederic@...nel.org
Cc: ming.lei@...hat.com
Cc: will.deacon@....com
Link: https://lkml.kernel.org/r/20190506081939.74287-21-duyuyang@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/locking/lockdep.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 30a1c0e32573..63b82921698d 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -1739,6 +1739,7 @@ check_noncircular(struct held_lock *src, struct held_lock *target,
return ret;
}
+#ifdef CONFIG_LOCKDEP_SMALL
/*
* Check that the dependency graph starting at <src> can lead to
* <target> or not. If it can, <src> -> <target> dependency is already
@@ -1768,6 +1769,7 @@ check_redundant(struct held_lock *src, struct held_lock *target)
return ret;
}
+#endif
#ifdef CONFIG_TRACE_IRQFLAGS
@@ -2428,12 +2430,14 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
}
}
+#ifdef CONFIG_LOCKDEP_SMALL
/*
* Is the <prev> -> <next> link redundant?
*/
ret = check_redundant(prev, next);
if (ret != 1)
return ret;
+#endif
if (!trace->nr_entries && !save_trace(trace))
return 0;
Powered by blists - more mailing lists