[RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures

Paolo Bonzini posted 4 patches 4 years, 1 month ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200406191320.13371-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Stefan Weil <sw@weilnetz.de>, Fam Zheng <fam@euphon.net>, Stefan Hajnoczi <stefanha@redhat.com>
There is a newer version of this series
docs/devel/atomics.rst | 385 +++++++++++++++++++++++++++++++++++++++
docs/devel/atomics.txt | 403 -----------------------------------------
docs/devel/index.rst   |   1 +
docs/devel/rcu.txt     |   4 +-
util/aio-posix.c       |   9 +-
util/aio-win32.c       |   8 +-
util/async.c           |  12 +-
7 files changed, 413 insertions(+), 409 deletions(-)
create mode 100644 docs/devel/atomics.rst
delete mode 100644 docs/devel/atomics.txt
[RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures
Posted by Paolo Bonzini 4 years, 1 month ago
Patch 4 fixes qemu-img and qemu-io hangs on weakly-ordered architectures.
Patch 1-3 are related docs fixes and improvements.

This is RFC because it relies on the iothread being locked during aio_poll
on the main AioContext.  If I add assertions for this however I see a
failure for test 267, so I am posting it as a preview before I debug that.
The doc patches can also go in independently of course.

Paolo

Paolo Bonzini (4):
  atomics: convert to reStructuredText
  atomics: update documentation for C11
  rcu: do not mention atomic_mb_read/set in documentation
  async: use explicit memory barriers

 docs/devel/atomics.rst | 385 +++++++++++++++++++++++++++++++++++++++
 docs/devel/atomics.txt | 403 -----------------------------------------
 docs/devel/index.rst   |   1 +
 docs/devel/rcu.txt     |   4 +-
 util/aio-posix.c       |   9 +-
 util/aio-win32.c       |   8 +-
 util/async.c           |  12 +-
 7 files changed, 413 insertions(+), 409 deletions(-)
 create mode 100644 docs/devel/atomics.rst
 delete mode 100644 docs/devel/atomics.txt

-- 
2.18.2


Re: [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures
Posted by Stefan Hajnoczi 4 years ago
On Mon, Apr 06, 2020 at 03:13:16PM -0400, Paolo Bonzini wrote:
> Patch 4 fixes qemu-img and qemu-io hangs on weakly-ordered architectures.
> Patch 1-3 are related docs fixes and improvements.
> 
> This is RFC because it relies on the iothread being locked during aio_poll
> on the main AioContext.  If I add assertions for this however I see a
> failure for test 267, so I am posting it as a preview before I debug that.
> The doc patches can also go in independently of course.
> 
> Paolo
> 
> Paolo Bonzini (4):
>   atomics: convert to reStructuredText
>   atomics: update documentation for C11
>   rcu: do not mention atomic_mb_read/set in documentation
>   async: use explicit memory barriers
> 
>  docs/devel/atomics.rst | 385 +++++++++++++++++++++++++++++++++++++++
>  docs/devel/atomics.txt | 403 -----------------------------------------
>  docs/devel/index.rst   |   1 +
>  docs/devel/rcu.txt     |   4 +-
>  util/aio-posix.c       |   9 +-
>  util/aio-win32.c       |   8 +-
>  util/async.c           |  12 +-
>  7 files changed, 413 insertions(+), 409 deletions(-)
>  create mode 100644 docs/devel/atomics.rst
>  delete mode 100644 docs/devel/atomics.txt

I have left comments requesting clarifications, but the code change
looks fine:

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>