From: "KUWAMURA Shin'ya" Subject: Re: [PATCH] xenmon: remove magic number "31" (the idle domain) Date: Tue, 04 Jul 2006 16:48:20 +0900 (JST) Message-ID: <20060704.164820.78765530.kuwa@jp.fujitsu.com> References: <20060704.143731.74693697.kuwa@jp.fujitsu.com> <2a7a55c7de2d697c126797c1fb982850@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2a7a55c7de2d697c126797c1fb982850@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir.Fraser@cl.cam.ac.uk Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi Keir, >>>>> On Tue, 4 Jul 2006 08:06:57 +0100 >>>>> Keir.Fraser@cl.cam.ac.uk(Keir Fraser) said: > > > On 4 Jul 2006, at 06:37, KUWAMURA Shin'ya wrote: > > > This patch removes the magic number "31" for readability. The number > > "31" means the idle domain ID. > > 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. Thanks, -- KUWAMURA Shin'ya