linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taehee Yoo <ap420073@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	syzbot <syzbot+aaa6fa4949cc5d9b7b25@syzkaller.appspotmail.com>,
	Ingo Molnar <mingo@kernel.org>, Will Deacon <will.deacon@arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: BUG: MAX_LOCKDEP_CHAINS too low!
Date: Fri, 17 Jan 2020 00:32:55 +0900	[thread overview]
Message-ID: <CAMArcTXq=nV5kNSdWPgvpMmYXuet9gxZgmxO2JJJ7_T3vLRoRg@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+YuM55YUT37jwRP163J7ha25cN03sZ5WqTUPkz3e43Ggw@mail.gmail.com>

On Thu, 16 Jan 2020 at 14:25, Dmitry Vyukov <dvyukov@google.com> wrote:
>

Hi Dmitry!

> On Wed, Jan 15, 2020 at 10:53 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
> > > +Taehee, Cong,
> > >
> > > In the other thread Taehee mentioned the creation of dynamic keys for
> > > net devices that was added recently and that they are subject to some
> > > limits.
> > > syzkaller creates lots of net devices for isolation (several dozens
> > > per test process, but then these can be created and destroyed
> > > periodically). I wonder if it's the root cause of the lockdep limits
> > > problems?
> >
> > Very possibly. In current code base, there are 4 lockdep keys
> > per netdev:
> >
> >         struct lock_class_key   qdisc_tx_busylock_key;
> >         struct lock_class_key   qdisc_running_key;
> >         struct lock_class_key   qdisc_xmit_lock_key;
> >         struct lock_class_key   addr_list_lock_key;
> >
> > so the number of lockdep keys is at least 4x number of network
> > devices.
>
> And these are not freed/reused, right? So with dynamic keys LOCKDEP
> inherently can't handle prolonged running, only O(1) work?

When netdev interface is removed, these dynamic keys are removed.
But if so many netdev interfaces are existing concurrently
(more than 2000), lockdep will stop because of a lack of keys.
In addition, as far as I know, freeing dynamic lockdep key routine is
slower than creating a new dynamic lockdep key. If there are so many
netdev interface add/delete operations, for a while, there may be no
available lockdep key. At this moment, lockdep will stop.

Thank you
Taehee Yoo

  reply	other threads:[~2020-01-16 15:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  5:51 BUG: MAX_LOCKDEP_CHAINS too low! syzbot
2018-09-28  6:06 ` Dmitry Vyukov
2018-09-28  7:00   ` Peter Zijlstra
2018-09-28  7:56     ` Dmitry Vyukov
2020-01-09 10:59       ` Dmitry Vyukov
2020-01-13 11:11         ` Dmitry Vyukov
2020-01-15 21:53           ` Cong Wang
2020-01-16  5:25             ` Dmitry Vyukov
2020-01-16 15:32               ` Taehee Yoo [this message]
2020-01-16 17:05                 ` Dmitry Vyukov
2020-01-16 15:09             ` Taehee Yoo
2020-01-18 20:41               ` Cong Wang
2020-03-04  8:03                 ` Dmitry Vyukov
2020-03-04 23:19                   ` Cong Wang
2020-01-14  8:43         ` Peter Zijlstra
2020-01-14 10:18           ` Dmitry Vyukov
2019-10-20 23:33 ` syzbot
2020-04-15 18:52   ` Cong Wang
2020-04-15 19:17     ` syzbot

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='CAMArcTXq=nV5kNSdWPgvpMmYXuet9gxZgmxO2JJJ7_T3vLRoRg@mail.gmail.com' \
    --to=ap420073@gmail.com \
    --cc=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=syzbot+aaa6fa4949cc5d9b7b25@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    --cc=xiyou.wangcong@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).