Skip to content

accel/tcg: Retry page_check_range() on itree.start inconsistency

Ilya Leoshkevich qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1accel/tcg: Retry page_check_range() on itree.start inconsistencyaccel/tcg/user-exec.c+15 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] accel/tcg: Retry page_check_range() on itree.start inconsistency

Hi,

This is an attempt to improve the vma-pthread test situation sparked by a bug report by wasmtime project. The patch doesn't fix all issues, but it definitely makes things better and I think I understand what particular thread interleaving leads to the issue (details are in the commit message).

There is at least one other thing that I find suspicious about the current code: page_check_range() fetches itree.last twice, and indeed, using qatomic_read() there makes things even better, but still not perfect, and I still cannot clearly elaborate what is the exact interleaving with pageflags_set_clear() that causes a problem there, so I'm not sending that one for now.

Best regards,
Ilya

Ilya Leoshkevich (1):
accel/tcg: Retry page_check_range() on itree.start inconsistency

 accel/tcg/user-exec.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)
Signature · 1 line
2.54.0