From: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Hillf Danton <hdanton@sina.com>,
David Airlie <airlied@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Gurchetan Singh <gurchetansingh@chromium.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
linux-kernel@vger.kernel.org,
syzbot+1b129b44597a126d2d79@syzkaller.appspotmail.com,
dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev
Subject: Re: [PATCH] drm/virtio: share one vbuf cache across all devices
Date: Sat, 10 Oct 2026 22:04:13 +0700 [thread overview]
Message-ID: <20261010150414.16953-1-ngocthang2710.1999@gmail.com> (raw)
On 27.09.2026, Dmitry Osipenko wrote:
> kmem_cache is used by GPU drivers to avoid kmalloc stalls in a
> latency-sensitive job-submission code path.
Fair, I'll drop the kzalloc()/kfree() v2 and go back to v1's approach
(one cache, created once).
> The /dev/fb reference doesn't sound right as normally removal of
> framebuffers is required before GPU driver can be unbound. Such bug
> reports should be treated as invalid, BTW [1].
I went and checked, and the /dev/fb angle isn't actually load-bearing
here: two virtio-gpu devices at once hit the same WARN at plain boot,
no remove/rescan or held-open fd involved ("-device virtio-gpu-pci"
twice on the QEMU command line). syzbot's repro happened to go through
the hot-unplug path, but the bug is just "a second virtio-gpu device
probes while the first one's cache is still around."
I also owe a correction: my commit message said
kmem_cache_create() fails and the device doesn't probe. That's wrong.
It WARNs and still returns a cache (merged with the existing one), so
the second device probes fine either way -- I'd just never checked
that claim against the actual behavior of kmem_cache_sanity_check().
The real problem is the duplicate name itself (confuses slabtop, per
the comment next to the check), which is what syzbot and any
panic_on_warn setup flag as a crash.
> Assume the similar "duplicated" kmemcache problem should exists if
> there is more than one virtio-gpu device in a system. I suggest you
> to validate this case and if it has the problem, might be better to
> make kmemcache's static instead of creating dynamically.
Confirmed, and agreed -- I'll send a v3 that's v1's static
module-scope cache again, with the commit message fixed and the
two-device case as the primary trigger.
Thanks,
Nguyen Ngoc Thang
next reply other threads:[~2026-10-10 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 15:04 Nguyen Ngoc Thang [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-26 16:24 Nguyen Ngoc Thang
2026-09-27 0:03 ` Hillf Danton
2026-09-27 4:09 ` Nguyen Ngoc Thang
2026-10-09 17:39 ` Dmitry Osipenko
2026-10-14 1:41 ` Hillf Danton
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=20261010150414.16953-1-ngocthang2710.1999@gmail.com \
--to=ngocthang2710.1999@gmail.com \
--cc=airlied@redhat.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=hdanton@sina.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+1b129b44597a126d2d79@syzkaller.appspotmail.com \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
/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®