All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Ingo Molnar <mingo@kernel.org>
Cc: Byungchul Park <byungchul.park@lge.com>,
	johan@kernel.org, arnd@arndb.de, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	hpa@zytor.com, tony@atomide.com,
	linux-tip-commits@vger.kernel.org, kernel-team@lge.com
Subject: Re: [tip:locking/urgent] locking/lockdep: Disable cross-release features for now
Date: Tue, 17 Oct 2017 17:03:40 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1710171647140.1932@nanos> (raw)
In-Reply-To: <20171017144230.dwrrxnpseo7tv6rp@gmail.com>

On Tue, 17 Oct 2017, Ingo Molnar wrote:
> * Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Tue, 17 Oct 2017, Ingo Molnar wrote:
> > > No, please fix performance.
> > 
> > You know very well that with the cross release stuff we have to take the
> > performance hit of stack unwinding because we have no idea whether there
> > will show up a new lock relation later or not. And there is not much you
> > can do in that respect.
> > 
> > OTOH, the cross release feature unearthed real deadlocks already so it is a
> > valuable debug feature and having an explicit config switch which defaults
> > to N is well worth it.
> 
> I disagree, because even if that's correct, the choices are not binary. The 
> performance regression was a slowdown of around 7x: lockdep boot overhead on that 
> particula system went from +3 seconds to +21 seconds...

Hmm, I might have missed something, but what I've seen in this thread is:

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

So that's 2x not 7x. On one of my main test machines it's about ~1.4 so I
did not even really notice until this thread came up. Probably I have no
expectations on boot time and performance when lockdep is on :)

> As a response to the performance regression I haven't seen _any_ attempt to 
> measure, profile and generally quantify the performance impact, which would at 
> least make it more believable that the overhead cannot be reduced. That really 
> makes me worry about the code on a higher level than just whether it can be 
> enabled by default or not.

I did some quick perf top analysis, not in detail though, and what really
dominates with that feature is the unwinder, which needs to be
unconditional due to the nature of the problem.

I have not spend a huge amount of time to think about ways to improve that,
but I could not come up with anything smart so far.

The only thing I thought about was making the unwind short and only record
one or two call levels (if at all) instead of following the full call
chain. That makes it less useful for a quick test, but once you hit a splat
you can enable full depth recording for full analysis. In the full analysis
case performance is the least of your worries.

> Caring about the performance of debug features very much matters, _especially_ 
> when they are expensive.

I'm not disagreeing. I'm just trying to understand why this is marked
BROKEN where I think it should be marked TOO_EXPENSIVE.

Thanks,

	tglx

  reply	other threads:[~2017-10-17 15:04 UTC|newest]

Thread overview: 24+ 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:03 ` Johan Hovold
2017-10-13  9:03 ` Johan Hovold
2017-10-13  9:07 ` Peter Zijlstra
2017-10-13  9:07   ` Peter Zijlstra
2017-10-13  9:07   ` Peter Zijlstra
2017-10-13  9:35   ` Johan Hovold
2017-10-13  9:35     ` Johan Hovold
2017-10-13  9:35     ` Johan Hovold
2017-10-14  7:26 ` Ingo Molnar
2017-10-14  7:26   ` Ingo Molnar
2017-10-14  7:26   ` Ingo Molnar
2017-10-14  8:11   ` Johan Hovold
2017-10-14  8:11     ` Johan Hovold
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
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 [this message]
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=alpine.DEB.2.20.1710171647140.1932@nanos \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=byungchul.park@lge.com \
    --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=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 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.