qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH v2 3/3] char: emit the OPENED event only whe


From: Kevin Wolf
Subject: Re: [Qemu-devel] Re: [PATCH v2 3/3] char: emit the OPENED event only when a new char connection is opened
Date: Tue, 27 Oct 2009 09:40:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3

Am 27.10.2009 08:46, schrieb Amit Shah:
> On (Mon) Oct 26 2009 [21:15:57], Jan Kiszka wrote:
>>>>> However, with the qcow2 synchronous patch, the monitor prompt doesn't
>>>>> come up again -- which shows there is a problem with the way the bhs
>>>>> work and also the initial resets.
>>>> Then the qcow2 patch is already in? At least applying your patch doesn't
>>>> change the picture.
>>>
>>> Yeah; that patch went in just before my patches. Can you try reverting
>>>
>>> ef845c3bf421290153154635dc18eaa677cecb43
>>
>> Makes no difference either - but it also does not touch any code that
>> code impact the open/reset signaling.
> 
> What happens is the BHs that are run get run in a different order.
> 
> Let me explain the two scenarios:
> 
> 1. Current qemu tree, plus my patch to fix this issue that's in
> Anthony's queue plus reverting the qcow2 patch -- the monitor prompt
> appears fine.

Try it with no disk or with a disk in a format other than qcow2. It's
still broken. With a qcow2 image (and the qcow2 patch reverted), two
bugs just cancel each other out.

If you really need to run BHs during initialization (which doesn't
really sound like the clean solution), call qemu_bh_poll() manually.

> 2. Current qemu tree plus my patch from Anthony's queue - the monitor
> prompt doesn't appear.
> 
> The difference is in the order the BHs are scheduled. In the case
> without the qcow2 patch, the bhs get scheduled early on and results in
> initial_reset_issued getting set. Later, when the char devs are
> initialsed, the OPENED event is sent out.
> 
> In the case with the qcow2 patch, the bhs are run in a different order
> -- the bhs are scheduled but not run, and when the char init happens,
> the condition
> 
> if (s->bh == NULL)
> 
> is false and the bhs in effect get scheduled only once, not emitting the
> opened event.
> 
> Of course, the qcow2 patch just causes some conditions for the bh
> handling to happen differently which I've not examined yet. I just
> tracked why this was happening.
> 
> All that said, I'm ok with reverting that patch now till I find some
> kind of a solution to this.

Which patch do you want to revert? You're aware that the qcow2 patch is
a data corruption fix?

Kevin




reply via email to

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