qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Jan Kiszka <jan.kiszka@web.de>,
	qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <4AE6B1FB.6040609@redhat.com> (raw)
In-Reply-To: <20091027074615.GA28426@amit-x200.redhat.com>

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	other threads:[~2009-10-27  8:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 13:01 [Qemu-devel] [PATCH v2 0/3] Send out OPENED events only on chardev open Amit Shah
2009-10-07 13:01 ` [Qemu-devel] [PATCH v2 1/3] char: check for initial_reset_issued unnecessary Amit Shah
2009-10-07 13:01   ` [Qemu-devel] [PATCH v2 2/3] char: rename CHR_EVENT_RESET to CHR_EVENT_OPENED Amit Shah
2009-10-07 13:01     ` [Qemu-devel] [PATCH v2 3/3] char: emit the OPENED event only when a new char connection is opened Amit Shah
2009-10-24 10:36       ` [Qemu-devel] " Jan Kiszka
2009-10-26  3:53         ` Amit Shah
2009-10-26  7:40           ` Jan Kiszka
2009-10-26  9:28             ` Amit Shah
2009-10-26 20:15               ` Jan Kiszka
2009-10-27  7:46                 ` Amit Shah
2009-10-27  8:40                   ` Kevin Wolf [this message]
2009-10-27  9:20                     ` Amit Shah
2009-10-27 14:04                       ` Anthony Liguori
2009-10-27 14:14                         ` Amit Shah
2009-10-27 14:22                         ` Kevin Wolf

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=4AE6B1FB.6040609@redhat.com \
    --to=kwolf@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=jan.kiszka@web.de \
    --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).