[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] QEMU question: is eventfd not thread safe?
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] QEMU question: is eventfd not thread safe? |
Date: |
Sun, 01 Jul 2012 17:03:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Il 01/07/2012 16:46, Alexey Kardashevskiy ha scritto:
> On 01/07/12 23:40, Alexey Kardashevskiy wrote:
>> On 01/07/12 23:32, Paolo Bonzini wrote:
>>> Il 01/07/2012 13:06, Alexey Kardashevskiy ha scritto:
>>>> Doing MSI init stuff, QEMU-VFIO calls the same event_notifier_init()
>>>> (returns recycled fd=XX what is correct but confuses) and
>>>> qemu_set_fd_handler() which adds a handler but select() does not pick
>>>> it up.
>>>
>>> This sounds like a missing qemu_notify_event(). There was a recent
>>> thread on a similar problem with block/iscsi.c.
>>
>>
>> Oh, right, that helps too when place in qemu_set_fd_handler2().
>
>
> Like this. Right place?
Yes, please resend as a toplevel message (i.e. not deep in a thread)
with my Reviewed-by.
Paolo
>
>
> ---
> iohandler.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/iohandler.c b/iohandler.c
> index 3c74de6..dea4355 100644
> --- a/iohandler.c
> +++ b/iohandler.c
> @@ -77,6 +77,7 @@ int qemu_set_fd_handler2(int fd,
> ioh->fd_write = fd_write;
> ioh->opaque = opaque;
> ioh->deleted = 0;
> + qemu_notify_event();
> }
> return 0;
> }
>
Re: [Qemu-devel] QEMU question: is eventfd not thread safe?, Benjamin Herrenschmidt, 2012/07/01
Re: [Qemu-devel] QEMU question: is eventfd not thread safe?, Paolo Bonzini, 2012/07/01
- Re: [Qemu-devel] QEMU question: is eventfd not thread safe?, Alexey Kardashevskiy, 2012/07/01
- Re: [Qemu-devel] [PATCH] eventfd: making it rhread safe, Michael S. Tsirkin, 2012/07/18
- [Qemu-devel] [PATCH] eventfd: making it thread safe, Alexey Kardashevskiy, 2012/07/18
- Re: [Qemu-devel] [PATCH] eventfd: making it thread safe, Michael S. Tsirkin, 2012/07/18
- Re: [Qemu-devel] [PATCH] eventfd: making it thread safe, Alexey Kardashevskiy, 2012/07/18
[Qemu-devel] [PATCH] eventfd: making it thread safe, Alexey Kardashevskiy, 2012/07/18