xen-users
[Xen-devel] Re: Xen is a feature
To: |
Theodore Tso <tytso@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Frans Pop <elendil@xxxxxxxxx>, Bill Davidsen <davidsen@xxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "davem@xxxxxxxxxxxxx" <davem@xxxxxxxxxxxxx>, "jeremy@xxxxxxxx" <jeremy@xxxxxxxx>, "mingo@xxxxxxx" <mingo@xxxxxxx>, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "avi@xxxxxxxxxx" <avi@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, "torvalds@xxxxxxxxxxxxxxxxxxxx" <torvalds@xxxxxxxxxxxxxxxxxxxx>, "gregkh@xxxxxxx" <gregkh@xxxxxxx>, "kurt.hackel@xxxxxxxxxx" <kurt.hackel@xxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>, ksrinivasan <ksrinivasan@xxxxxxxxxx>, "EAnderson@xxxxxxxxxx" <EAnderson@xxxxxxxxxx>, "wimcoekaerts@xxxxxxxxxxxx" <wimcoekaerts@xxxxxxxxxxxx>, Stephen Spector <stephen.spector@xxxxxxxxxx>, "jens.axboe@xxxxxxxxxx" <jens.axboe@xxxxxxxxxx> |
Subject: |
[Xen-devel] Re: Xen is a feature |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Date: |
Fri, 05 Jun 2009 10:18:03 +1000 |
Cc: |
|
Delivery-date: |
Fri, 05 Jun 2009 05:03:40 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20090604151003.GB2542@xxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<4A1F302E.8030501@xxxxxxxx> <20090528.210559.137121893.davem@xxxxxxxxxxxxx> <4A1FCE8E.2060604@xxxxxxxxxxxxx> <alpine.LFD.2.00.0905311607560.3379@xxxxxxxxxxxxxxxxxxxxx> <4A26D3D8.6080002@xxxxxxx> <alpine.LFD.2.00.0906032204220.3419@xxxxxxxxxxxxxxxxxxxxx> <alpine.LFD.2.00.0906032204220.3419@xxxxxxxxxxxxxxxxxxxxx> <4A26FB3B.6010205@xxxxxxx> <200906040129.07852.elendil@xxxxxxxxx> <4A27CA44.3060604@xxxxxxxxxxxxx> <20090604151003.GB2542@xxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090320) |
Theodore Tso wrote:
The other argument is that by merging Xen into Linux, it becomes
easier for kernel developers to understand *why* "if (xen) ..." shows
up in random places in core kernel code, and it becomes easier to
clean that up.
I explicitly put the "if (xen) ..." stuff in there because I *know* its
ugly: I didn't want to sugar-coat it and I didn't want to hide it behind
some bogus prettifying abstraction layer, and I didn't want it to be
left unfixed.
But it was also the pragmatic way to make progress towards something
which actually works and is actually useful to people.
If Xen isn't merged, it becomes much harder to believe that those
cleanups will occur, since the Xen developers might stonewall such
cleanups for reasons that Linux developers might not consider valid.
So the threshold for accepting patches might be much higher, since the
subsystem maintainers involved might decide to NAK patches as
uglifying the Linux kernel codebase with no real benefit to the Linux
codebase --- and not much hope that said ugly hacks will get cleaned
up later. Historically, once code with warts gets merged, we lose all
leverage towards fixing those warts afterwards; this is true in
general, and not a statement of a lack of trust of Xen developers
specifically.
Well, my whole goal with getting Xen into the kernel has been to make it
a proper first-class kernel subsystem. That is: merge it with full
review and consensus; take comments and bug reports seriously; work with
other subsystem maintainers to sort problems out; take advantage of
better kernel mechanisms to improve the Xen code; add better kernel
mechanisms to improve the rest of the kernel.
Stonewalling or blocking changes don't come into it. But it works two
ways; If I feel that I'm being stonewalled, if people aren't working
with me, then I get frustrated.
This doesn't make merging Xen *impossible*, but probably makes it
harder, since each of those objections will have to be cleared,
possibly by refactoring the code so that it adds benefits not just for
Xen, but some other in-kernel user of that abstraction (i.e., like
KVM, lguest, etc.) or by cleaning up the code in general, in order to
clear NAK's by the relevant developers.
A lot of my kernel work of the last few years has been along those
lines: lots of unification, refactoring, cleanups, horse-trading with
other subsystems to find common ground, etc. As a result, most of the
Xen stuff has slipped in fairly cleanly and quietly.
Consequently, very few people seem to realize how uncontroversial the
Xen work has been so far; in the 3ish years I've been working on it,
this is the first big mailing list blowup. In the meantime, there have
been lots of users happily using Xen as shipped with their stock kernel.
If Xen is merged, then ultimately Linus gets to make the call about
whether something gets fixed, even at the cost of making a change to
the hypervisor/dom0 interface. So this would likely decrease the
threshold of what has to be fixed before people are willing to ACK a
Xen merge, since there's better confidence that these warts will be
cleaned up.
Well, lets be precise here. Full Xen domU support has been in released
kernels for something like 18 months now. This whole discussion isn't
about "should we merge Xen?", because that has already happened. A
groups of distinct subsystem developers got together, worked out a
common set of requirements, built an interface to meet those
requirements and implemented it. The result is Xen, VMI, lguest - and
now kvm, which didn't exist at the time, but has since found the
interface useful.
This controversy is about the - quite small - dom0 support subset of
Xen, which primarily relates to allowing Xen domains to have direct
access to hardware. It is technically challenging because it covers
quite different set of functionality in different parts of the kernel -
pci, dma, interrupts, etc.
In some cases, the dom0 changes are fairly uncontroversial because
they're just another user of existing interfaces (dma_ops) or slightly
controversial because they need tweaks to an existing interface (swiotlb).
However, where the existing kernel code doesn't have a suitable
abstraction layer, or even particularly clean internal interfaces (like
the apic code), working out how to make the appropriate Xen changes
poses a tricky tradeoff: do I attempt to restructure a large complex
subsystem with lots of subtle interactions with the rest of the kernel -
not to mention subtle interactions with many types of quirky hardware -
just to add my changes? Or do I make some relatively small, low risk
(but low beauty) changes to get the job done?
I went for the latter; the cost-benefit tradeoff just didn't seem to
justify a massive refactor. But others have pretty pointedly had the
opposite view, so I'm now investigating what its actually going to involve.
J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|