qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] main-loop: Use epoll on Linux


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] main-loop: Use epoll on Linux
Date: Mon, 29 Sep 2014 11:28:21 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Sep 29, 2014 at 01:26:29PM +0800, Fam Zheng wrote:
> +int qemu_epoll(GPollFD *fds, guint nfds, int64_t timeout)
> +{
> +    /* A copy of last fd array, used to skip epoll_prepare when nothing
> +     * changed. */
> +    static GPollFD *last_fds;
> +    static guint last_nfds;
> +    /* An array of fds that failed epoll_ctl and fall back to ppoll. Rare 
> case
> +     * too.  */
> +    static GPollFD *g_poll_fds;
> +    static guint g_poll_nfds;
> +    static int *g_poll_fd_idx;
> +    static int epollfd = -1;

These static variables will suffer from race conditions since IOThread
AioContext also calls qemu_poll_ns() when dataplane is active.

Stefan

Attachment: pgpE4WHNVABZs.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]