From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ewan Mellor Subject: Re: architecture-specific stuff in xend Date: Wed, 9 Aug 2006 17:18:11 +0100 Message-ID: <20060809161811.GD26245@leeni.uk.xensource.com> References: <1155051266.30116.152.camel@basalt.austin.ibm.com> <20060808155953.GA20410@totally.trollied.org> <20060809092810.GC19705@leeni.uk.xensource.com> <1155136032.2821.6.camel@diesel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1155136032.2821.6.camel@diesel> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Hollis Blanchard Cc: xen-ppc-devel , xen-ia64-devel , xen-devel , John Levon List-Id: xen-devel@lists.xenproject.org On Wed, Aug 09, 2006 at 10:07:12AM -0500, Hollis Blanchard wrote: > On Wed, 2006-08-09 at 10:28 +0100, Ewan Mellor wrote: > > On Tue, Aug 08, 2006 at 04:59:53PM +0100, John Levon wrote: > > > > > On Tue, Aug 08, 2006 at 10:34:25AM -0500, Hollis Blanchard wrote: > > > > > > > I'm not sure how/where to instantiate the arch object though. > > > > > > Presumably you could do the instance() singleton trick? > > > > This being Python, you don't actually need singletons -- the containing module > > is a singleton in its own right. You can just write > > > > Platform.py: > > > > import os > > > > if os.uname()[4] in ('ia64', 'ppc64'): > > def init_reservation(mem_kb): > > return something_else(mem_kb) > > > > else: > > def init_reservation(mem_kb): > > return mem_kb > > > > and then > > > > import Platform > > Platform.init_reservation(100) > > > > will do the right thing. > > Ewan, does this mean you think the proposal is going in the right > direction and you're waiting for a patch? Yes, your proposal sounds fine to me. Ewan.