From: Xin Long <lucien.xin@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Juri Lelli <juri.lelli@redhat.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Antoine Tenart <atenart@kernel.org>,
Clark Williams <williams@redhat.com>
Subject: Re: [PATCH] mm: slub: fix a deadlock warning in kmem_cache_destroy
Date: Wed, 19 Jan 2022 16:38:37 +0800 [thread overview]
Message-ID: <CADvbK_e-ZcX1Y59dC5ms1gy6y=zbpGggrYyLapvsotnJNN815g@mail.gmail.com> (raw)
In-Reply-To: <f8fa28d4-bf89-39f7-92f9-4d7957e57c2c@suse.cz>
On Tue, Jan 18, 2022 at 7:07 PM Vlastimil Babka <vbabka@suse.cz> wrote:
>
>
> On 1/18/22 09:00, Xin Long wrote:
> > On Mon, Jan 17, 2022 at 9:13 PM Juri Lelli <juri.lelli@redhat.com> wrote:
> >> >
> >> > RHEL-8 kernel seems to be 4.18, unless RT uses a newer one. Could be some
> >> > silently relevant backport is missing? How about e.g. 59450bbc12be ("mm,
> >> > slab, slub: stop taking cpu hotplug lock") ?
> >>
> >> Hummm, looks like we have backported commit 59450bbc12be in RHEL-8.
> >>
> >> Xin Long, would you be able to check if you still see the lockdep splat
> >> with latest upstream RT?
> >>
> >> git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.16.y-rt
> > Hi, Juri,
> >
> > Thanks for sharing the RT kernel repo.
> >
> > I just tried with this kernel, and I couldn't reproduce it on my env.
> > But I don't see how the upstream RT kernel can avoid the call trace.
> >
> > As this warning was triggered when the system was shutting down, it might
> > not be reproduced on it due to some timing change.
>
> As it was caught by lockdep and not as a real deadlock, I think it should be
> indepenedent of a timing change. Lockdep will correlate potentially deadlock
> scenarios even if they don't really occur in the same time, AFAIK.
>
> But let's go back to:
>
> > Although cpu_hotplug_lock is a RWSEM, [a] will not block in there. But as
> > lockdep annotations are added for cpu_hotplug_lock, a deadlock warning
> > would be detected:
>
> Is it possible that upstream lockdep handles this RWSEM scenario properly
> and doesn't report it, but the RHEL kernel is missing some relevant lockdep fix?
That's a good point.
I actually think:
cpus_read_lock()
cpus_read_lock()
shouldn't be considered as a deadlock.
I will check the lockdep changes, and it may take some time.
Thanks.
>
> >>
> >> Thanks!
> >> Juri
> >>
>
next prev parent reply other threads:[~2022-01-19 8:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 14:23 [PATCH] mm: slub: fix a deadlock warning in kmem_cache_destroy Xin Long
2022-01-16 6:35 ` Hyeonggon Yoo
2022-01-17 8:32 ` Xin Long
2022-01-17 9:33 ` Sebastian Andrzej Siewior
2022-01-17 12:40 ` Vlastimil Babka
[not found] ` <20220117131304.pdc3mfdowkzovw6q@localhost.localdomain>
2022-01-18 8:00 ` Xin Long
2022-01-18 11:07 ` Vlastimil Babka
2022-01-19 8:38 ` Xin Long [this message]
2022-06-01 14:36 ` Maurizio Lombardi
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='CADvbK_e-ZcX1Y59dC5ms1gy6y=zbpGggrYyLapvsotnJNN815g@mail.gmail.com' \
--to=lucien.xin@gmail.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=atenart@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=williams@redhat.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).