linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Shaohua Li <shli@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: manual merge of the tip tree
Date: Thu, 17 Oct 2013 12:28:59 +1100	[thread overview]
Message-ID: <20131017122859.67432627@notabene.brown> (raw)
In-Reply-To: <20131016205207.GE10651@twins.programming.kicks-ass.net>

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

On Wed, 16 Oct 2013 22:52:07 +0200 Peter Zijlstra <peterz@infradead.org>
wrote:

> Hey Neil;
> 
> it looks like its one of your patches isn't it?
> 
> http://www.spinics.net/lists/raid/msg44100.html
> http://www.spinics.net/lists/raid/msg44101.html
> 
> Given that I can't find them in a lkml archive means nobody's ever seen
> those patches.
> 
> Anyway; has that 3/3 patch ever been ran with lockdep enabled? 

I always run with lockdep enabled, and I have done at least basic testing
(I've been on leave for a few weeks and don't remember exactly where I got
to).
And I haven't seen any lockdep reports.

> 
> Stuff like:
> 
> +	for (i = 0; i < NR_STRIPE_HASH_LOCKS; i++)
> +		spin_lock_init(conf->hash_locks + i);
> 
> And:
> 
> +static void __lock_all_hash_locks(struct r5conf *conf)
> +{
> +	int i;
> +	for (i = 0; i < NR_STRIPE_HASH_LOCKS; i++)
> +		spin_lock(conf->hash_locks + i);
> +}
> 
> Tends to complain real loud.

Why is that?
Because "conf->hash_locks + i" gets used as the "name" of the lockdep map for
each one, and when they are all locked it looks like nested locking??

the lock_all_hash_locks doesn't get called very often and my testing mustn't
have got that far.  I just tried something that would trigger the 
"lock_all_device_hash_locks_irq" (as it is in the current version) and it
went "splat" just as you said it would.
Thanks.

Do you have a suggestion for how to make this work?
Would
    spin_lock_nested(conf->hash_locks + i, i)
do the trick?

Thanks,
NeilBrown

> 
> This leaves one to wonder... 
>   'fancy' locking scheme:1, validation effort:0
> 


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

  reply	other threads:[~2013-10-17  1:29 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 18:51 linux-next: Tree for Oct 16 Thierry Reding
2013-10-16 18:51 ` linux-next: manual merge of the tip tree Thierry Reding
2013-10-16 20:06   ` Peter Zijlstra
2013-10-16 20:14     ` Peter Zijlstra
2013-10-16 20:31       ` NeilBrown
2013-10-16 20:35         ` Peter Zijlstra
2013-10-16 20:51           ` Thierry Reding
2013-10-16 21:00             ` Peter Zijlstra
2013-10-16 20:52         ` Peter Zijlstra
2013-10-17  1:28           ` NeilBrown [this message]
2013-10-17  9:23             ` Peter Zijlstra
2013-10-22  2:09               ` NeilBrown
2013-10-16 20:40       ` Thierry Reding
2013-10-16 20:44     ` Thierry Reding
2013-10-16 21:30   ` Peter Zijlstra
2013-10-17  1:29     ` NeilBrown
2013-10-16 18:51 ` linux-next: manual merge of the kvm-arm tree Thierry Reding
2013-10-16 18:58   ` Marc Zyngier
2013-10-16 19:02     ` Christoffer Dall
2013-10-16 19:04       ` Thierry Reding
2013-10-16 19:09         ` Christoffer Dall
2013-10-17 14:55       ` Gleb Natapov
2013-10-17 16:53         ` Christoffer Dall
2013-10-16 21:48 ` linux-next: Tree for Oct 16 (net/sched/em_ipset.c) Randy Dunlap
2013-10-16 22:39   ` Stephen Hemminger
2013-10-17  0:21     ` Randy Dunlap
2013-10-17  0:29       ` [PATCH net-next] em_ipset: use dev_net() accessor Stephen Hemminger
2013-10-18 20:23         ` David Miller
2013-10-17  0:58 ` linux-next: Tree for Oct 16 Randy Dunlap
2013-10-17  5:12 ` Guenter Roeck
  -- strict thread matches above, loose matches on Subject: below --
2013-10-24 16:31 linux-next: Tree for Oct 24 Thierry Reding
2013-10-25 13:03 ` linux-next: manual merge of the c6x tree Thierry Reding
2013-10-25 13:03   ` linux-next: manual merge of the tip tree Thierry Reding
2013-10-25 13:25     ` Will Deacon
2013-10-26  8:40       ` Ingo Molnar
2013-10-26 14:01         ` Will Deacon
2013-10-27  7:12           ` Ingo Molnar
2013-10-27 10:00             ` Russell King - ARM Linux
2013-10-28  7:47               ` Thierry Reding
2013-10-28  8:45                 ` Russell King - ARM Linux
2013-10-17 21:23 Mark Brown
2013-10-17 21:50 ` Cyrill Gorcunov
2013-09-30 11:26 linux-next: manual merge of the bcon tree Thierry Reding
2013-09-30 11:26 ` linux-next: manual merge of the tip tree Thierry Reding

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=20131017122859.67432627@notabene.brown \
    --to=neilb@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=shli@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).