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@amd.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
}
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;
+}
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 */