[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/7] device-core: use RCU for list of childs of a bus
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v2 3/7] device-core: use RCU for list of childs of a bus |
Date: |
Wed, 27 May 2020 15:45:39 +0100 |
On Mon, May 11, 2020 at 07:09:47PM +0300, Maxim Levitsky wrote:
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index d87d989e72..ef47cb2d9c 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -3,6 +3,8 @@
>
> #include "qemu/queue.h"
> #include "qemu/bitmap.h"
> +#include "qemu/rcu.h"
> +#include "qemu/rcu_queue.h"
> #include "qom/object.h"
> #include "hw/hotplug.h"
> #include "hw/resettable.h"
> @@ -230,6 +232,7 @@ struct BusClass {
> };
>
> typedef struct BusChild {
> + struct rcu_head rcu;
> DeviceState *child;
> int index;
> QTAILQ_ENTRY(BusChild) sibling;
Please add a doc comment to struct BusState saying the children field is
an RCU QTAILQ and writers must hold the QEMU global mutex.
Stefan
signature.asc
Description: PGP signature
- [PATCH v2 0/7] RFC/WIP: Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread, Maxim Levitsky, 2020/05/11
- [PATCH v2 1/7] scsi/scsi_bus: switch search direction in scsi_device_find, Maxim Levitsky, 2020/05/11
- [PATCH v2 2/7] Implement drain_call_rcu and use it in hmp_device_del, Maxim Levitsky, 2020/05/11
- [PATCH v2 3/7] device-core: use RCU for list of childs of a bus, Maxim Levitsky, 2020/05/11
- Re: [PATCH v2 3/7] device-core: use RCU for list of childs of a bus,
Stefan Hajnoczi <=
- [PATCH v2 4/7] device-core: use atomic_set on .realized property, Maxim Levitsky, 2020/05/11
- [PATCH v2 5/7] virtio-scsi: don't touch scsi devices that are not yet realized or about to be un-realized, Maxim Levitsky, 2020/05/11
- [PATCH v2 6/7] scsi: Add scsi_device_get, Maxim Levitsky, 2020/05/11
- [PATCH v2 7/7] virtio-scsi: use scsi_device_get, Maxim Levitsky, 2020/05/11
- Re: [PATCH v2 0/7] RFC/WIP: Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread, no-reply, 2020/05/11