From: Alex Williamson <alex.williamson@hp.com>
To: ryanh@us.ibm.com, Keir Fraser <keir@xensource.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [Xen-staging] [xen-unstable] Extended the physinfo sysctl to export NUMA cpu_to_node topology info.
Date: Mon, 09 Jul 2007 21:57:15 -0600 [thread overview]
Message-ID: <1184039835.13469.6.camel@bling> (raw)
In-Reply-To: <200707061514.l66FEMix029568@latara.uk.xensource.com>
On Fri, 2007-07-06 at 16:14 +0100, Xen staging patchbot-unstable wrote:
> # HG changeset patch
> # User kfraser@localhost.localdomain
> # Date 1183734727 -3600
> # Node ID 89d2192942befb0daf56e730be61d3a3c06926dd
> # Parent 538c3d8aa4b14833174423ec506284279d5a33ab
> Extended the physinfo sysctl to export NUMA cpu_to_node topology info.
> Print this in 'xm info'.
...
> xen/include/public/sysctl.h | 20 +++++
How is this working for anyone without sync'ing the linux sysctl.h?
I can't even get xend to start. Thanks,
Alex
Sync Xen sysctl.h with Linux
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---
diff -r 353e0152bb50 include/xen/interface/sysctl.h
--- a/include/xen/interface/sysctl.h Mon Jul 09 11:00:44 2007 -0600
+++ b/include/xen/interface/sysctl.h Mon Jul 09 21:30:17 2007 -0600
@@ -34,7 +34,7 @@
#include "xen.h"
#include "domctl.h"
-#define XEN_SYSCTL_INTERFACE_VERSION 0x00000003
+#define XEN_SYSCTL_INTERFACE_VERSION 0x00000004
/*
* Read console content from Xen buffer ring.
@@ -76,6 +76,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_sysctl_tbuf_
*/
#define XEN_SYSCTL_physinfo 3
struct xen_sysctl_physinfo {
+ /* IN variables. */
uint32_t threads_per_core;
uint32_t cores_per_socket;
uint32_t sockets_per_node;
@@ -85,6 +86,23 @@ struct xen_sysctl_physinfo {
uint64_aligned_t free_pages;
uint64_aligned_t scrub_pages;
uint32_t hw_cap[8];
+
+ /* IN/OUT variables. */
+ /*
+ * IN: maximum addressable entry in the caller-provided cpu_to_node array.
+ * OUT: largest cpu identifier in the system.
+ * If OUT is greater than IN then the cpu_to_node array is truncated!
+ */
+ uint32_t max_cpu_id;
+ /*
+ * If not NULL, this array is filled with node identifier for each cpu.
+ * If a cpu has no node information (e.g., cpu not present) then the
+ * sentinel value ~0u is written.
+ * The size of this array is specified by the caller in @max_cpu_id.
+ * If the actual @max_cpu_id is smaller than the array then the trailing
+ * elements of the array will not be written by the sysctl.
+ */
+ XEN_GUEST_HANDLE_64(uint32_t) cpu_to_node;
};
typedef struct xen_sysctl_physinfo xen_sysctl_physinfo_t;
DEFINE_XEN_GUEST_HANDLE(xen_sysctl_physinfo_t);
@@ -140,9 +158,7 @@ typedef struct xen_sysctl_getdomaininfol
typedef struct xen_sysctl_getdomaininfolist xen_sysctl_getdomaininfolist_t;
DEFINE_XEN_GUEST_HANDLE(xen_sysctl_getdomaininfolist_t);
-/*
- * Inject debug keys into Xen.
- */
+/* Inject debug keys into Xen. */
#define XEN_SYSCTL_debug_keys 7
struct xen_sysctl_debug_keys {
/* IN variables. */
@@ -151,6 +167,23 @@ struct xen_sysctl_debug_keys {
};
typedef struct xen_sysctl_debug_keys xen_sysctl_debug_keys_t;
DEFINE_XEN_GUEST_HANDLE(xen_sysctl_debug_keys_t);
+
+/* Get physical CPU information. */
+#define XEN_SYSCTL_getcpuinfo 8
+struct xen_sysctl_cpuinfo {
+ uint64_t idletime;
+};
+typedef struct xen_sysctl_cpuinfo xen_sysctl_cpuinfo_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpuinfo_t);
+struct xen_sysctl_getcpuinfo {
+ /* IN variables. */
+ uint32_t max_cpus;
+ XEN_GUEST_HANDLE_64(xen_sysctl_cpuinfo_t) info;
+ /* OUT variables. */
+ uint32_t nr_cpus;
+};
+typedef struct xen_sysctl_getcpuinfo xen_sysctl_getcpuinfo_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_getcpuinfo_t);
struct xen_sysctl {
uint32_t cmd;
@@ -163,6 +196,7 @@ struct xen_sysctl {
struct xen_sysctl_perfc_op perfc_op;
struct xen_sysctl_getdomaininfolist getdomaininfolist;
struct xen_sysctl_debug_keys debug_keys;
+ struct xen_sysctl_getcpuinfo getcpuinfo;
uint8_t pad[128];
} u;
};
next parent reply other threads:[~2007-07-10 3:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707061514.l66FEMix029568@latara.uk.xensource.com>
2007-07-10 3:57 ` Alex Williamson [this message]
2007-07-10 8:35 ` Re: [Xen-staging] [xen-unstable] Extended the physinfo sysctl to export NUMA cpu_to_node topology info Keir Fraser
2007-07-10 5:36 ` [PATCH] " Alex Williamson
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=1184039835.13469.6.camel@bling \
--to=alex.williamson@hp.com \
--cc=keir@xensource.com \
--cc=ryanh@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
/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.