[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transa
From: |
Greg Kurz |
Subject: |
Re: [RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transaction |
Date: |
Tue, 30 Mar 2021 12:29:32 +0200 |
On Mon, 29 Mar 2021 18:24:40 +0100
Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Thu, Mar 25, 2021 at 04:07:31PM +0100, Greg Kurz wrote:
> > diff --git a/softmmu/memory.c b/softmmu/memory.c
> > index 1b1942d521cc..0279e5671bcb 100644
> > --- a/softmmu/memory.c
> > +++ b/softmmu/memory.c
> > @@ -2368,7 +2368,7 @@ void memory_region_add_eventfd_full(MemoryRegion *mr,
> > if (size) {
> > adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE);
> > }
> > - if (transaction) {
> > + if (!transaction) {
> > memory_region_transaction_begin();
> > }
> > for (i = 0; i < mr->ioeventfd_nb; ++i) {
> > @@ -2383,7 +2383,7 @@ void memory_region_add_eventfd_full(MemoryRegion *mr,
> > sizeof(*mr->ioeventfds) * (mr->ioeventfd_nb-1 - i));
> > mr->ioeventfds[i] = mrfd;
> > ioeventfd_update_pending |= mr->enabled;
> > - if (transaction) {
> > + if (!transaction) {
> > memory_region_transaction_commit();
> > }
>
> Looks like these two hunks belong in a previous patch.
And they are actually wrong... we *do* want a nested
transaction if 'transaction' is true :) This is a
leftover I thought I had removed but obviously not...
pgphiMTDCcXPO.pgp
Description: OpenPGP digital signature
- Re: [RFC 1/8] memory: Allow eventfd add/del without starting a transaction, (continued)
[RFC 2/8] virtio: Introduce virtio_bus_set_host_notifiers(), Greg Kurz, 2021/03/25
[RFC 3/8] virtio: Add API to batch set host notifiers, Greg Kurz, 2021/03/25
[RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transaction, Greg Kurz, 2021/03/25
[RFC 5/8] virtio-blk: Fix rollback path in virtio_blk_data_plane_start(), Greg Kurz, 2021/03/25
[RFC 6/8] virtio-blk: Use virtio_bus_set_host_notifiers(), Greg Kurz, 2021/03/25
[RFC 7/8] virtio-scsi: Set host notifiers and callbacks separately, Greg Kurz, 2021/03/25
[RFC 8/8] virtio-scsi: Use virtio_bus_set_host_notifiers(), Greg Kurz, 2021/03/25
Re: [RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci, Michael S. Tsirkin, 2021/03/25