[libvirt] [PATCH 02/11] Avoid polling on FDs with no events enabled

Chris Lalancette clalance at redhat.com
Thu Sep 10 09:35:53 UTC 2009


Chris Lalancette wrote:
> Daniel Veillard wrote:
>> On Mon, Aug 24, 2009 at 09:51:05PM +0100, Daniel P. Berrange wrote:
>>> If a file descriptor with events=0 was added to the libvirtd
>>> event loop, it would still be added to the poll() fds' array.
>>> While it wouldn't see any POLLIN/OUT events, it'd still get
>>> triggered for HANGUP/ERROR events which was not in compliance
>>> with the libvirt events API contract.
>>   Independantly of the rest of the stream patches this sounds fine to
>> push,
> 
> Hm, this patch seems to be causing a regression.  If I start up a KVM guest, let
> it completely boot, then run "shutdown -h now" inside the guest, the guest
> properly shuts down and qemu-kvm exits.  However, it is never removed from the
> list of "active" guests (i.e. it shows up in "virsh list"), and the state is set
> to "no state".  Reverting just this patch fixes the issue.  I'll look at it some
> more to try to figure out what is happening, but we might want to revert it for
> the time being (since we don't technically need it at the moment).

OK, danpb pointed out the problem.  Don't revert this patch, I'll post a follow
up to fix the problem in a couple of minutes.

-- 
Chris Lalancette




More information about the libvir-list mailing list