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] xenmon: remove magic number "31" (the idle domai


On 4 Jul 2006, at 08:48, KUWAMURA Shin'ya wrote:

Where does the magic number '31' come from in the first place? That's
not the number Xen uses. It could conflict with the domain id of a
non-idle domain.

"31" comes from xenmon.py and xenbaked.h.
xenmon.py:38:
  NDOMAINS = 32

xenbaked.h:42
  #define NDOMAINS 32

Notice that 31 is NDOMAINS-1.

Therefore, xenmon supports only up to 32 domains.

That's poor, since it in fact only really supports the first 31 domains created on a system (domain ids don't necessarily quickly get reused; and 32nd domid is used as sentinel to indicate idle). It shouldn't be hard to use a data structure more complicated than (presumably) a small array indexed by domid.

 -- Keir


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