public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Waiman Long <longman@redhat.com>
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 23:27:07 +0200	[thread overview]
Message-ID: <20200526212707.GE2483@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <b88d5379-687d-8c14-40ae-221c79500996@redhat.com>

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.

  parent reply	other threads:[~2020-05-26 21:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 17:43 [PATCH] locking/lockdep: Increase MAX_LOCKDEP_ENTRIES by half 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 [this message]
2020-05-26 22:27         ` Waiman Long

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=20200526212707.GE2483@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=cai@lca.pw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --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