Skip to contentSkip to conversation

khvcd

PATCH In review Dave Jones 3 participants 3 messages Aug 16, 2007 – Aug 17, 2007 Char and misc drivers

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Hi Rusty,
In profiling bootup time, we noticed something new appeared
on the graph at http://pjones.fedorapeople.org/bootchart-preinit.png
in the name of khvcd.

"wtf is this" was my first reaction.
Followed shortly by much headscratching after finding it's created by drivers/char/hvc_console.c whose Kconfig yeilds..

config HVC_DRIVER
bool
help
Users of pSeries machines that want to utilize the hvc console front-end module for their backend console driver should select this option.

Which is a little confusing for those of us not actually using a pSeries. The above profile came from a x86 box.
A little more grepping around revealed that lguest select's HVC_DRIVER, thus sneaking this config option into the build.

asides from the needed Kconfig clarification, is it necessary for khvcd to run at all if the lguest module hasn't been loaded ? Is it possible we can somehow delay creation of the kthread ?

Dave

Signature · 1 line
http://www.codemonkey.org.uk
#1 lore raw

PATCH 1/1 Only initialize hvc_console if needed, cleanup Kconfig help

Quoted 3 lines · Dave Jones

asides from the needed Kconfig clarification, is it necessary for khvcd to run at all if the lguest module hasn't been loaded ? Is it possible we can somehow delay creation of the kthread ?

It's for lguest guests, so it kind of needs to be built-in. But yes, it should be made to suck less. Xen will want it too.

How's this?
==
This changes hvc_init() to be called only when someone actually uses the hvc_console driver.

hvc_console used to only be for Power aka pSeries: now lguest and Xen both want it built-in in case the kernel is a guest under one of those, even though usually it will be a native boot.

drivers/char/Kconfig +4 -4
diff -r 0730da2377be drivers/char/Kconfig
@@ -568,10 +568,10 @@ config HVC_DRIVER
 config HVC_DRIVER
 	bool
 	help
-	  Users of pSeries machines that want to utilize the hvc console front-end
-	  module for their backend console driver should select this option.
-	  It will automatically be selected if one of the back-end console drivers
-	  is selected.
+	  Generic "hypervisor virtual console" infrastructure for various
+	  hypervisors (pSeries, Xen, lguest).
+	  It will automatically be selected if one of those back-end
+	  console drivers is selected.
 
 
 config HVC_CONSOLE
drivers/char/hvc_console.c +45 -21

103 lines not on this page · raw message

#2 lore raw

Re: [PATCH] Only initialize hvc_console if needed, cleanup Kconfig help

Quoted 5 lines · On Fri, 17 Aug 2007 11:25:46 +1000 Rusty Russell <[email protected]> wrote:

diff -r 0730da2377be drivers/char/Kconfig

drivers/char/Kconfig config HVC_DRIVER · line 572

Quoted 9 lines
drivers/char/Kconfig +2 -4
@@ -568,10 +568,10 @@ config HVC_DRIVER
 config HVC_DRIVER
 	bool
 	help
-	  Users of pSeries machines that want to utilize the hvc console front-end
-	  module for their backend console driver should select this option.
-	  It will automatically be selected if one of the back-end console drivers
-	  is selected.
+	  Generic "hypervisor virtual console" infrastructure for various
+	  hypervisors (pSeries, Xen, lguest).
                      ^^^^^^^^^^^^^^^^^^^^^^^

You left out iSeries. Probably better to just not enumerate them as they may increase over time.

Otherwise looks good (though I haven't actually built/booted it).

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/