Messages in this thread | | | Date | Thu, 16 Dec 2004 15:09:54 +0100 | From | Andi Kleen <> | Subject | Re: arch/xen is a bad idea |
| |
On Thu, Dec 16, 2004 at 12:54:17PM +0000, Alan Cox wrote: > On Iau, 2004-12-16 at 04:01, Andi Kleen wrote: > > That is exactly the part that is wrong currently imho. The arch/xen > > interface is a mess and in its current form unlikely to be maintainable. > > It seems maintainable and well documented to me. I just don't see where > your problem is with this. The kernel/hypervisor interface is clear, and > the arch/xen code seems quite sane.
The main problem I see is that it is source code copy, and especially when they both support i386 and x86-64 there will be no sane way to keep it all synchronized with the i386 and x86-64 code bases. It's already hard from a single source like I can attest from x86-64, with two sources it will be likely much more difficult longer term. I just can't see it working well in practice. It will be also nasty for people doing changes because they will need to duplicate i386+x86_64 changes four times in the worst case (i386,x86_64,xen32,xen64)
I guess it may be acceptable if we were maintaining obscure Lance drivers this way ;_), but for a important architecture it just doesn't seem like the right approach to me.
Also e.g. for non performance critical things like changing MTRRs or debug registers it would be IMHO much cleaner to just emulate the instructions (the ISA is very well defined) and not change the kernel here. From a look at Ian's list the majority of the changes needed for Xen actually fall into this category.
I suspect when the kernel is only changed for the truly performance critical interfaces that cannot be efficiently emulated (like idle/timers/page table updates) the required changes for the para virtualization will become much more manageable and can be cleanly integrated into the respective ports.
And as Pavel points out first merging arch/xen and then migrating into i386 and x86_64 like it was proposed sounds extremly hard and is probably not really practical.
-Andi
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |