Akihiko Odaki <[email protected]> writes:
> Based-on: <[email protected]>
> ("[PATCH] rcu: Unify force quiescent state")
>
> Unmapping a blob changes the memory map, which is protected with RCU.
> RCU is designed to minimize the read-side overhead at the cost of
> reclamation delay. While this design usually makes sense, it is
> problematic when unmapping a blob because the operation blocks all
> virtio-gpu commands and causes perceivable disruption.
>
> Minimize such the disruption with force_rcu(), which minimizes the
> reclamation delay at the cost of a read-side overhead.
>
> Dmitry, can you see if this change makes difference?
Also works with the blob test:
➜ ./pyvenv/bin/meson test --setup thorough func-aarch64-gpu_blob
ninja: Entering directory `/home/alex/lsrc/qemu.git/builds/all'
[1/6] Generating qemu-version.h with a custom command (wrapped by meson to
capture output)
1/1 qemu:func-thorough+func-aarch64-thorough+thorough / func-aarch64-gpu_blob
OK 0.37s 1 subtests passed
Ok: 1
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Full log written to
/home/alex/lsrc/qemu.git/builds/all/meson-logs/testlog-thorough.txt
🕙17:57:38 alex@draig:qemu.git/builds/all on virtio-gpu/next [$!?]
so a Tested-by: Alex Bennée <[email protected]> from me.
>
> Signed-off-by: Akihiko Odaki <[email protected]>
> ---
> Akihiko Odaki (5):
> futex: Add qemu_futex_timedwait()
> qemu-thread: Add qemu_event_timedwait()
> rcu: Use call_rcu() in synchronize_rcu()
> rcu: Wake the RCU thread when draining
> virtio-gpu: Force RCU when unmapping blob
>
> include/qemu/futex.h | 29 ++++++--
> include/qemu/rcu.h | 1 +
> include/qemu/thread-posix.h | 11 +++
> include/qemu/thread.h | 8 ++-
> hw/display/virtio-gpu-virgl.c | 1 +
> util/event.c | 34 ++++++++--
> util/qemu-thread-posix.c | 11 +--
> util/rcu.c | 153
> ++++++++++++++++++++++++------------------
> 8 files changed, 163 insertions(+), 85 deletions(-)
> ---
> base-commit: ee7fbe81705732785aef2cb568bbc5d8f7d2fce1
> change-id: 20251027-force_rcu-616c743373f7
>
> Best regards,
--
Alex Bennée
Virtualisation Tech Lead @ Linaro