From: Hollis Blanchard <hollisb@us.ibm.com>
To: John Levon <levon@movementarian.org>
Cc: xen-ppc-devel <xen-ppc-devel@lists.xensource.com>,
xen-devel <xen-devel@lists.xensource.com>,
Ewan Mellor <ewan@xensource.com>,
xen-ia64-devel <xen-ia64-devel@lists.xensource.com>
Subject: Re: architecture-specific stuff in xend
Date: Tue, 08 Aug 2006 11:15:18 -0500 [thread overview]
Message-ID: <1155053718.30116.176.camel@basalt.austin.ibm.com> (raw)
In-Reply-To: <20060808155953.GA20410@totally.trollied.org>
On Tue, 2006-08-08 at 16:59 +0100, John Levon wrote:
> On Tue, Aug 08, 2006 at 10:34:25AM -0500, Hollis Blanchard wrote:
>
> > Rather than having these inline tests everywhere ("if os.uname()[4] in
> > ('ia64', 'ppc64'):"), would it make more sense to have some sort of
> > "architecture" object, and do things like:
>
> It'd be good if it were slightly more general and covered other system
> stuff too (namely OS).
Sure, we could make it "class Platform" and have it represent an
architecture/OS pair.
> On Solaris some of the Xen binaries/scripts live
> in different locations in order to meet our file system requirements.
Does that impact code under tools/python/xen much?
> > I'm not sure how/where to instantiate the arch object though.
>
> Presumably you could do the instance() singleton trick?
Not sure what you mean.
Actually, you bring up a good point: since we have no state (at least
not in the examples I'm thinking of), we really don't want/need a class;
a module would do just fine. So we could have separate files/modules
with just plain functions:
platform/ia64.py:
def init_reservation(mem_kb):
return something
platform/platform.py:
import xen.xend.platform.ia64 as platform
... or something. Like I said, I really don't know modules, but as long
as we don't have any arch-specific state we need to save, I'm pretty
sure modules are the right solution to this problem.
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2006-08-08 16:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-08 15:34 architecture-specific stuff in xend Hollis Blanchard
2006-08-08 15:59 ` [XenPPC] Re: [Xen-devel] " John Levon
2006-08-08 16:15 ` Hollis Blanchard [this message]
2006-08-08 17:12 ` John Levon
2006-08-09 9:28 ` Ewan Mellor
2006-08-09 15:07 ` Hollis Blanchard
2006-08-09 16:18 ` Ewan Mellor
2006-08-10 21:12 ` [PATCH] " Hollis Blanchard
2006-08-10 21:27 ` John Levon
2006-08-11 22:59 ` Daniel Miles
2006-08-14 17:40 ` Hollis Blanchard
2006-08-15 2:14 ` Hollis Blanchard
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=1155053718.30116.176.camel@basalt.austin.ibm.com \
--to=hollisb@us.ibm.com \
--cc=ewan@xensource.com \
--cc=levon@movementarian.org \
--cc=xen-devel@lists.xensource.com \
--cc=xen-ia64-devel@lists.xensource.com \
--cc=xen-ppc-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.