|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] libxl: add sched_get_id function
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271925519 -3600
# Node ID 8567087654f0d6ec42636aaed46bc4d7ad9c40bc
# Parent a02f1de9b8a32b1cb37ebfee79a7a994994c1989
libxl: add sched_get_id function
To get the name of the currently used scheduler, Xen provides a
sched_id sysctl. Add a libxl wrapper around the libxc function to
query this.
Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
Acked-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
tools/libxl/libxl.c | 13 +++++++++++++
tools/libxl/libxl.h | 2 ++
2 files changed, 15 insertions(+)
diff -r a02f1de9b8a3 -r 8567087654f0 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Thu Apr 22 09:37:31 2010 +0100
+++ b/tools/libxl/libxl.c Thu Apr 22 09:38:39 2010 +0100
@@ -2421,3 +2421,16 @@ int libxl_set_vcpucount(struct libxl_ctx
}
return 0;
}
+
+/*
+ * returns one of the XEN_SCHEDULER_* constants from public/domctl.h
+ * or -1 if an error occured.
+ */
+int libxl_get_sched_id(struct libxl_ctx *ctx)
+{
+ int sched, ret;
+
+ if ((ret = xc_sched_id(ctx->xch, &sched)) != 0)
+ return ret;
+ return sched;
+}
diff -r a02f1de9b8a3 -r 8567087654f0 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h Thu Apr 22 09:37:31 2010 +0100
+++ b/tools/libxl/libxl.h Thu Apr 22 09:38:39 2010 +0100
@@ -438,5 +438,7 @@ int libxl_set_vcpuaffinity(struct libxl_
int libxl_set_vcpuaffinity(struct libxl_ctx *ctx, uint32_t domid, uint32_t
vcpuid,
uint64_t *cpumap, int cpusize);
int libxl_set_vcpucount(struct libxl_ctx *ctx, uint32_t domid, uint32_t count);
+
+int libxl_get_sched_id(struct libxl_ctx *ctx);
#endif /* LIBXL_H */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] libxl: add sched_get_id function,
Xen patchbot-unstable <=
|
|
|
|
|