From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
jbeulich@suse.com, keir@xen.org, ian.jackson@eu.citrix.com,
stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com,
wei.liu2@citrix.com
Cc: dario.faggioli@citrix.com, ufimtseva@gmail.com, xen-devel@lists.xen.org
Subject: Re: [PATCH 2/4] sysctl/libxl: Add interface for returning IO topology data
Date: Wed, 3 Dec 2014 15:20:59 +0000 [thread overview]
Message-ID: <547F2A5B.9060407@citrix.com> (raw)
In-Reply-To: <1417556050-23364-3-git-send-email-boris.ostrovsky@oracle.com>
On 02/12/14 21:34, Boris Ostrovsky wrote:
> /* XEN_SYSCTL_topologyinfo */
> #define INVALID_TOPOLOGY_ID (~0U)
> +
> +struct xen_sysctl_cputopo {
> + uint32_t core;
> + uint32_t socket;
> + uint32_t node;
> +};
> +typedef struct xen_sysctl_cputopo xen_sysctl_cputopo_t;
> +DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cputopo_t);
> +
> +struct xen_sysctl_iotopo {
> + uint16_t seg;
> + uint8_t bus;
> + uint8_t devfn;
> + uint32_t node;
> +};
> +typedef struct xen_sysctl_iotopo xen_sysctl_iotopo_t;
> +DEFINE_XEN_GUEST_HANDLE(xen_sysctl_iotopo_t);
> +
> struct xen_sysctl_topologyinfo {
> /*
> * IN: maximum addressable entry in the caller-provided arrays.
> - * OUT: largest cpu identifier in the system.
> + * OUT: largest cpu identifier or max number of devices in the system.
> * If OUT is greater than IN then the arrays are truncated!
> * If OUT is leass than IN then the array tails are not written by sysctl.
> */
> uint32_t max_cpu_index;
> + uint32_t max_devs;
>
> /*
> * If not NULL, these arrays are filled with core/socket/node identifier
> - * for each cpu.
> - * If a cpu has no core/socket/node information (e.g., cpu not present)
> - * then the sentinel value ~0u is written to each array.
> - * The number of array elements written by the sysctl is:
> + * for each cpu and/or node for each PCI device.
> + * If information for a particular entry is not avalable it is set to
> + * INVALID_TOPOLOGY_ID.
> + * The number of array elements for CPU topology written by the sysctl is:
> * min(@max_cpu_index_IN,@max_cpu_index_OUT)+1
> */
> - XEN_GUEST_HANDLE_64(uint32) cpu_to_core;
> - XEN_GUEST_HANDLE_64(uint32) cpu_to_socket;
> - XEN_GUEST_HANDLE_64(uint32) cpu_to_node;
> + XEN_GUEST_HANDLE_64(xen_sysctl_cputopo_t) cputopo;
> + XEN_GUEST_HANDLE_64(xen_sysctl_iotopo_t) iotopo;
These are inherently lists with different indicies. They should not
conglomerated like this.
I would suggest introducing a new hypercall (xen_sysctl_iotopologyinfo
?) and leave this one alone.
~Andrew
next prev parent reply other threads:[~2014-12-03 15:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 21:34 [PATCH 0/4] Display IO topology when PXM data is available Boris Ostrovsky
2014-12-02 21:34 ` [PATCH 1/4] pci: Do not ignore device's PXM information Boris Ostrovsky
2014-12-03 15:01 ` Andrew Cooper
2014-12-03 15:19 ` Boris Ostrovsky
2014-12-05 15:53 ` Jan Beulich
2014-12-05 17:02 ` Boris Ostrovsky
2014-12-02 21:34 ` [PATCH 2/4] sysctl/libxl: Add interface for returning IO topology data Boris Ostrovsky
2014-12-03 15:20 ` Andrew Cooper [this message]
2014-12-03 15:37 ` Boris Ostrovsky
2014-12-04 11:24 ` Wei Liu
2014-12-04 11:55 ` Dario Faggioli
2014-12-04 16:26 ` Boris Ostrovsky
2014-12-04 16:44 ` Andrew Cooper
2014-12-04 17:11 ` Jan Beulich
2014-12-05 15:55 ` Jan Beulich
2014-12-05 16:03 ` Jan Beulich
2014-12-05 17:10 ` Boris Ostrovsky
2014-12-08 8:33 ` Jan Beulich
2014-12-08 14:56 ` Boris Ostrovsky
2014-12-08 15:19 ` Jan Beulich
2014-12-08 15:30 ` Andrew Cooper
2014-12-02 21:34 ` [PATCH 3/4] sysctl/libxl: Provide information about IO topology Boris Ostrovsky
2014-12-04 12:22 ` Dario Faggioli
2014-12-04 13:28 ` Ian Campbell
2014-12-05 15:59 ` Jan Beulich
2014-12-02 21:34 ` [PATCH 4/4] libxl: Switch to using new topology interface Boris Ostrovsky
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=547F2A5B.9060407@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=ufimtseva@gmail.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.