From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: amit.shah@redhat.com, Juan Quintela <quintela@redhat.com>,
qemu-devel@nongnu.org, kraxel@redhat.com
Subject: [Qemu-devel] Re: [PATCHv6 03/11] notifier: event notifier implementation
Date: Fri, 02 Apr 2010 16:53:07 +0200 [thread overview]
Message-ID: <4BB604D3.8060704@redhat.com> (raw)
In-Reply-To: <42665c8da55a0be2287ed67a8350fe6e3e2a1ab8.1268823114.git.mst@redhat.com>
On 03/17/2010 12:07 PM, Michael S. Tsirkin wrote:
> +{
> +#ifdef CONFIG_EVENTFD
> + int fd = eventfd(!!active, EFD_NONBLOCK | EFD_CLOEXEC);
> + uint64_t value;
> + int r = read(e->fd,&value, sizeof(value));
> + if (r == sizeof(value)) {
> + /* restore previous value. */
> + int s = write(e->fd,&value, sizeof(value));
> + /* never blocks because we use EFD_SEMAPHORE.
No, we don't...
Also, it seems like this function as it is written now requires blocking
operation of the eventfd, otherwise it would not be atomic when another
thread calls event_notifier_test_and_clear. Which makes everything more
complicated.
But after all is unused, maybe it should be zapped?
Paolo
next prev parent reply other threads:[~2010-04-02 14:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 11:07 [Qemu-devel] [PATCHv6 00/11] vhost-net: upstream integration Michael S. Tsirkin
2010-03-17 11:07 ` [Qemu-devel] [PATCHv6 01/11] tap: add interface to get device fd Michael S. Tsirkin
2010-04-01 19:17 ` Anthony Liguori
2010-03-17 11:07 ` [Qemu-devel] [PATCHv6 02/11] kvm: add API to set ioeventfd Michael S. Tsirkin
2010-03-17 11:07 ` [Qemu-devel] [PATCHv6 03/11] notifier: event notifier implementation Michael S. Tsirkin
2010-04-02 14:53 ` Paolo Bonzini [this message]
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 04/11] virtio: notifier support + APIs for queue fields Michael S. Tsirkin
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 05/11] virtio: add set_status callback Michael S. Tsirkin
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 06/11] virtio: move typedef to qemu-common Michael S. Tsirkin
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 07/11] virtio-pci: fill in notifier support Michael S. Tsirkin
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 08/11] vhost: vhost net support Michael S. Tsirkin
2010-03-22 20:58 ` Anthony Liguori
2010-03-22 21:11 ` Michael S. Tsirkin
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 09/11] tap: add vhost/vhostfd options Michael S. Tsirkin
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 10/11] tap: add API to retrieve vhost net header Michael S. Tsirkin
2010-03-17 11:08 ` [Qemu-devel] [PATCHv6 11/11] virtio-net: vhost net support Michael S. Tsirkin
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=4BB604D3.8060704@redhat.com \
--to=pbonzini@redhat.com \
--cc=amit.shah@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 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).