From: Vitaliy Shevtsov <v.shevtsov@maxima.ru>
To: Simona Vetter <simona.vetter@ffwll.ch>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
syzbot+9a8f87865d5e2e8ef57f@syzkaller.appspotmail.com,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Matt Roper" <matthew.d.roper@intel.com>,
"Michel Dänzer" <michel.daenzer@amd.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org, stable@vger.kernel.org
Subject: Re: [PATCH] drm/vblank: fix misuse of drm_WARN in drm_wait_one_vblank()
Date: Sat, 11 Jan 2025 04:37:53 +0000 [thread overview]
Message-ID: <20250111043753.b4407fcd52413ca37ed80ce9@maxima.ru> (raw)
In-Reply-To: <Z4Fy04u7RjaZIsqI@phenom.ffwll.local>
On Fri, 10 Jan 2025 20:19:47 +0100
Simona Vetter <simona.vetter@ffwll.ch> wrote:
> Hm, unless a drivers vblank handling code is extremely fun, there should
> be absolutely no memory allocations or user copies in there at all. Hence
> I think you're papering over a real bug here. The vblank itself should be
> purely a free-wheeling hrtimer, if those stop we have serious kernel bug
> at our hands.
>
> Which wouldn't be a big surprise, because we've fixed a _lot_ of bugs in
> vkms' vblank and page flip code, it's surprisingly tricky.
>
> Iow, what kind of memory allocation is holding up vkms vblanks?
>
> Cheers, Sima
>
I don't think this is because of memory allocation. As far as I can see
there is no memory allocation in vblanks handling. Okay, there is a kzalloc()
call in vkms_atomic_crtc_reset() without checking a pointer but this is
not the root cause of this issue. My first thought was that somehow a
vblank might not be successfully processed by drm_crtc_handle_vblank() in
vkms_vblank_simulate() function which always returns HRTIMER_RESTART even
if a vblank handling failed. But this hypothesis was not confirmed -
all vblanks are fine. The hrtimers in vkms have a hardcoded framedur
value of 16ms and what I can see is that the fault injection creates
some delays by unwinding the call stack when it simulates an allocation
failure and this caused the hrtimers to lag. This what I was able to
investigate while I was debugging the kernel in the gdb.
A similar issue was being discussed in
https://lore.kernel.org/linux-kernel//0000000000009cd8d505bd545452@google.com/T/
--
Vitaliy Shevtsov <v.shevtsov@maxima.ru>
next prev parent reply other threads:[~2025-01-10 23:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 16:49 Vitaliy Shevtsov
2025-01-10 19:19 ` Simona Vetter
2025-01-11 4:37 ` Vitaliy Shevtsov [this message]
2025-01-13 9:47 ` Jani Nikula
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=20250111043753.b4407fcd52413ca37ed80ce9@maxima.ru \
--to=v.shevtsov@maxima.ru \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.d.roper@intel.com \
--cc=michel.daenzer@amd.com \
--cc=mripard@kernel.org \
--cc=simona.vetter@ffwll.ch \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=syzbot+9a8f87865d5e2e8ef57f@syzkaller.appspotmail.com \
--cc=tzimmermann@suse.de \
/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®