All of lore.kernel.org
 help / color / mirror / Atom feed
* Signals for file descriptors
@ 2008-02-13 12:04 Anders Melchiorsen
  2008-02-13 12:10 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Anders Melchiorsen @ 2008-02-13 12:04 UTC (permalink / raw)
  To: kvm-devel

I am wondering about this commit,

http://git.kernel.org/?p=virt/kvm/kvm-userspace.git;a=commit;h=b4e392c21c4b98c1c13af353caa3d6e6bcb6b8af

which adds signals on tap I/O. It seems a bit half-done to me. For one
thing, it is mixing timers with I/O.

Anyway, my question is about the remaining file descriptors. Should
signals be activated for them as well, for example in
qemu_set_fd_handler2() ? My example on hand is that connecting a VNC
client currently delays until the next timer expiry.


Anders.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Signals for file descriptors
  2008-02-13 12:04 Signals for file descriptors Anders Melchiorsen
@ 2008-02-13 12:10 ` Avi Kivity
  2008-02-13 12:22   ` Anders Melchiorsen
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2008-02-13 12:10 UTC (permalink / raw)
  To: Anders Melchiorsen; +Cc: kvm-devel

Anders Melchiorsen wrote:
> I am wondering about this commit,
>
> http://git.kernel.org/?p=virt/kvm/kvm-userspace.git;a=commit;h=b4e392c21c4b98c1c13af353caa3d6e6bcb6b8af
>
> which adds signals on tap I/O. It seems a bit half-done to me. For one
> thing, it is mixing timers with I/O.
>
>   

The signal handler doesn't actually matter; all that's needed is to 
break out of the loop.

> Anyway, my question is about the remaining file descriptors. Should
> signals be activated for them as well, for example in
> qemu_set_fd_handler2() ? My example on hand is that connecting a VNC
> client currently delays until the next timer expiry.

In practice it doesn't matter, but yes, any fd which we will select() 
needs to have a signal attached.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Signals for file descriptors
  2008-02-13 12:10 ` Avi Kivity
@ 2008-02-13 12:22   ` Anders Melchiorsen
  0 siblings, 0 replies; 3+ messages in thread
From: Anders Melchiorsen @ 2008-02-13 12:22 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel

Avi Kivity <avi@qumranet.com> writes:

> In practice it doesn't matter, but yes, any fd which we will
> select() needs to have a signal attached.

It matters to me, because I am removing periodic timers, and so I
ended up where I could not attach with VNC at all (well, strace would
break the loop).

With your answers in mind, I will prepare a patch to add this.


Thanks,
Anders.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-13 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 12:04 Signals for file descriptors Anders Melchiorsen
2008-02-13 12:10 ` Avi Kivity
2008-02-13 12:22   ` Anders Melchiorsen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.