From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Harper Subject: Re: [PATCH] tools: convert cpumap bitmap to list Date: Thu, 20 Oct 2005 11:23:42 -0500 Message-ID: <20051020162342.GE2004@us.ibm.com> References: <20051019224507.GC2004@us.ibm.com> <20051020152455.GD2004@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: 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 Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org * Keir Fraser [2005-10-20 11:00]: > > On 20 Oct 2005, at 16:24, Ryan Harper wrote: > > >Are you interested in any modification of the cpumap to list > >conversion? > >Or is it ok if vcpu-list shows a long list of integers? > > I think an ordered list of cpus is most user-friendly, perhaps using > range notation to keep it short (so, for example, mask 0x77 would print > as '0-2, 4-6' rather than '0, 1, 2, 4, 5, 6'). A mask is a more > succinct representation but maybe not so good for users. :-) Agreed. I'll work up something that tries to shrink the list into something smaller but still readable. > > >I would think mapping cpu % nr_cpus, throwing away duplicates would be > >best. With [0,1,2,3] and nr_cpus=2, cpumap would be [0,1]. > > I think Xen should ignore non-existent cpus in a cpumap. I'm not really > fussed what you do with them in xend -- ignoring them there too would > probably make most sense. I am a little concerned that if a user pins a vcpu to cpus 0-7 , on a two-way, and the output of vcpu-list shows him [0,1], that it might look like the pin operation didn't work. If this isn't a big deal, then I'll also look at throwing out invalid cpus from the cpumap representation. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 ryanh@us.ibm.com