qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Remy NOEL <remy.noel@blade-group.com>, qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	Fam Zheng <famz@redhat.com>, Stefan Weil <sw@weilnetz.de>,
	"open list:Block I/O path" <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [QEMU-devel][PATCH v3] aio-posix: Fix concurrent aio_poll/set_fd_handler.
Date: Wed, 19 Dec 2018 20:32:01 +0100	[thread overview]
Message-ID: <a8813976-fe90-a77a-d75b-0201300ae6ab@redhat.com> (raw)
In-Reply-To: <5e90fbad-578a-5f0a-7c6d-e06dae7ba8a3@blade-group.com>

On 19/12/18 17:29, Remy NOEL wrote:
>>
>>
>>>                  atomic_read(&ctx->poll_disable_cnt) +
>>> poll_disable_change);
>>>   -    aio_epoll_update(ctx, node, is_new);
>>> +    if (new_node) {
>>> +        aio_epoll_update(ctx, new_node, is_new);
>>> +    }
>>>       qemu_lockcnt_unlock(&ctx->list_lock);
>>>       aio_notify(ctx);
>> ... so I think this should be "if (node || new_node)"?
> 
> Well, currently, when an AioHandler is removed, we do not change
> node->pdf.events (only revents).
> 
> Therefore a call to aio_epoll_update on node will only result in a call
> to epoll_ctl with EPOLL_CTL_MOD and the same event, which seems kinda
> pointless.
> 
> we may set node->pfd.events to 0 to unregister the file descriptor, but
> this would change the behavior compared to current handling of node
> deletion if i'm not mistaken.

You found another bug then. :)

Paolo

  reply	other threads:[~2018-12-19 19:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 16:48 [Qemu-devel] [QEMU-devel][PATCH v3] aio-posix: Fix concurrent aio_poll/set_fd_handler remy.noel
2018-12-18 14:14 ` Stefan Hajnoczi
2018-12-19 16:36   ` Remy NOEL
2018-12-18 15:32 ` Stefan Hajnoczi
2018-12-18 17:39 ` Paolo Bonzini
2018-12-19 16:29   ` Remy NOEL
2018-12-19 19:32     ` Paolo Bonzini [this message]
2018-12-20  9:35       ` Remy NOEL

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=a8813976-fe90-a77a-d75b-0201300ae6ab@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=remy.noel@blade-group.com \
    --cc=stefanha@redhat.com \
    --cc=sw@weilnetz.de \
    /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).