[PATCH 0/3] RFC: few random hacks to improve eventfd fallback path

Maxim Levitsky posted 3 patches 3 years, 4 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201217150040.906961-1-mlevitsk@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Fam Zheng <fam@euphon.net>, Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/virtio-scsi-dataplane.c | 26 +++++++++++++++++++-------
include/qemu/event_notifier.h   |  1 +
util/event_notifier-posix.c     | 16 ++++++++++++++++
3 files changed, 36 insertions(+), 7 deletions(-)
[PATCH 0/3] RFC: few random hacks to improve eventfd fallback path
Posted by Maxim Levitsky 3 years, 4 months ago
These few patches are the result of a random hacking I did to make the qemu
cope with eventfd allocation failure, when using an iothread,
as it happened in bz #1897550.

I am not 100% sure which patches in this series are worth to merge, or if
this can be fixed in a better way.

After this patch series applied, qemu still hangs while running reproducer for
this BZ due to ABBA lock inversion which needs some heavy rework to get rid of.
I explained all the (gory) details in the bugzilla.

This patch series was (lightly) tested with make check, iotests and with
the reproducer.

Best regards,
	Maxim Levitsky

Maxim Levitsky (3):
  scsi: virtio-scsi: don't process IO on fenced dataplane
  virtio-scsi: don't uninitialize queues that we didn't initialize
  event_notifier: handle initialization failure better

 hw/scsi/virtio-scsi-dataplane.c | 26 +++++++++++++++++++-------
 include/qemu/event_notifier.h   |  1 +
 util/event_notifier-posix.c     | 16 ++++++++++++++++
 3 files changed, 36 insertions(+), 7 deletions(-)

-- 
2.26.2



Re: [PATCH 0/3] RFC: few random hacks to improve eventfd fallback path
Posted by Paolo Bonzini 3 years, 3 months ago
On 17/12/20 16:00, Maxim Levitsky wrote:
> These few patches are the result of a random hacking I did to make the qemu
> cope with eventfd allocation failure, when using an iothread,
> as it happened in bz #1897550.
> 
> I am not 100% sure which patches in this series are worth to merge, or if
> this can be fixed in a better way.
> 
> After this patch series applied, qemu still hangs while running reproducer for
> this BZ due to ABBA lock inversion which needs some heavy rework to get rid of.
> I explained all the (gory) details in the bugzilla.
> 
> This patch series was (lightly) tested with make check, iotests and with
> the reproducer.
> 
> Best regards,
> 	Maxim Levitsky
> 
> Maxim Levitsky (3):
>    scsi: virtio-scsi: don't process IO on fenced dataplane
>    virtio-scsi: don't uninitialize queues that we didn't initialize
>    event_notifier: handle initialization failure better
> 
>   hw/scsi/virtio-scsi-dataplane.c | 26 +++++++++++++++++++-------
>   include/qemu/event_notifier.h   |  1 +
>   util/event_notifier-posix.c     | 16 ++++++++++++++++
>   3 files changed, 36 insertions(+), 7 deletions(-)
> 

Queued, thanks.

Paolo


Re: [PATCH 0/3] RFC: few random hacks to improve eventfd fallback path
Posted by Maxim Levitsky 3 years, 3 months ago
On Thu, 2020-12-17 at 17:00 +0200, Maxim Levitsky wrote:
> These few patches are the result of a random hacking I did to make the qemu
> cope with eventfd allocation failure, when using an iothread,
> as it happened in bz #1897550.
> 
> I am not 100% sure which patches in this series are worth to merge, or if
> this can be fixed in a better way.
> 
> After this patch series applied, qemu still hangs while running reproducer for
> this BZ due to ABBA lock inversion which needs some heavy rework to get rid of.
> I explained all the (gory) details in the bugzilla.
> 
> This patch series was (lightly) tested with make check, iotests and with
> the reproducer.
> 
> Best regards,
> 	Maxim Levitsky
> 
> Maxim Levitsky (3):
>   scsi: virtio-scsi: don't process IO on fenced dataplane
>   virtio-scsi: don't uninitialize queues that we didn't initialize
>   event_notifier: handle initialization failure better
> 
>  hw/scsi/virtio-scsi-dataplane.c | 26 +++++++++++++++++++-------
>  include/qemu/event_notifier.h   |  1 +
>  util/event_notifier-posix.c     | 16 ++++++++++++++++
>  3 files changed, 36 insertions(+), 7 deletions(-)
> 
> -- 
> 2.26.2
> 
> 
Any update on this?
Best regards,
	Maxim Levitsky