From: Wei Liu <wei.liu2@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/2] xen: fill topology info for online cpus only
Date: Thu, 30 Aug 2018 09:37:01 +0100 [thread overview]
Message-ID: <20180830083701.g42dcjg5m7fkbpvs@citrix.com> (raw)
In-Reply-To: <0d12f446-a6ba-add0-bded-6b90ee64fb5a@suse.com>
On Thu, Aug 30, 2018 at 10:31:16AM +0200, Juergen Gross wrote:
> On 30/08/18 10:16, Jan Beulich wrote:
> >>>> On 29.08.18 at 20:23, <jgross@suse.com> wrote:
> >> The topology information obtainable via XEN_SYSCTL_cputopoinfo is
> >> filled rather weird: the size of the array is derived from the highest
> >> online cpu number, while the data is set to "invalid" for not present
> >> cpus only.
> >>
> >> With smt=0 the information for parked threads is all zero, so it should
> >> be best to return "invalid" information for offline cpus.
> >>
> >> On a dual core system without this patch xl info -n will print:
> >>
> >> cpu_topology :
> >> cpu: core socket node
> >> 0: 0 0 0
> >> 1: 0 0 0
> >> 2: 1 0 0
> >
> > But there's nothing wrong here. The interesting part is what would be
> > printed for CPU 3 (perhaps on a more than two cores system). After
> > all topology is valid irrespective of whether a CPU is online - it all
> > depends on whether the hypervisor still has the information available.
> > It is for a reason that cpu_smpboot_free() invalidates certain fields
> > only upon CPU removal:
> >
> > if ( remove )
> > {
> > c[cpu].phys_proc_id = XEN_INVALID_SOCKET_ID;
> > c[cpu].cpu_core_id = XEN_INVALID_CORE_ID;
> > c[cpu].compute_unit_id = INVALID_CUID;
> >
> > On a 6-core system I see
> >
> > cpu: core socket node
> > 0: 0 0 0
> > 1: 0 0 0
> > 2: 1 0 0
> > 3: 1 0 0
> > 4: 2 0 0
> > 5: 2 0 0
> > 6: 8 0 0
> > 7: 8 0 0
> > 8: 9 0 0
> > 9: 9 0 0
> > 10: 10 0 0
> >
> > which looks fine to me, apart from the missing info on CPU 11.
>
> I can change the patch to print the information for the offline cpus
> (including the now missing ones), too.
>
That is fine too. I just don't like inconsistent output. :p
P.S. you probably want to add a new field to the existing interface to
indicate if a cpu is online.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-08-30 8:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 18:23 [PATCH 0/2] fix smt=0 fallout Juergen Gross
2018-08-29 18:23 ` [PATCH 1/2] tools/libxl: correct vcpu affinity output with sparse physical cpu map Juergen Gross
2018-08-30 7:47 ` Wei Liu
2018-08-30 8:07 ` Jan Beulich
[not found] ` <5B87A5B402000078001E361E@suse.com>
2018-08-30 8:11 ` Juergen Gross
2018-08-30 8:42 ` Jan Beulich
2018-08-29 18:23 ` [PATCH 2/2] xen: fill topology info for online cpus only Juergen Gross
2018-08-30 7:48 ` Wei Liu
2018-08-30 7:51 ` Wei Liu
2018-08-30 8:16 ` Jan Beulich
[not found] ` <5B87A7E502000078001E364A@suse.com>
2018-08-30 8:31 ` Juergen Gross
2018-08-30 8:37 ` Wei Liu [this message]
2018-08-30 8:44 ` Jan Beulich
[not found] ` <5B87AE7402000078001E36DE@suse.com>
2018-08-30 8:46 ` Juergen Gross
2018-08-30 8:43 ` Jan Beulich
[not found] <20180829182302.9977=ef=bf=bd1=ef=bf=bdjgross@suse.com?= =?UTF-8?Q?>
[not found] ` <20180829182302.9977=ef=bf=bd3=ef=bf=bdjgross@suse.com>
[not found] ` <5B87A7?= =?UTF-8?Q?E502000078001E364A@suse.com>
[not found] ` <0d12f446-a6ba-add0-bded-6b90ee64fb5?= =?UTF-8?Q?a@suse.com>
[not found] ` <5B87AE1E02000078001E36DB@suse.com>
2018-08-30 8:46 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180830083701.g42dcjg5m7fkbpvs@citrix.com \
--to=wei.liu2@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jgross@suse.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).