From: George Dunlap <George.Dunlap@eu.citrix.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Xen-devel <xen-devel@lists.xensource.com>,
"the arch/x86 maintainers" <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Avi Kivity <avi@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] Re: [GIT PULL] Xen APIC hooks (with io_apic_ops)
Date: Tue, 26 May 2009 13:46:40 +0100 [thread overview]
Message-ID: <de76405a0905260546k56bc866bx1658ec13f65e3eec@mail.gmail.com> (raw)
In-Reply-To: <20090525041057.GD9396@elte.hu>
On Mon, May 25, 2009 at 5:10 AM, Ingo Molnar <mingo@elte.hu> wrote:
> Note that this design problem has been created by Xen,
> intentionally, and Xen is now suffering under those bad technical
> choices made years ago. It's not Linux's problem.
I'd like to respecfully disagree with this. I think I can see your
point of view: you're being asked to make changes to accommodate a
project you're not involved in, and whose fundamental design you
disagree with. And no one disagrees with the stance that changes to
accomodate Xen must not impact native performance. But I think the
current design (with dom0 running linux-as-hypervisor-component) is
the best one, and it's one we would make over again if we had to start
from scratch.
Basically, there are three ways to approach the hypervisor problem wrt Linux:
1. Make Linux into a hypervisor (linux-as-hypervisor). This is the KVM approach.
2. Fork Linux, stealing all the device drivers, and making a
monolithic hypervisor.
3. Make a small, lean hypervisor, but leverage Linux to run the
devices and control stack (linux-as-hypervisor-component).
I've worked a bit at both kernel and hypervisor level (although
admittedly much more in-depth at the hypervisor level). It seems to
me that being a hypervisor is a much different thing than being a
kernel. I don't believe that one piece of software can do both well.
And I believe that, when it begins to mature more, KVM will run into
the very same issue. KVM developers will really want to start to make
the kernel into a hypervisor, and there will be a disagreement between
those who want the kernel to be just a kernel, and those who want the
kernel also to be a hypervisor. The result will be either a heavily
modified Linux (much more than linux-as-hypervisor-component) or a
really sucky hypervisor.
As a simple example, take scheduling. I'm about to re-write the Xen
scheduler, and in the process I took a good look at the scheduler you
wrote. I think it's got a lot of really good ideas, which I plan to
steal. :-) However, I'm going to have to make some key changes in
order for it to function well as a hypervisor scheduler. If KVM is
used on a production server with 20 or 30 multi-vcpu VMs, I predict
the current scheduler will do very poorly, because it wasn't designed
with VMs in mind, but with processes. Making changes so that VMs run
better will fundamentally make things that make processes run less
well.
Forking Linux, drivers an all, is not a good idea; anyone would have
to be a fool to try it. I think if you think seriously about it,
you'd never do something like that. I don't believe any such a
project would have a snowball's chance in hell of attracting anywhere
near the required number of hardware developers to make it an
enterprise-class system. If, somehow, it did manage to attract a
critical mass to make it viable, then the result would be two much
weaker projects, wasting millions of man-hours of labor doing
unnecessary duplication.
No, I think the best option, and the option the Xen project would take
again if we were to start from scratch, would be what we have done:
To build a hypervisor to be a hypervisor, and let the kernel be a
kernel: but leverage the millions of man-hours still being done in
hardware support for Linux.
Either way, time will tell in the end. If I'm wrong, and KVM can
become an enterprise-class hypervisor while playing well with
linux-as-kernel, then eventually it will dominate and Xen will die
out. You can say "I told you so" and remove all the crap you've been
objecting to. If I'm right, however, then having Xen around will be
critical, not just for open-source virtualization, but for the kernel
as well. You'll be happy to be able to tell people, "Don't put this
hypervisor crap in here. If you want a hypervisor, go to Xen." :-)
Until things are shown clearly one way or the other, the best thing to
do is hedge your bets, and allow both projects to develop.
[That's my main point; in-line responses below.]
> The whole Xen design is messed up really: you have taken off bits of
> the Linux kernel you found interesting, turned them into a
> micro-kernel in essence and renamed it to 'Xen'.
That's how Xen started, and that's really the beauty of open-source.
(After all, KVM has stolen some ideas from the Xen shadow code.) But
since then, basically all of the code has been replaced with
Xen-written code. I think if you did an SCO-style audit comparing
Linux and Xen 3.4, you'd find a lot less in common than you think.
> But drivers and proper architecture is apparently boring (and
> fragile and hard and expensive to write and support in a
> micro-kernel setup) so you came up with this DOM0 piece of cr*p that
> ties Linux to Xen even closer (along an _ABI_), where Linux does
> most of the real work while Xen still stays 'separate' on paper.
It's not boring, it's just a colossal waste of time and resources to
duplicate all that effort. "Real work" is done by all of the
components: Xen does the "real work" of scheduling and resource
management; Linux does the "real work" of process-level stuff,
filesystems, and so on and (in the case of dom0) hardware support;
qemu does the "real work" of doing device emulation. All of them are
unique, difficult, and interesting to somebody. Reducing duplication
means everyone can work on what interests them the most, and minimizes
the total "busy work" for all involved.
How many KVM developers are working on device drivers? And how would
Xen duplicating all the driver development help Linux? Linux would
still have to do everything, there'd just be fewer developers to do it
(since some people would be working on Xen drivers instead).
> Xen isnt actually useful _at all_ without Linux/DOM0. Without Dom0
> Xen is slow and native hardware support within Xen is virtually
> non-existent, as you point out above.
And qemu-kvm isn't useful _at_all_ without Linux either; and Linux-KVM
isn't useful _at_all_ without qemu. Your point?
Xen will run without dom0? I wasn't aware of that... ;-)
> This is proof that you should have done all that work within Linux -
> instead of duplicating a lot of code.
See above.
-George Dunlap
next prev parent reply other threads:[~2009-05-26 12:46 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 23:25 [GIT PULL] Xen APIC hooks (with io_apic_ops) Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 01/17] xen/dom0: handle acpi lapic parsing in Xen dom0 Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 02/17] x86: add io_apic_ops to allow interception Jeremy Fitzhardinge
2009-05-25 3:54 ` Ingo Molnar
2009-05-27 7:17 ` Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 03/17] xen: implement io_apic_ops Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 04/17] xen: create dummy ioapic mapping Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 05/17] xen: implement pirq type event channels Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 06/17] x86/io_apic: add get_nr_irqs_gsi() Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 07/17] xen/apic: identity map gsi->irqs Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 08/17] xen: direct irq registration to pirq event channels Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 09/17] xen: bind pirq to vector and event channel Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 10/17] xen: pre-initialize legacy irqs early Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 11/17] xen: don't setup acpi interrupt unless there is one Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 12/17] xen: use acpi_get_override_irq() to get triggering for legacy irqs Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 13/17] xen: initialize irq 0 too Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 14/17] xen: dynamically allocate irq & event structures Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 15/17] xen: set pirq name to something useful Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 16/17] xen: fix legacy irq setup, make ioapic-less machines work Jeremy Fitzhardinge
2009-05-12 23:25 ` [PATCH 17/17] xen: disable MSI Jeremy Fitzhardinge
2009-05-19 12:35 ` [GIT PULL] Xen APIC hooks (with io_apic_ops) Ingo Molnar
2009-05-20 17:57 ` Jeremy Fitzhardinge
2009-05-25 4:10 ` Ingo Molnar
2009-05-26 12:46 ` George Dunlap [this message]
2009-05-26 18:26 ` [Xen-devel] " Avi Kivity
2009-05-26 19:18 ` Dan Magenheimer
2009-05-26 19:41 ` Avi Kivity
2009-05-28 0:13 ` Ingo Molnar
2009-05-28 0:49 ` Jeremy Fitzhardinge
2009-05-28 3:47 ` Dan Magenheimer
2009-05-28 14:26 ` George Dunlap
2009-05-29 0:45 ` Xen is a feature Jeremy Fitzhardinge
2009-05-29 1:27 ` Greg KH
2009-05-29 4:05 ` David Miller
2009-05-29 6:37 ` Jaswinder Singh Rajput
2009-05-29 6:51 ` David Miller
2009-05-29 12:01 ` George Dunlap
2009-05-29 14:14 ` Pasi Kärkkäinen
2009-05-29 21:29 ` David Miller
[not found] ` <87tz33ep1b.fsf@basil.nowhere.org>
2009-05-29 21:31 ` [Xen-devel] " Jeremy Fitzhardinge
2009-05-29 23:09 ` Nakajima, Jun
2009-05-29 23:26 ` Jeremy Fitzhardinge
2009-06-02 15:23 ` Thomas Gleixner
2009-06-02 16:41 ` George Dunlap
2009-06-02 17:28 ` Chris Friesen
2009-06-02 17:46 ` Linus Torvalds
2009-06-02 18:02 ` Linus Torvalds
2009-06-02 18:59 ` Avi Kivity
2009-06-07 9:13 ` Ingo Molnar
2009-06-07 10:01 ` Avi Kivity
2009-06-07 10:35 ` Ingo Molnar
2009-06-07 12:46 ` Avi Kivity
2009-06-07 13:02 ` Jaswinder Singh Rajput
2009-06-04 14:02 ` [Xen-users] " Thomas Goirand
2009-06-02 18:59 ` Thomas Gleixner
2009-06-03 19:49 ` Bill Davidsen
2009-06-03 20:20 ` Thomas Gleixner
2009-06-03 22:37 ` Bill Davidsen
2009-06-03 23:29 ` Frans Pop
2009-06-04 13:21 ` George Dunlap
2009-06-04 15:10 ` Theodore Tso
2009-06-04 15:31 ` Chris Friesen
2009-06-05 4:14 ` Bill Davidsen
2009-06-05 4:55 ` Chris Friesen
2009-06-02 22:40 ` Steven Rostedt
2009-06-02 23:28 ` Merge Xen (the hypervisor) into Linux Ingo Molnar
2009-06-03 0:00 ` Dan Magenheimer
2009-06-03 0:32 ` Thomas Gleixner
2009-06-03 2:43 ` Theodore Tso
2009-06-03 3:42 ` Steven Rostedt
2009-06-03 4:49 ` Dan Magenheimer
2009-06-03 4:58 ` David Miller
2009-06-03 5:07 ` Steven Rostedt
2009-06-03 5:22 ` Steven Rostedt
2009-06-03 12:03 ` George Dunlap
2009-06-03 19:05 ` Theodore Tso
[not found] ` <4A27CF94.1050903@gmx.de>
2009-06-04 14:03 ` [Xen-users] " Steven Rostedt
2009-06-03 7:28 ` Gerd Hoffmann
2009-06-03 8:47 ` Alan Cox
2009-06-03 9:09 ` Gerd Hoffmann
2009-06-03 9:20 ` Keir Fraser
2009-06-03 11:15 ` Theodore Tso
2009-06-03 11:39 ` Keir Fraser
2009-06-03 11:41 ` Gerd Hoffmann
2009-06-03 1:00 ` Joel Becker
2009-06-03 2:00 ` david
2009-06-03 7:59 ` Alan Cox
2009-06-03 8:07 ` Christian Tramnitz
2009-06-04 18:53 ` Linus Torvalds
2009-06-05 0:09 ` Samuel Thibault
2009-06-05 0:18 ` David Miller
2009-06-05 0:54 ` Linus Torvalds
2009-06-03 17:31 ` Chris Friesen
2009-06-03 17:36 ` Alan Cox
2009-06-02 23:41 ` Xen is a feature Thomas Gleixner
2009-05-30 2:19 ` [Xen-devel] " Andy Burns
2009-05-26 21:19 ` [Xen-devel] Re: [GIT PULL] Xen APIC hooks (with io_apic_ops) Gerd Hoffmann
2009-05-27 10:14 ` George Dunlap
2009-05-24 20:10 ` Avi Kivity
2009-05-25 3:51 ` Ingo Molnar
2009-05-25 4:55 ` Avi Kivity
2009-05-25 5:06 ` Ingo Molnar
2009-05-25 5:12 ` Avi Kivity
2009-05-25 5:19 ` 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=de76405a0905260546k56bc866bx1658ec13f65e3eec@mail.gmail.com \
--to=george.dunlap@eu.citrix.com \
--cc=avi@redhat.com \
--cc=jeremy@goop.org \
--cc=keir.fraser@eu.citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.com \
/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).