All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	akpm@linux-foundation.org, Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH] mutex: make mutex_lock_nested an inline function
Date: Wed, 14 Oct 2015 11:27:06 +0100	[thread overview]
Message-ID: <20151014102706.GR14956@sirena.org.uk> (raw)
In-Reply-To: <20151014082050.GQ17308@twins.programming.kicks-ass.net>

[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]

On Wed, Oct 14, 2015 at 10:20:50AM +0200, Peter Zijlstra wrote:

> Uuh, I just looked at next and saw this regulator_lock_supply()
> function. How is that limited? subclass must be <8 otherwise bad things
> happen.

Can we please get some more discoverable documentation of the arbitrary
limits in the lockdep code?  I seem to keep seeing code that bumps into
surprising limits like this and I'm not sure how I'm supposed to know
about them except through finding out after the fact or trawling the
code every time someone touches locking.

I would be very surprised to see a system that pushes over 8 locks,
while there's nothing actually preventing it system design
considerations mean that even four cascaded supplies are pretty
unlikely so we should be fine.  Every time you add a new level of
regulation you're both increasing the load on regulators up the chain
(which means they need to be bigger and more expensive) and except in
the case of a DCDC supplying an LDO (which only works to one level)
you're going to be decreasing the efficiency of the system.  If we get
to that point we can worry about what to do.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mutex: make mutex_lock_nested an inline function
Date: Wed, 14 Oct 2015 11:27:06 +0100	[thread overview]
Message-ID: <20151014102706.GR14956@sirena.org.uk> (raw)
In-Reply-To: <20151014082050.GQ17308@twins.programming.kicks-ass.net>

On Wed, Oct 14, 2015 at 10:20:50AM +0200, Peter Zijlstra wrote:

> Uuh, I just looked at next and saw this regulator_lock_supply()
> function. How is that limited? subclass must be <8 otherwise bad things
> happen.

Can we please get some more discoverable documentation of the arbitrary
limits in the lockdep code?  I seem to keep seeing code that bumps into
surprising limits like this and I'm not sure how I'm supposed to know
about them except through finding out after the fact or trawling the
code every time someone touches locking.

I would be very surprised to see a system that pushes over 8 locks,
while there's nothing actually preventing it system design
considerations mean that even four cascaded supplies are pretty
unlikely so we should be fine.  Every time you add a new level of
regulation you're both increasing the load on regulators up the chain
(which means they need to be bigger and more expensive) and except in
the case of a DCDC supplying an LDO (which only works to one level)
you're going to be decreasing the efficiency of the system.  If we get
to that point we can worry about what to do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151014/2eaedd02/attachment.sig>

  parent reply	other threads:[~2015-10-14 10:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 20:30 [PATCH] mutex: make mutex_lock_nested an inline function Arnd Bergmann
2015-10-13 20:30 ` Arnd Bergmann
2015-10-13 20:38 ` Peter Zijlstra
2015-10-13 20:38   ` Peter Zijlstra
2015-10-13 21:46   ` Arnd Bergmann
2015-10-13 21:46     ` Arnd Bergmann
2015-10-14  8:20     ` Peter Zijlstra
2015-10-14  8:20       ` Peter Zijlstra
2015-10-14  8:37       ` Peter Zijlstra
2015-10-14  8:37         ` Peter Zijlstra
2015-10-14  9:00         ` Arnd Bergmann
2015-10-14  9:00           ` Arnd Bergmann
2015-10-14  9:08           ` Peter Zijlstra
2015-10-14  9:08             ` Peter Zijlstra
2015-10-14  9:59             ` Mark Brown
2015-10-14  9:59               ` Mark Brown
2015-10-14 10:27       ` Mark Brown [this message]
2015-10-14 10:27         ` Mark Brown
2015-10-14 11:07         ` Peter Zijlstra
2015-10-14 11:07           ` Peter Zijlstra
2015-10-14 12:36           ` Mark Brown
2015-10-14 12:36             ` Mark Brown
2015-10-14 13:47             ` Peter Zijlstra
2015-10-14 13:47               ` Peter Zijlstra
2015-10-14 13:50               ` Peter Zijlstra
2015-10-14 13:50                 ` Peter Zijlstra
2015-10-14 13:58                 ` Ingo Molnar
2015-10-14 13:58                   ` Ingo Molnar
2015-10-14 14:11               ` Mark Brown
2015-10-14 14:11                 ` Mark Brown
2015-10-22 15:02     ` Arnd Bergmann
2015-10-22 15:02       ` Arnd Bergmann
2015-10-22 15:09       ` Peter Zijlstra
2015-10-22 15:09         ` Peter Zijlstra
2015-10-22 17:44         ` Russell King - ARM Linux
2015-10-22 17:44           ` Russell King - ARM Linux
2015-10-27 18:13           ` Ingo Molnar
2015-10-27 18:13             ` Ingo Molnar

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=20151014102706.GR14956@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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.