From: Wei Liu Subject: Re: [PATCH v3 01/19] xen: dump vNUMA information with debug key "u" Date: Wed, 14 Jan 2015 17:25:21 +0000 Message-ID: <20150114172521.GA31527@zion.uk.xensource.com> References: <1421151107-20842-1-git-send-email-wei.liu2@citrix.com> <1421151107-20842-2-git-send-email-wei.liu2@citrix.com> <54B5704B.1010805@citrix.com> <20150113205151.GB17391@zion.uk.xensource.com> <54B64DA4.2080900@citrix.com> <54B65FEC0200007800054BDD@mail.emea.novell.com> <54B656D5.1090007@citrix.com> <54B68FFD0200007800054F04@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54B68FFD0200007800054F04@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , dario.faggioli@citrix.com, Wei Liu , Elena Ufimsteva , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Jan 14, 2015 at 02:49:17PM +0000, Jan Beulich wrote: > >>> On 14.01.15 at 12:45, wrote: > > On 14/01/15 11:24, Jan Beulich wrote: > >>>>> On 14.01.15 at 12:06, wrote: > >>> May I suggest the following sylistic changes: > >>> > >>> 2 vnodes, 20 vcpus: > >>> 1: pnode 0, vcpus {1-9} > >>> 0000000000000000 - 000000005dc00000 > >>> 2: pnode 1, vcpus {10-20} > >>> 000000005dc00000 - 00000000bb000000 > >>> 0000000100000000 - 0000000100800000 > >>> > >>> You have already stated 2 vnodes, so "vnode $X" is redundant as the list > >>> index. The vcpus are exceedingly likely to be consecutively allocated, > >>> and cpumask_scnprintf() is a very concise way of representing them (and > >>> will reduce your code quite a bit). > >> You mean bitmap_scnprintf() - cpumask_scnprintf() is not suitable for > >> dealing with vCPU-s. > > > > Yes, although I was actually thinking of the scnlistprintf() variant. > > > > However, I further notice that the source data is not in an appropriate > > form, so it is perhaps a less sensible suggestion. > > Yeah, but even if the library function isn't usable here, it would still > make sense to attempt to condense the output as much as possible. > I modify my code and here are some output examples: (XEN) Domain 1 (total: 768064): (XEN) Node 0: 768064 (XEN) 2 vnodes, 20 vcpus, guest physical layout: (XEN) 0: pnode 0 vcpus 0-9 (XEN) 0000000000000000 - 000000005dc00000 (XEN) 1: pnode 0 vcpus 10-19 (XEN) 000000005dc00000 - 00000000bb000000 (XEN) 0000000100000000 - 0000000100800000 (XEN) Domain 2 (total: 768064): (XEN) Node 0: 768064 (XEN) 2 vnodes, 20 vcpus, guest physical layout: (XEN) 0: pnode 0 vcpus 0-18 (XEN) 0000000000000000 - 000000005dc00000 (XEN) 1: pnode 0 vcpus 19 (XEN) 000000005dc00000 - 00000000bb000000 (XEN) 0000000100000000 - 0000000100800000 (XEN) Domain 4 (total: 768064): (XEN) Node 0: 768064 (XEN) 2 vnodes, 20 vcpus, guest physical layout: (XEN) 0: pnode 0 vcpus 0-4 10-14 (XEN) 0000000000000000 - 000000005dc00000 (XEN) 1: pnode 0 vcpus 5-9 15-19 (XEN) 000000005dc00000 - 00000000bb000000 (XEN) 0000000100000000 - 0000000100800000 Wei. > Jan