qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 3/5] iohandlers: Allow each iohandler to be enab


From: Amit Shah
Subject: [Qemu-devel] Re: [PATCH 3/5] iohandlers: Allow each iohandler to be enabled/disabled individually
Date: Thu, 13 Jan 2011 19:48:31 +0530
User-agent: Mutt/1.5.21 (2010-09-15)

On (Thu) Jan 13 2011 [15:08:51], Gerd Hoffmann wrote:
> On 01/13/11 15:00, Amit Shah wrote:
> >On (Thu) Jan 13 2011 [14:55:25], Gerd Hoffmann wrote:
> >>On 01/13/11 14:00, Amit Shah wrote:
> >>>  {
> >>>-    return assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, 
> >>>opaque);
> >>>+    assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, opaque);
> >>>+    set_read_poll_fd_action(fd, true);
> >>>+    set_read_fd_action(fd, true);
> >>>+    set_write_fd_action(fd, true);
> >>>+    return 0;
> >>>  }
> >>
> >>I'd suggest to move the *action calls into assign_fd_handlers() so
> >>the handlers default to being enabled in all cases.  This should
> >>match what most users need and thus minimize the number of *_action
> >>calls needed.
> >
> >What may happen with that is the fd may get select()-ed for an operation
> >that it didn't want to be put on the queue for.
> 
> I can't see such a race window given that most qemu code runs
> serialized anyway.  If you call assign_fd_handlers() +
> set_write_fd_action(false) in sequence I can't see how a select call
> can happen inbetween ...

Not today, but later when we have threads doing this stuff?  Should I
just leave a comment to take care of this for later?

                Amit



reply via email to

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