public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Byungchul Park <byungchul.park@lge.com>
To: johan@kernel.org, mingo@kernel.org, arnd@arndb.de,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, peterz@infradead.org, hpa@zytor.com,
	tony@atomide.com
Cc: linux-tip-commits@vger.kernel.org, kernel-team@lge.com
Subject: Re: [tip:locking/urgent] locking/lockdep: Disable cross-release features for now
Date: Mon, 16 Oct 2017 11:04:47 +0900	[thread overview]
Message-ID: <20171016020447.GP3323@X58A-UD3R> (raw)
In-Reply-To: <tip-b483cf3bc249d7af706390efa63d6671e80d1c09@git.kernel.org>

On Sat, Oct 14, 2017 at 04:36:51AM -0700, tip-bot for Ingo Molnar wrote:
> Commit-ID:  b483cf3bc249d7af706390efa63d6671e80d1c09
> Gitweb:     https://git.kernel.org/tip/b483cf3bc249d7af706390efa63d6671e80d1c09
> Author:     Ingo Molnar <mingo@kernel.org>
> AuthorDate: Sat, 14 Oct 2017 09:26:59 +0200
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Sat, 14 Oct 2017 12:50:26 +0200
> 
> locking/lockdep: Disable cross-release features for now
> 
> Johan Hovold reported a big lockdep slowdown on his system, caused by lockdep:
> 
> > I had noticed that the BeagleBone Black boot time appeared to have
> > increased significantly with 4.14 and yesterday I finally had time to
> > investigate it.
> >
> > Boot time (from "Linux version" to login prompt) had in fact doubled
> > since 4.13 where it took 17 seconds (with my current config) compared to
> > the 35 seconds I now see with 4.14-rc4.
> >
> > I quick bisect pointed to lockdep and specifically the following commit:
> >
> >	28a903f63ec0 ("locking/lockdep: Handle non(or multi)-acquisition of a crosslock")
> 
> Because the final v4.14 release is close, disable the cross-release lockdep
> features for now.
> 
> Bisected-by: Johan Hovold <johan@kernel.org>
> Debugged-by: Johan Hovold <johan@kernel.org>
> Reported-by: Johan Hovold <johan@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Byungchul Park <byungchul.park@lge.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: kernel-team@lge.com
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mm@kvack.org
> Cc: linux-omap@vger.kernel.org
> Link: http://lkml.kernel.org/r/20171014072659.f2yr6mhm5ha3eou7@gmail.com
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  lib/Kconfig.debug | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 2689b7c..e270584 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1092,8 +1092,8 @@ config PROVE_LOCKING
>  	select DEBUG_MUTEXES
>  	select DEBUG_RT_MUTEXES if RT_MUTEXES
>  	select DEBUG_LOCK_ALLOC
> -	select LOCKDEP_CROSSRELEASE
> -	select LOCKDEP_COMPLETIONS
> +	select LOCKDEP_CROSSRELEASE if BROKEN
> +	select LOCKDEP_COMPLETIONS if BROKEN

I agree with disabling crossrelease as default, becasue of regression,
as I originally did.

However, it's expected to spend more time once it's enabled. Is the
following acceptable?

----->8-----
>From d796b36bbed5783a22879d745e4d332bb02697a5 Mon Sep 17 00:00:00 2001
From: Byungchul Park <byungchul.park@lge.com>
Date: Mon, 16 Oct 2017 10:54:20 +0900
Subject: [PATCH] lockdep: Diable LOCKDEP_CROSSRELEASE as default

Lockdep slowdeon has been reported becasue of LOCKDEP_CROSSRELEASE. The
feature needs more time to work, but it's not desirable as default. So
disable the Kconfig as default.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 lib/Kconfig.debug | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 3db9167..fa45f78 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1138,8 +1138,6 @@ config PROVE_LOCKING
 	select DEBUG_MUTEXES
 	select DEBUG_RT_MUTEXES if RT_MUTEXES
 	select DEBUG_LOCK_ALLOC
-	select LOCKDEP_CROSSRELEASE if BROKEN
-	select LOCKDEP_COMPLETIONS if BROKEN
 	select TRACE_IRQFLAGS
 	default n
 	help
@@ -1210,7 +1208,9 @@ config LOCK_STAT
 	 (CONFIG_LOCKDEP defines "acquire" and "release" events.)
 
 config LOCKDEP_CROSSRELEASE
-	bool
+	bool "Lock debugging: enable cross-locking checks in lockdep"
+	depends on PROVE_LOCKING
+	default n
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
@@ -1220,7 +1220,9 @@ config LOCKDEP_CROSSRELEASE
 	 detector, lockdep.
 
 config LOCKDEP_COMPLETIONS
-	bool
+	bool "Lock debugging: allow completions to use deadlock detector"
+	depends on LOCKDEP_CROSSRELEASE
+	default n
 	help
 	 A deadlock caused by wait_for_completion() and complete() can be
 	 detected by lockdep using crossrelease feature.
-- 
1.9.1

  reply	other threads:[~2017-10-16  2:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  9:03 Dramatic lockdep slowdown in 4.14 Johan Hovold
2017-10-13  9:07 ` Peter Zijlstra
2017-10-13  9:35   ` Johan Hovold
2017-10-14  7:26 ` Ingo Molnar
2017-10-14  8:11   ` Johan Hovold
2017-10-14 11:36   ` [tip:locking/urgent] locking/lockdep: Disable cross-release features for now tip-bot for Ingo Molnar
2017-10-16  2:04     ` Byungchul Park [this message]
2017-10-17  7:12       ` Ingo Molnar
2017-10-17  7:40         ` Thomas Gleixner
2017-10-17 14:42           ` Ingo Molnar
2017-10-17 15:03             ` Thomas Gleixner
2017-10-17 16:21               ` Ingo Molnar
2017-10-18  7:48               ` Byungchul Park
2017-10-18  5:31         ` Byungchul Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171016020447.GP3323@X58A-UD3R \
    --to=byungchul.park@lge.com \
    --cc=arnd@arndb.de \
    --cc=hpa@zytor.com \
    --cc=johan@kernel.org \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox