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

Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and me

To: Anthony Liguori <aliguori@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Tue, 25 Apr 2006 00:57:49 +0100
Cc: Daniel Stekloff <dsteklof@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ewan Mellor <ewan@xxxxxxxxxxxxx>
Delivery-date: Mon, 24 Apr 2006 16:59:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44495F9E.6020704@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1145632658.2566.9.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <200604211629.40691.mark.williamson@xxxxxxxxxxxx> <44495F9E.6020704@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
> I'm not sure I agree that Xend is the right place to do this.  You would
> have to add another parameter to the either the domain config or to the
> actual create() call that basically had the semantics of "if memory is
> less than X, throw an exception."  That seems like a rather awkward
> addition to the interface and it makes client code harder to write.

Surely there are already plenty of other cases in which Xend can fail a create 
and throw the result back to xm?  For instance, if the kernel image can't be 
found, hotplug scripts fail, etc.  Wouldn't it just be an extra case of that?

> I'll attempt to be telepathic here and guess that you suggested this
> because there's no xm config file so there's no easy way to be able to
> tell xm to never give an error when mem is too small?  I think this is a
> good point in time to start thinking about just implementing an xm
> config file.

Well, yes and no.

Yes, Xend is the only place to do this right now.  But we've always tried 
(modulo a few things, eg pygrub) to keep xm a pretty thin layer, with most of 
the real smarts in Xend.  This also makes it easier to create a 
network-transparent implementation of xm, without confusing Xen-related 
config files on the "control" machine and on the servers.

That said, warning about improper config choices does seem rather like a 
client-side operation so perhaps an xm.conf is worth considering.

We should also consider:
1) whether we're going to need this for other options (I suspect yes, but it'd 
be unfortunate to have a config file for just one option)
2) whether there are any config choices currently handled by Xend or the 
domain config files, which we'd rather be handled by xm.conf

> If you use SafeConfigParser and just grab from a standard location (say
> /etc/xen/xm.conf), you should be able to do it properly (just within xm)
> with very little code.

Agreed, should be a fairly simple little hack.

Cheers,
Mark

> Thoughts?
>
> Regards,
>
> Anthony Liguori
>
> > Cheers,
> > Mark
> >
> > On Friday 21 April 2006 16:17, Daniel Stekloff wrote:
> >> Hi,
> >>
> >> This patch adds a warning to xm for creating and setting a domain's
> >> memory under 32 MBs. Patch adds a "--force-mem" option to "xm create"
> >> and "xm mem-set" commands for creating or setting memory less than 32
> >> MBs. Patch also updates man page and user manual.
> >>
> >> All comments welcome.
> >>
> >> Thanks,
> >>
> >> Dan
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel