From: Harry Butterworth <harry@hebutterworth.freeserve.co.uk>
To: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@hp.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
xen-ia64-devel@lists.xensource.com
Subject: Re: Essay on an important Xen decision (long)
Date: Wed, 11 Jan 2006 13:37:22 +0000 [thread overview]
Message-ID: <1136986643.7672.107.camel@localhost.localdomain> (raw)
In-Reply-To: <516F50407E01324991DD6D07B0531AD59030F8@cacexc12.americas.cpqcorp.net>
[-- Attachment #1: Type: text/plain, Size: 4977 bytes --]
On Tue, 2006-01-10 at 11:26 -0800, Magenheimer, Dan (HP Labs Fort
Collins) wrote:
> A fundamental architectural decision has to be made for
> Xen regarding handling of physical/machine memory; at a high
> level, the question is:
>
> Should Xen drivers be made more flexible to accommodate
> different approaches to managing physical memory, or
> should other architectures be required to conform to
> the Xen/x86 model?
I believe the right approach is to decouple the driver implementation
from the memory management architecture by defining a high level API to
build the drivers on. The API should be expressed in terms of the
operations that the drivers need to perform rather than in terms of the
underlying primitives that are actually used to perform those
operations.
Such an API would allow decisions about memory management to be made
independent of the drivers and would allow the memory management
architecture to be changed relatively easily at a later date since the
resulting damage would be contained within the core library that
implemented the driver infrastructure API.
I think this is the right approach because:
o - Decoupling the drivers from the memory management architecture
reduces the cost of future memory management architecture changes and
keeps our options open, so is a lower risk approach than choosing a
memory management architecture now and trying to stick with it.
o - A good high level driver infrastructure API will clean up the
drivers considerably.
o - Containing the code which performs low-level memory manipulations
within a core driver infrastructure library written by an expert will
result in higher overall quality across all the drivers.
o - As a driver author, given a high level driver infrastructure API
which decouples me from the memory management architecture, the choice
of P==M, P2M or VP is no longer my concern.
I have made a first attempt at defining a high level driver
infrastructure API for general use by xen split drivers. This is the
xenidc API and, whilst it is designed for general use, it currently has
one client: the split USB driver.
I believe that xenidc completely decouples its clients from the memory
management architecture such that, for example, there should be no
changes required in the USB driver code when porting it from x86 to ia64
and PPC (this will be true whether or not the memory management
architecture for those platforms is changed to be more like x86).
All required changes ought to be contained within the xenidc
implementation and therefore would only need to be implemented once for
all clients of xenidc.
The choice of a common memory management architecture or different
memory management architectures across platforms or different options
for memory management architectures for a particular platform or
different options for memory management architecture at run-time for
transparent virtualization can all be contained within the xenidc
implementation.
In addition to decoupling the client driver code from the memory
management architecture, the xenidc API provides:
o - Convenient inter-domain communication primitives which encapsulate
the rather complicated state machine required for correct set-up and
tear down of inter-domain communication channels for (un)loadable driver
modules.
o - A convenient inter-domain bulk transport.
o - An up-front-reservation resource management strategy.
o - Driver forwards-compatibility with a network transparent xenidc
implementation.
I have attached the latest xenidc patch which includes documentation of
the xenidc API (added by the patch to the Xen interface document).
I have also attached the latest USB patch as an example of a client of
the xenidc API.
(Since the last time I posted these patches I have fixed a couple of
compiler warnings for the X86_64 build).
A few points to note:
o - xenidc is an infrastructure for the Xen-specific split drivers.
Xenidc doesn't directly address the issue of making the native drivers
work correctly under virtualization but does allow you to do that
however you like across different architectures whilst maintaining
common code for all the split drivers.
o - This is just a first attempt which I wrote mainly to decouple the
USB driver from churn in the underlying infrastructure. The API is
generally useful but only covers the operations that were actually
required for the USB driver. There is already enough in the API to base
other drivers on it but the API would need to be fleshed out with some
different kinds of operations before it would be possible to implement
all drivers with the same efficient primitives that are used today.
o - Unfortunately I didn't get funding to attend the Xen summit so I
won't be there to present on Xenidc. I'm not concerned about whether
xenidc gets accepted as-is but I do hope it will be useful as an example
of the kind of API that we could have. I'll be happy to answer any
questions on the list.
Harry.
[-- Attachment #2: latest-xenidc-patch.gz --]
[-- Type: application/x-gzip, Size: 62319 bytes --]
[-- Attachment #3: latest-usb-patch.gz --]
[-- Type: application/x-gzip, Size: 34642 bytes --]
[-- Attachment #4: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2006-01-11 13:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-10 19:26 Essay on an important Xen decision (long) Magenheimer, Dan (HP Labs Fort Collins)
2006-01-10 19:34 ` Mark Williamson
2006-01-10 19:55 ` Anthony Liguori
2006-01-11 9:33 ` Gerd Hoffmann
2006-01-11 16:22 ` Anthony Liguori
2006-01-11 10:08 ` Keir Fraser
2006-01-11 16:25 ` Anthony Liguori
2006-01-11 16:22 ` Mark Williamson
2006-01-11 16:41 ` Anthony Liguori
2006-01-11 21:16 ` Hollis Blanchard
2006-01-11 16:38 ` Keir Fraser
2006-01-11 10:46 ` Tristan Gingold
2006-01-10 23:02 ` Hollis Blanchard
2006-01-11 13:37 ` Harry Butterworth [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-01-11 0:13 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-11 0:22 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-11 0:39 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-11 21:36 ` Hollis Blanchard
2006-01-11 7:56 Tian, Kevin
2006-01-11 17:20 Ian Pratt
2006-01-11 17:38 ` Anthony Liguori
2006-01-12 0:48 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-12 2:44 Tian, Kevin
2006-01-16 15:52 ` Mark Williamson
2006-01-16 22:56 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-17 2:47 ` Mark Williamson
2006-01-17 3:03 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-17 3:16 ` Mark Williamson
2006-01-17 4:11 Tian, Kevin
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=1136986643.7672.107.camel@localhost.localdomain \
--to=harry@hebutterworth.freeserve.co.uk \
--cc=dan.magenheimer@hp.com \
--cc=xen-devel@lists.xensource.com \
--cc=xen-ia64-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.