WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Code size vs. linux source code compatibility in the hypervi

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Code size vs. linux source code compatibility in the hypervisor
From: Tobias Hunger <tobias@xxxxxxxxxxx>
Date: Sat, 29 Jan 2005 12:31:53 +0100
Delivery-date: Sat, 29 Jan 2005 12:17:20 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.7.2
Hello there!

I recently spend some time trying to better understand the hypervisor part of 
xen and decided to dive into the code in the xen subdirectory. David A. 
Wheeler's 'SLOCCount' reports about 53k lines of C code there.

My first impression was that much of the code is in fact unused by Xen and 
mostly there, because it was salvaged from the Linux kernel. To aid my 
understanding of Xen I started to trim down on macros and functions. I was 
surprised to be able to actually remove about 8k lines of code and 1.5k macro 
definitions from the ACPI part! Xen still builds and runs for me:-) Since the 
compiler will optimize out unused code this reduction is not reflected in the 
compiled size of the hypervisor (mine is identical in size to the one build 
from yesterdays unstable tarball).

My question is: What is the stance of the core team on the issue of code size 
vs. linux source code compatibility? The less code the easier it is for 
others to get into the project, while keeping the complete linux code around 
might make moving new code over to xen easier. Are you interested in patches 
to remove unused code? Mine currently removes almost all the header files in 
include/acpi...

What do you think about #if 0 in code? I personally hate that: There is 
version tracking, so there is no reason to keep old code visible that way. 
What about all those "#ifdef CONFIG_FOO" lines from the linux kernel? 
Currently xen is rather fixed in the configuration it supports and uses. Is 
that a feature of xen (then those #ifdefs can go IMHO) or supposed to change 
over time?

As you might have noticed I have not used C too much for the last couple of 
years and never was a fan of cpp in the first place:-) This code rewriting 
all over the place keeps knocking me out of the flow of understanding what is 
happening.

-- 
Gruss,
Tobias

------------------------------------------------------------
Tobias Hunger           The box said: 'Windows 95 or better'
tobias@xxxxxxxxxxx                     So I installed Linux.
------------------------------------------------------------

Attachment: pgpFRdeYVA9wF.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>