From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org,
alex williamson <alex.williamson@redhat.com>,
borntraeger@de.ibm.com, felipe@nutanix.com
Subject: Re: [Qemu-devel] [PATCH 2/3] virtio: access ISR atomically
Date: Thu, 17 Nov 2016 14:49:58 -0500 (EST) [thread overview]
Message-ID: <28571590.170644.1479412198176.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20161117195511-mutt-send-email-mst@kernel.org>
----- Original Message -----
> From: "Michael S. Tsirkin" <mst@redhat.com>
> To: "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: qemu-devel@nongnu.org, "alex williamson" <alex.williamson@redhat.com>, borntraeger@de.ibm.com, felipe@nutanix.com
> Sent: Thursday, November 17, 2016 6:55:50 PM
> Subject: Re: [PATCH 2/3] virtio: access ISR atomically
>
> On Wed, Nov 16, 2016 at 07:05:50PM +0100, Paolo Bonzini wrote:
> > @@ -1318,10 +1318,18 @@ void virtio_del_queue(VirtIODevice *vdev, int n)
> > vdev->vq[n].vring.num_default = 0;
> > }
> >
> > +static void virtio_set_isr(VirtIODevice *vdev, int value)
> > +{
> > + uint8_t old = atomic_read(&vdev->isr);
> > + if ((old & value) != value) {
> > + atomic_or(&vdev->isr, value);
> > + }
> > +}
> > +
>
> Paolo, can you pls comment on why is it done like this,
> as opposed to a single atomic_or?
To avoid cacheline bouncing in the common case where MSI is active
but the host doesn't read ISR.
Paolo
next prev parent reply other threads:[~2016-11-17 19:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 18:05 [Qemu-devel] [PATCH v2 for-2.8 0/3] virtio fixes Paolo Bonzini
2016-11-16 18:05 ` [Qemu-devel] [PATCH 1/3] virtio: introduce grab/release_ioeventfd to fix vhost Paolo Bonzini
2016-11-17 5:27 ` Alexey Kardashevskiy
2016-11-17 8:36 ` Cornelia Huck
2016-11-18 8:15 ` Christian Borntraeger
2016-11-18 14:23 ` Michael S. Tsirkin
2016-11-16 18:05 ` [Qemu-devel] [PATCH 2/3] virtio: access ISR atomically Paolo Bonzini
2016-11-17 17:55 ` Michael S. Tsirkin
2016-11-17 19:49 ` Paolo Bonzini [this message]
2016-11-17 22:33 ` Michael S. Tsirkin
2016-11-18 8:09 ` Paolo Bonzini
2016-11-16 18:05 ` [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications Paolo Bonzini
2016-11-16 20:15 ` Michael S. Tsirkin
2016-11-16 20:38 ` Paolo Bonzini
2016-11-16 20:39 ` Michael S. Tsirkin
2016-11-16 21:05 ` Paolo Bonzini
2016-11-16 21:20 ` Michael S. Tsirkin
2016-11-17 9:04 ` Paolo Bonzini
2016-11-17 16:58 ` Michael S. Tsirkin
2016-11-17 10:44 ` Stefan Hajnoczi
2016-11-16 18:50 ` [Qemu-devel] [PATCH v2 for-2.8 0/3] virtio fixes no-reply
-- strict thread matches above, loose matches on Subject: below --
2016-11-15 13:46 [Qemu-devel] [PATCH " Paolo Bonzini
2016-11-15 13:46 ` [Qemu-devel] [PATCH 2/3] virtio: access ISR atomically Paolo Bonzini
2016-11-15 15:03 ` Christian Borntraeger
2016-11-15 15:04 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28571590.170644.1479412198176.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=felipe@nutanix.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.