[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Prevent changing a memory size of Domain-0even if users make a careless mistake



> Is it?  As far as I know, the current meaning of dom0-min-mem set to 0
> is "No ballooning".  There are the following comments about dom0-min-mem
> in xend-config.sxp.
>
> # Dom0 will balloon out when needed to free memory for domU.
> # dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
> # If dom0-min-mem=0, dom0 will never balloon out.

Sorry, think I hadn't had enough coffee!  You're right of course.  Plus, your 
suggested behaviour is more consistent.

On the face of it, disabling ballooning like this seems inconvenient.  
However, I'd think that if disabling auto-ballooning, the administrator has 
probably set their dom0 footprint manually on the Xen command line, so they 
won't want to mem-set it anyhow.

Admins who want to be able to mess about arbitrarily with memory can still put 
dom0-min-mem=1.  I think dom0-min-mem should really /mean/ dom0-min-mem as 
far as the control tools are concerned.  If we want to disable autoballooning 
independently of mem-set, we could add a simple boolean option.

Cheers,
Mark

> Best regards,
>  Kan
>
> >Cheers,
> >Mark
> >
> >+                    raise XendError("memory_dynamic_max cannot be changed
> >for
> >safety reasons")
> >+
> >         self._safe_set_memory('memory_dynamic_min', target * MiB)
> >         self._safe_set_memory('memory_dynamic_max', target * MiB)
> >
> >>  -- Keir
> >>
> >> On 4/4/08 11:06, "Masaki Kanno" <kanno.masaki@xxxxxxxxxxxxxx> wrote:
> >> > Hi,
> >> >
> >> > If users accidentally change a memory size of Domain-0 to very small
> >> > memory size by xm mem-set command, users will be not able to operate
> >> > Domain-0.  I think that Domain-0 is important for Xen, so I'd like to
> >> > prevent the accident by xm mem-set command.
> >> >
> >> > This patch prevents changing the memory size of Domain-0 by xm mem-set
> >> > command if specified memory size is smaller than dom0-min-mem in
> >> > xend-config.sxp.
> >> >
> >> >  # cat /etc/xen/xend-config.sxp | grep "(dom0-min-mem"
> >> >  (dom0-min-mem 384)
> >> >  # xm list Domain-0
> >> >  Name                                        ID   Mem VCPUs      State
> >> > Time(s)
> >> >  Domain-0                                     0   941     2     r-----
> >> > 62.6
> >> >  # xm mem-set Domain-0 1
> >> >  Error: memory_dynamic_max cannot be changed for safety reasons
> >> >  Usage: xm mem-set <Domain> <Mem>
> >> >
> >> >  Set the current memory usage for a domain.
> >> >  # xm list Domain-0
> >> >  Name                                        ID   Mem VCPUs      State
> >> > Time(s)
> >> >  Domain-0                                     0   941     2     r-----
> >> > 63.6
> >> >
> >> >
> >> > Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
> >> >
> >> > Best regards,
> >> >  Kan
> >> >
> >> > _______________________________________________
> >> > Xen-devel mailing list
> >> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> >> > http://lists.xensource.com/xen-devel
> >>
> >> _______________________________________________
> >> Xen-devel mailing list
> >> Xen-devel@xxxxxxxxxxxxxxxxxxx
> >> http://lists.xensource.com/xen-devel
> >
> >--
> >Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/
> >pmpu/)
> >
> >_______________________________________________
> >Xen-devel mailing list
> >Xen-devel@xxxxxxxxxxxxxxxxxxx
> >http://lists.xensource.com/xen-devel



-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.