From: Waiman Long <longman@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Qian Cai <cai@lca.pw>, Ingo Molnar <mingo@redhat.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] locking/lockdep: Increase MAX_LOCKDEP_ENTRIES by half
Date: Tue, 26 May 2020 18:27:55 -0400 [thread overview]
Message-ID: <7be0bc35-37cc-a325-ad1c-3017f6526768@redhat.com> (raw)
In-Reply-To: <20200526212707.GE2483@worktop.programming.kicks-ass.net>
On 5/26/20 5:27 PM, Peter Zijlstra wrote:
> On Tue, May 26, 2020 at 04:30:58PM -0400, Waiman Long wrote:
>> On 5/26/20 3:56 PM, Peter Zijlstra wrote:
>>> On Tue, May 26, 2020 at 02:58:50PM -0400, Qian Cai wrote:
>>>
>>>> I still don't understand why reading all sysfs files on this system
>>>> could increase that much, but here is the lockdep file after
>>>> running sysfs read to see if you could spot anything obviously,
>>>>
>>>> https://cailca.github.io/files/lockdep.txt
>>> 00000000f011a2a5 OPS: 20 FD: 45 BD: 1 .+.+: kn->active#834
>>>
>>> is that somewhere near the number of CPUs you have?
>>>
>>> Anyway, there's very long "kn->active#..." chains in there, which seems
>>> to suggest some annotation is all sorts of buggered.
>>>
>> It is actually one active lock per instance of the kerfs_node structures.
>> That means more than 800 sysfs files are accessed in some way. As we could
>> have much more than 800 sysfs files in the system, we could easily overwhelm
>> the lockdep tables if we really try to access all of them.
> A lock per instance is crazy, that's not what lockdep is made for.
> Fixing this seems like a far better idea than increasing the numbers.
Thinking about it, one lock per sysfs file does make sense as access to
those sysfs files can invoke vastly different code path and unifying
them into one single lock can easily lead to false positive warning.
Cheers,
Longman
prev parent reply other threads:[~2020-05-26 22:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 17:43 Waiman Long
2020-05-26 18:58 ` Qian Cai
2020-05-26 19:28 ` Qian Cai
2020-05-26 19:56 ` Peter Zijlstra
2020-05-26 20:17 ` Qian Cai
2020-05-26 20:30 ` Waiman Long
2020-05-26 21:24 ` Qian Cai
2020-05-26 21:27 ` Peter Zijlstra
2020-05-26 22:27 ` Waiman Long [this message]
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=7be0bc35-37cc-a325-ad1c-3017f6526768@redhat.com \
--to=longman@redhat.com \
--cc=cai@lca.pw \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=will.deacon@arm.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
all inboxes | Powered by JetHome®