From: Sasha Levin <levinsasha928@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Pekka Enberg <penberg@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch 0/3] kvm tool: Serial emulation overhaul
Date: Mon, 12 Dec 2011 07:30:36 +0200 [thread overview]
Message-ID: <1323667836.4190.4.camel@lappy> (raw)
In-Reply-To: <20111211155347.GA1297@elte.hu>
On Sun, 2011-12-11 at 16:53 +0100, Ingo Molnar wrote:
> * Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > On Sun, 11 Dec 2011, Ingo Molnar wrote:
>
> > > In theory a kvm driven serial console should be extremely
> > > fast, much faster than a real serial console, basically as
> > > fast as a local console. Yet this still does not seem to be
> > > the case.
> > >
> > > In fact even ssh-ing in to a box over Wifi and running the
> > > above top session is undistinguishable from top running in a
> > > local console. So IMO it cannot be virtualization overhead -
> > > there must still be some delay or serious lack of buffering
> > > somewhere.
> >
> > Well, the difference between ssh and serial is, that ssh can
> > pack 1.5k worth of data into one frame, while serial has to
> > send it piecewise. And the emulation has to trap into kvm tool
> > for each tx byte, which doesnt help either. We cannot do much
> > with buffering on the kvm tool side as we have no clue how
> > much consecutive data will come in. That's why there is a
> > virtual console, which has the disadvantage that you cant see
> > the early boot messages.
>
> Okay, but look at it from another angle: the top output i
> generate is about 300k characters. 5000 msecs to execute it
> means 16 usecs overhead per character - or about 50k cycles - on
> a top of the class x86 CPU.
>
> 50k cycles for every single byte. And as a user i notice that
> first hand.
50k cycles for every single byte is pretty much as good as it will get
with serial console. See slide #5 in Marcelo's KVM Forum 2010
presentation[1] where he timed a heavyweight exit to about 40k cycles.
And I'm not sure we're taking just one of those for each byte...
I'm currently working on a patch which will let you see early boot
prints from the serial console, but switch to the virtio one when it
reaches usermode. This way you can have the best of both worlds: see
early boot and get a fast console when you've reached userspace.
[1]
http://www.linux-kvm.org/wiki/images/e/ea/2010-forum-mtosatti_walkthrough_entry_exit.pdf
--
Sasha.
next prev parent reply other threads:[~2011-12-12 5:31 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-10 13:27 [patch 0/3] kvm tool: Serial emulation overhaul Thomas Gleixner
2011-12-10 13:27 ` [patch 1/3] kvm tool: serial: Cleanup coding style Thomas Gleixner
2011-12-10 13:27 ` [patch 3/3] kvm tool: serial: Fix interrupt handling Thomas Gleixner
2011-12-10 13:27 ` [patch 2/3] kvm tool: serial: Simplify switch cases Thomas Gleixner
2011-12-10 15:17 ` [patch 0/3] kvm tool: Serial emulation overhaul Pekka Enberg
2011-12-10 20:51 ` Thomas Gleixner
2011-12-11 8:15 ` Pekka Enberg
2011-12-11 10:30 ` Ingo Molnar
2011-12-11 10:46 ` Ingo Molnar
2011-12-11 14:04 ` Thomas Gleixner
2011-12-11 15:53 ` Ingo Molnar
2011-12-12 5:30 ` Sasha Levin [this message]
2011-12-12 11:12 ` Ingo Molnar
2011-12-12 11:20 ` Alan Cox
2011-12-12 17:20 ` Ingo Molnar
2011-12-12 18:16 ` Avi Kivity
2011-12-12 18:16 ` Avi Kivity
2011-12-12 21:36 ` Alan Cox
2011-12-13 10:32 ` Avi Kivity
2011-12-12 11:23 ` Cyrill Gorcunov
2011-12-12 17:40 ` Sasha Levin
2011-12-12 17:45 ` Ingo Molnar
2011-12-12 9:42 ` Thomas Gleixner
2011-12-12 11:19 ` Pekka Enberg
2011-12-12 17:20 ` Ingo Molnar
2011-12-12 18:40 ` Pekka Enberg
2011-12-12 19:14 ` Pekka Enberg
2011-12-12 19:21 ` Ingo Molnar
2011-12-13 0:59 ` Thomas Gleixner
2011-12-13 7:03 ` Pekka Enberg
2011-12-13 11:05 ` Alan Cox
2011-12-13 10:58 ` Avi Kivity
2011-12-13 13:52 ` Thomas Gleixner
2011-12-13 14:23 ` Avi Kivity
2011-12-13 14:30 ` Sasha Levin
2011-12-13 14:51 ` Thomas Gleixner
2011-12-13 14:58 ` Avi Kivity
2011-12-12 21:03 ` James Courtier-Dutton
2011-12-12 18:19 ` Avi Kivity
2011-12-12 18:31 ` Pekka Enberg
2011-12-13 10:33 ` Avi Kivity
2011-12-12 10:27 ` Alan Cox
2011-12-12 10:59 ` Sasha Levin
2011-12-12 11:02 ` Alan Cox
2011-12-12 18:21 ` Avi Kivity
2011-12-12 17:21 ` Ingo Molnar
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=1323667836.4190.4.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=tglx@linutronix.de \
/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