[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-char: eliminate busy waiting on can_read r
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-char: eliminate busy waiting on can_read returning zero |
Date: |
Fri, 05 Apr 2013 15:01:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 05/04/2013 14:54, Anthony Liguori ha scritto:
> I guess this works with migration because we assume that after migration
> the main loop will do a complete run?
Yes, migration will terminate in an fd handler, and the next round of
the main loop will re-evaluate chr_read.
> Is this a safe assumption or does
> there need to be a qemu_notify_event() somewhere after migration to make
> sure this doesn't cause a hang?
There could be a qemu_chr_accept_input() for all character devices after
migration. I think that would be a separate patch.
Regarding the need or not for Peter's patch: the patch might be needed
this kind of busy-wait fix was required often. As far as I recall, this
is the first we ever had, and it came after an almost-complete rewrite.
It seems rare enough, that it's much better to fix the root causes when
they appear---not the symptoms.
Paolo