Re: [PATCH] virtio: console: fix lost wakeup when device is written and polled
From: Lorenz Bauer
Date: Mon Dec 22 2025 - 11:06:01 EST
On Mon, Dec 15, 2025 at 11:49 AM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> Is it always enough to wake up only one waiter? From your
> description it sounds like it might need wake_up_interruptible_all()
> instead, but I may be misunderstanding the issue.
I did some digging into waitqueue semantics. AFAICT
wake_up_interruptible() will wake all non-exclusive waiters, and up to
one exclusive waiter. In our case all waiters are non-exclusive
(ignoring epoll with EPOLLEXCLUSIVE).
I do believe there is a different way to fix this, which is a bit more
elegant. I've sent a v2.
Best
Lorenz