From: Amit Shah <amit.shah@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu list <qemu-devel@nongnu.org>, Paul Brook <paul@codesourcery.com>
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 [thread overview]
Message-ID: <20110113141830.GF19434@amit-x200.redhat.com> (raw)
In-Reply-To: <4D2F0773.8060604@redhat.com>
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
next prev parent reply other threads:[~2011-01-13 14:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 13:00 [Qemu-devel] [PATCH 0/5] iohandlers: Add support for enabling/disabling individual handlers Amit Shah
2011-01-13 13:00 ` [Qemu-devel] [PATCH 1/5] iohandlers: Avoid code duplication Amit Shah
2011-01-13 13:00 ` [Qemu-devel] [PATCH 2/5] iohandlers: Introduce assign_fd_handlers() and remove_fd_handlers Amit Shah
2011-01-13 13:59 ` [Qemu-devel] " Gerd Hoffmann
2011-01-13 14:10 ` Amit Shah
2011-01-13 13:00 ` [Qemu-devel] [PATCH 3/5] iohandlers: Allow each iohandler to be enabled/disabled individually Amit Shah
2011-01-13 13:55 ` [Qemu-devel] " Gerd Hoffmann
2011-01-13 14:00 ` Amit Shah
2011-01-13 14:08 ` Gerd Hoffmann
2011-01-13 14:18 ` Amit Shah [this message]
2011-01-13 14:53 ` Gerd Hoffmann
2011-01-13 13:00 ` [Qemu-devel] [PATCH 4/5] iohandlers: Enable an iohandler only if the associated handler exists Amit Shah
2011-01-13 13:00 ` [Qemu-devel] [PATCH 5/5] iohandlers: Add IOHandlerOps struct Amit Shah
2011-01-13 14:02 ` [Qemu-devel] " Gerd Hoffmann
2011-01-13 14:09 ` Amit Shah
2011-01-13 14:04 ` [Qemu-devel] Re: [PATCH 0/5] iohandlers: Add support for enabling/disabling individual handlers Gerd Hoffmann
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=20110113141830.GF19434@amit-x200.redhat.com \
--to=amit.shah@redhat.com \
--cc=kraxel@redhat.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/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).