WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: add sched_get_id function

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: add sched_get_id function
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Apr 2010 17:30:16 -0700
Delivery-date: Thu, 22 Apr 2010 17:30:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=