public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: KVM list <kvm@vger.kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Carsten Otte <cotte@de.ibm.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [RFC/PATCH] virtio-console: wait for console ports
Date: Thu, 22 Sep 2011 17:00:48 +0530	[thread overview]
Message-ID: <20110922113048.GE3105@amit-x200.redhat.com> (raw)
In-Reply-To: <4E7B19E7.2090602@de.ibm.com>

On (Thu) 22 Sep 2011 [13:20:07], Christian Borntraeger wrote:
> On 22/09/11 12:08, Amit Shah wrote:
> >> +	/* If there was an early virtio console, assume that there are no
> >> +	 * other consoles. We need to wait until the hvc_alloc matches the
> >> +	 * hvc_instantiate, otherwise tty_open will complain, resulting in
> >> +	 * a "Warning: unable to open an initial console" boot failure.
> >> +	 * Without multiport this is done in add_port above. With multiport
> >> +	 * this might take some host<->guest communication - thus we have to
> >> +	 * wait. */
> > 
> > This file uses comments in the form
> >   /*
> >    * ...
> >    */
> 
> Will fix.
> 
> > 
> >> +	if (multiport && early)
> >> +		wait_for_completion(&port_added);
> >> +
> > 
> > Can there be a problem to not timeout this wait?  Maybe it's not a
> > real problem; just thinking out aloud.
> 
> I had the same thoughts. I then asked myself, how big the timeout has to be - and
> the answer was it really depends on the host load. So we can certainly use
> wait_for_completion_timeout(&port_added, HZ*<x>);
> which will work in 99.9% of all cases. It might still cause spurious boot failures,
> if for some reasons it takes too long.

Yes; there's no deterministic way.

> So the big question is, is there a case were virtio is used as an early console
> but virtio_console does not register a console during probe. Ideas?

Currently only ppc and s390 use early_console.  And since you're
sending this patch now, I guess you've started using multiport in the
host recently.  So it's really upto you to decide :-)  I think this is
benign as of now.

		Amit

  reply	other threads:[~2011-09-22 11:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21 15:52 [RFC/PATCH] virtio-console: wait for console ports Christian Borntraeger
2011-09-22 10:08 ` Amit Shah
2011-09-22 11:20   ` Christian Borntraeger
2011-09-22 11:30     ` Amit Shah [this message]
2011-09-22 12:19       ` [PATCHv2] " Christian Borntraeger

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=20110922113048.GE3105@amit-x200.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.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