Daniel Stekloff
2006-Apr-21 15:17 UTC
[Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
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@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Apr-21 15:28 UTC
Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
On Fri, Apr 21, 2006 at 08:17:38AM -0700, 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.You''ll need to patch 16_create_smallmem_neg, too, otherwise that test will fail. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson
2006-Apr-21 15:29 UTC
Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
I really like this idea. I think it''s most important for ballooning, which is a really easy way to get a domain to commit suicide otherwise ;-) I''d quite like to see it implemented Xend-side, though, with the "warning level" configurable (and probably disablable) in the xend-config.sxp so that users who really do want to create very small domUs can tweak the system not to warn them. 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@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel Stekloff
2006-Apr-21 17:17 UTC
Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
On Fri, 2006-04-21 at 16:29 +0100, Mark Williamson wrote:> I really like this idea. I think it''s most important for ballooning, which is > a really easy way to get a domain to commit suicide otherwise ;-) > > I''d quite like to see it implemented Xend-side, though, with the "warning > level" configurable (and probably disablable) in the xend-config.sxp so that > users who really do want to create very small domUs can tweak the system not > to warn them.Ok, that makes sense. I will also try and remember to patch xm-test. Thanks, Dan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anthony Liguori
2006-Apr-21 22:41 UTC
Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
Mark Williamson wrote:> I really like this idea. I think it''s most important for ballooning, which is > a really easy way to get a domain to commit suicide otherwise ;-) > > I''d quite like to see it implemented Xend-side, though, with the "warning > level" configurable (and probably disablable) in the xend-config.sxp so that > users who really do want to create very small domUs can tweak the system not > to warn them. >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. 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. 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. 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@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dan Smith
2006-Apr-21 22:57 UTC
Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
AL> I''m not sure I agree that Xend is the right place to do this. You AL> would have to add another parameter to the either the domain AL> config or to the actual create() call that basically had the AL> semantics of "if memory is less than X, throw an exception." That AL> seems like a rather awkward addition to the interface and it makes AL> client code harder to write. I agree. AL> Thoughts? I think it''s a good idea. I''d rather see it in the client than in Xend. If some GUI app wants to have a configurable limit that''s easy for the user to access, then it''ll just end up minding the limit itself, and call create() with the force flag each time, which defeats the point anyway. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Apr-24 00:55 UTC
Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
On Fri, Apr 21, 2006 at 05:41:34PM -0500, Anthony Liguori wrote:> Mark Williamson wrote: > >I really like this idea. I think it''s most important for ballooning, > >which is a really easy way to get a domain to commit suicide otherwise ;-) > > > >I''d quite like to see it implemented Xend-side, though, with the "warning > >level" configurable (and probably disablable) in the xend-config.sxp so > >that users who really do want to create very small domUs can tweak the > >system not to warn them. > > > > 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. > > 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. > > 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.I agree. Daniel, could you redo your patch, introducing an xm config file rather than a --force-mem option? If you could make it so that xm works even without the config file, using some decent defaults, that would avoid breaking existing installations, which would be good. Personally, I''d have an XML-based config file rather than a win.ini style one -- we''re moving towards using XML everywhere else, so it makes sense to me. Anyone have any strong opinions here? Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson
2006-Apr-24 23:57 UTC
Re: [Xen-devel] [PATCH] Add Small Memory Warning to XM for create and mem-set
> 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@lists.xensource.com > > 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@lists.xensource.com http://lists.xensource.com/xen-devel