All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] lockdep: allow user to disable CONFIG_TRACE_IRQFLAGS
@ 2010-05-04 16:02 tom.leiming
  2010-05-04 16:06   ` Ming Lei
  2010-05-04 16:26 ` Peter Zijlstra
  0 siblings, 2 replies; 4+ messages in thread
From: tom.leiming @ 2010-05-04 16:02 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, a.p.zijlstra, Ming Lei

From: Ming Lei <tom.leiming@gmail.com>

There is still the lost irq-on tracing issue on ARM,
(see http://marc.info/?l=linux-arm-kernel&m=126047420005553&w=2)
which may disable lockdep after kernel boot, seems no
good solution for the issue up to now.

The patch exports the config option of CONFIG_TRACE_IRQFLAGS
and allows user to disable it for support of checking circular
dead lock only if irq flags tracing can't work correctly always.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 lib/Kconfig.debug      |    3 +++
 lib/locking-selftest.c |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 935248b..448f18f 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -550,11 +550,14 @@ config DEBUG_LOCKDEP
 	  of more runtime overhead.
 
 config TRACE_IRQFLAGS
+	bool "Lock prove: IRQ flags tracing"
 	depends on DEBUG_KERNEL
 	bool
 	default y
 	depends on TRACE_IRQFLAGS_SUPPORT
 	depends on PROVE_LOCKING
+	help
+	  If you say Y here, IRQ flags will be traced to prove locking. 
 
 config DEBUG_SPINLOCK_SLEEP
 	bool "Spinlock debugging: sleep-inside-spinlock checking"
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
index 619313e..d9e5bfe 100644
--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -1176,6 +1176,7 @@ void locking_selftest(void)
 
 	printk("  --------------------------------------------------------------------------\n");
 
+#ifdef CONFIG_TRACE_IRQFLAGS
 	/*
 	 * irq-context testcases:
 	 */
@@ -1188,6 +1189,7 @@ void locking_selftest(void)
 
 	DO_TESTCASE_6x2("irq read-recursion", irq_read_recursion);
 //	DO_TESTCASE_6x2B("irq read-recursion #2", irq_read_recursion2);
+#endif
 
 	if (unexpected_testcase_failures) {
 		printk("-----------------------------------------------------------------\n");
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] lockdep: allow user to disable CONFIG_TRACE_IRQFLAGS
  2010-05-04 16:02 [PATCH 2/2] lockdep: allow user to disable CONFIG_TRACE_IRQFLAGS tom.leiming
@ 2010-05-04 16:06   ` Ming Lei
  2010-05-04 16:26 ` Peter Zijlstra
  1 sibling, 0 replies; 4+ messages in thread
From: Ming Lei @ 2010-05-04 16:06 UTC (permalink / raw)
  To: linux-arm-kernel

CC: ARM

2010/5/5  <tom.leiming@gmail.com>:
> From: Ming Lei <tom.leiming@gmail.com>
>
> There is still the lost irq-on tracing issue on ARM,
> (see http://marc.info/?l=linux-arm-kernel&m=126047420005553&w=2)
> which may disable lockdep after kernel boot, seems no
> good solution for the issue up to now.
>
> The patch exports the config option of CONFIG_TRACE_IRQFLAGS
> and allows user to disable it for support of checking circular
> dead lock only if irq flags tracing can't work correctly always.
>
> Signed-off-by: Ming Lei <tom.leiming@gmail.com>
> ---
> ?lib/Kconfig.debug ? ? ?| ? ?3 +++
> ?lib/locking-selftest.c | ? ?2 ++
> ?2 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 935248b..448f18f 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -550,11 +550,14 @@ config DEBUG_LOCKDEP
> ? ? ? ? ?of more runtime overhead.
>
> ?config TRACE_IRQFLAGS
> + ? ? ? bool "Lock prove: IRQ flags tracing"
> ? ? ? ?depends on DEBUG_KERNEL
> ? ? ? ?bool
> ? ? ? ?default y
> ? ? ? ?depends on TRACE_IRQFLAGS_SUPPORT
> ? ? ? ?depends on PROVE_LOCKING
> + ? ? ? help
> + ? ? ? ? If you say Y here, IRQ flags will be traced to prove locking.
>
> ?config DEBUG_SPINLOCK_SLEEP
> ? ? ? ?bool "Spinlock debugging: sleep-inside-spinlock checking"
> diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
> index 619313e..d9e5bfe 100644
> --- a/lib/locking-selftest.c
> +++ b/lib/locking-selftest.c
> @@ -1176,6 +1176,7 @@ void locking_selftest(void)
>
> ? ? ? ?printk(" ?--------------------------------------------------------------------------\n");
>
> +#ifdef CONFIG_TRACE_IRQFLAGS
> ? ? ? ?/*
> ? ? ? ? * irq-context testcases:
> ? ? ? ? */
> @@ -1188,6 +1189,7 @@ void locking_selftest(void)
>
> ? ? ? ?DO_TESTCASE_6x2("irq read-recursion", irq_read_recursion);
> ?// ? ? DO_TESTCASE_6x2B("irq read-recursion #2", irq_read_recursion2);
> +#endif
>
> ? ? ? ?if (unexpected_testcase_failures) {
> ? ? ? ? ? ? ? ?printk("-----------------------------------------------------------------\n");
> --
> 1.6.2.5
>
>



-- 
Lei Ming

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] lockdep: allow user to disable CONFIG_TRACE_IRQFLAGS
@ 2010-05-04 16:06   ` Ming Lei
  0 siblings, 0 replies; 4+ messages in thread
From: Ming Lei @ 2010-05-04 16:06 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, a.p.zijlstra, Ming Lei, linux-arm-kernel

CC: ARM

2010/5/5  <tom.leiming@gmail.com>:
> From: Ming Lei <tom.leiming@gmail.com>
>
> There is still the lost irq-on tracing issue on ARM,
> (see http://marc.info/?l=linux-arm-kernel&m=126047420005553&w=2)
> which may disable lockdep after kernel boot, seems no
> good solution for the issue up to now.
>
> The patch exports the config option of CONFIG_TRACE_IRQFLAGS
> and allows user to disable it for support of checking circular
> dead lock only if irq flags tracing can't work correctly always.
>
> Signed-off-by: Ming Lei <tom.leiming@gmail.com>
> ---
>  lib/Kconfig.debug      |    3 +++
>  lib/locking-selftest.c |    2 ++
>  2 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 935248b..448f18f 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -550,11 +550,14 @@ config DEBUG_LOCKDEP
>          of more runtime overhead.
>
>  config TRACE_IRQFLAGS
> +       bool "Lock prove: IRQ flags tracing"
>        depends on DEBUG_KERNEL
>        bool
>        default y
>        depends on TRACE_IRQFLAGS_SUPPORT
>        depends on PROVE_LOCKING
> +       help
> +         If you say Y here, IRQ flags will be traced to prove locking.
>
>  config DEBUG_SPINLOCK_SLEEP
>        bool "Spinlock debugging: sleep-inside-spinlock checking"
> diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
> index 619313e..d9e5bfe 100644
> --- a/lib/locking-selftest.c
> +++ b/lib/locking-selftest.c
> @@ -1176,6 +1176,7 @@ void locking_selftest(void)
>
>        printk("  --------------------------------------------------------------------------\n");
>
> +#ifdef CONFIG_TRACE_IRQFLAGS
>        /*
>         * irq-context testcases:
>         */
> @@ -1188,6 +1189,7 @@ void locking_selftest(void)
>
>        DO_TESTCASE_6x2("irq read-recursion", irq_read_recursion);
>  //     DO_TESTCASE_6x2B("irq read-recursion #2", irq_read_recursion2);
> +#endif
>
>        if (unexpected_testcase_failures) {
>                printk("-----------------------------------------------------------------\n");
> --
> 1.6.2.5
>
>



-- 
Lei Ming

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] lockdep: allow user to disable CONFIG_TRACE_IRQFLAGS
  2010-05-04 16:02 [PATCH 2/2] lockdep: allow user to disable CONFIG_TRACE_IRQFLAGS tom.leiming
  2010-05-04 16:06   ` Ming Lei
@ 2010-05-04 16:26 ` Peter Zijlstra
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2010-05-04 16:26 UTC (permalink / raw)
  To: tom.leiming; +Cc: mingo, linux-kernel

On Wed, 2010-05-05 at 00:02 +0800, tom.leiming@gmail.com wrote:
> There is still the lost irq-on tracing issue on ARM,
> (see http://marc.info/?l=linux-arm-kernel&m=126047420005553&w=2)
> which may disable lockdep after kernel boot, seems no
> good solution for the issue up to now. 

Well, do like x86 does in entry.S call into lockdep right before
returning to userspace.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-04 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 16:02 [PATCH 2/2] lockdep: allow user to disable CONFIG_TRACE_IRQFLAGS tom.leiming
2010-05-04 16:06 ` Ming Lei
2010-05-04 16:06   ` Ming Lei
2010-05-04 16:26 ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.