[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] xen: fill topology info for online cpus only
>>> On 30.08.18 at 10:37, <wei.liu2@xxxxxxxxxx> wrote: > 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@xxxxxxxx> 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. And if we extend the interface anyway, also the thread ID (as iirc pointed out as missing recently by George). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |