qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] do not use aio_context_acquire/release in AIO-based drivers
@ 2017-02-22 18:07 Paolo Bonzini
  2017-02-22 18:07 ` [Qemu-devel] [PATCH 1/3] curl: do not use aio_context_acquire/release Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Paolo Bonzini @ 2017-02-22 18:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, jcody, qemu-block

aio_context_acquire/release are only going away as soon as the block layer
becomes thread-safe, but we can already move away to other finer-grained
mutex whenever possible.

These three drivers don't use coroutines, hence a QemuMutex is a fine
primitive to use for protecting any per-BDS data in the libraries
they use.  The QemuMutex must protect any fd handlers or bottom halves,
and also the BlockDriver callbacks which were implicitly being called
under aio_context_acquire.

Paolo

v1->v2: missing unlock in error paths (patch 2, Stefan)

Paolo Bonzini (3):
  curl: do not use aio_context_acquire/release
  nfs: do not use aio_context_acquire/release
  iscsi: do not use aio_context_acquire/release

 block/curl.c  | 24 ++++++++++-------
 block/iscsi.c | 83 +++++++++++++++++++++++++++++++++++++++++++++--------------
 block/nfs.c   | 23 ++++++++++++++---
 3 files changed, 98 insertions(+), 32 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 0/3] do not use aio_context_acquire/release in AIO-based drivers
@ 2017-02-17 19:40 Paolo Bonzini
  2017-02-17 19:40 ` [Qemu-devel] [PATCH 3/3] iscsi: do not use aio_context_acquire/release Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2017-02-17 19:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, jcody

aio_context_acquire/release are only going away as soon as the block layer
becomes thread-safe, but we can already move away to other finer-grained
mutex whenever possible.

These three drivers don't use coroutines, hence a QemuMutex is a fine
primitive to use for protecting any per-BDS data in the libraries
they use.  The QemuMutex must protect any fd handlers or bottom halves,
and also the BlockDriver callbacks which were implicitly being called
under aio_context_acquire.

Paolo

Paolo Bonzini (3):
  curl: do not use aio_context_acquire/release
  nfs: do not use aio_context_acquire/release
  iscsi: do not use aio_context_acquire/release

 block/curl.c  | 24 ++++++++++-------
 block/iscsi.c | 83 +++++++++++++++++++++++++++++++++++++++++++++--------------
 block/nfs.c   | 20 +++++++++++---
 3 files changed, 95 insertions(+), 32 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-23 10:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-22 18:07 [Qemu-devel] [PATCH v2 0/3] do not use aio_context_acquire/release in AIO-based drivers Paolo Bonzini
2017-02-22 18:07 ` [Qemu-devel] [PATCH 1/3] curl: do not use aio_context_acquire/release Paolo Bonzini
2017-02-22 18:07 ` [Qemu-devel] [PATCH 2/3] nfs: " Paolo Bonzini
2017-02-22 18:07 ` [Qemu-devel] [PATCH 3/3] iscsi: " Paolo Bonzini
2017-02-23 10:34 ` [Qemu-devel] [PATCH v2 0/3] do not use aio_context_acquire/release in AIO-based drivers Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2017-02-17 19:40 [Qemu-devel] [PATCH " Paolo Bonzini
2017-02-17 19:40 ` [Qemu-devel] [PATCH 3/3] iscsi: do not use aio_context_acquire/release Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).