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
pgpng4h2HLULw.pgp
Description: PGP signature