[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6 of 9] libxl: expose cpu topology as a single list of cpu->{node, core, socket} maps
On Fri, 2012-01-27 at 18:10 +0000, Ian Jackson wrote: > Ian Campbell writes ("[Xen-devel] [PATCH 6 of 9] libxl: expose cpu topology > as a single list of cpu->{node, core, socket} maps"): > > libxl: expose cpu topology as a single list of cpu->{node,core,socket} maps. > > > > Rather than the previous tripple list which is more complicated to work with > > and harder for language bindings. > > > + for (cpu = 0; cpu < nr; cpu++) { > ... > > + libxl_cputopology_dispose(&topology[cpu]); > > } > > > > - libxl_topologyinfo_dispose(&topology); > > - > > + free(topology); > > This is quite ugly to have out here in the caller. Perhaps we should > provide a helper for this, called libxl_cputopology_free or > something ? > > > - libxl_topologyinfo_dispose(&topology); > > + for (cpu = 0; cpu < nr_cpus; cpu++) > > + libxl_cputopology_dispose(&topology[cpu]); > > + free(topology); > > And here it is again, proving my point :-). I added libxl_cputopology_list_free(libxl_cputopology *, int nr) which disposes all elements of the list and frees the underlying storage. Is that what you meant? I don't like "list" rather than "array" but we use the terminology that way elsewhere too (e.g. libxl_device_FOO_list, so I suppose it is my own fault) > > +#define LIBXL_CPUTOPOLOGY_INVALID_ENTRY ~0 > ... > > +libxl_cputopology = Struct("cputopology", [ > > + ("core", uint32), > > + ("socket", uint32), > > + ("node", uint32), > > You mean (~(uint32_t)0) I think. The outer ( ) should be included too! Done. Updated patch below: # HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1328015490 0 # Node ID f8fbad48472b54e8055a861af0be6c9455e3d160 # Parent 1ab41d14959e9e378ca0ca80603524d1f8a05478 libxl: expose cpu topology as a single list of cpu->{node,core,socket} maps. Rather than the previous tripple list which is more complicated to work with and harder for language bindings. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> diff -r 1ab41d14959e -r f8fbad48472b tools/libxl/gentest.py --- a/tools/libxl/gentest.py Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/libxl/gentest.py Tue Jan 31 13:11:30 2012 +0000 @@ -195,6 +195,7 @@ static void libxl_string_list_rand_init( *p = l; } +#if 0 /* To be remove in a subsequent patch */ static void libxl_cpuarray_rand_init(libxl_cpuarray *p) { int i; @@ -209,6 +210,7 @@ static void libxl_cpuarray_rand_init(lib p->array[i] = r; } } +#endif """) for ty in builtins + types: if ty.typename not in handcoded: diff -r 1ab41d14959e -r f8fbad48472b tools/libxl/libxl.c --- a/tools/libxl/libxl.c Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/libxl/libxl.c Tue Jan 31 13:11:30 2012 +0000 @@ -2755,57 +2755,68 @@ int libxl_get_physinfo(libxl_ctx *ctx, l return 0; } -int libxl_get_topologyinfo(libxl_ctx *ctx, libxl_topologyinfo *info) +libxl_cputopology *libxl_get_cpu_topology(libxl_ctx *ctx, int *nr) { xc_topologyinfo_t tinfo; DECLARE_HYPERCALL_BUFFER(xc_cpu_to_core_t, coremap); DECLARE_HYPERCALL_BUFFER(xc_cpu_to_socket_t, socketmap); DECLARE_HYPERCALL_BUFFER(xc_cpu_to_node_t, nodemap); + libxl_cputopology *ret = NULL; int i; - int rc = 0; - - rc += libxl_cpuarray_alloc(ctx, &info->coremap); - rc += libxl_cpuarray_alloc(ctx, &info->socketmap); - rc += libxl_cpuarray_alloc(ctx, &info->nodemap); - if (rc) + int max_cpus; + + max_cpus = libxl_get_max_cpus(ctx); + if (max_cpus == 0) + { + LIBXL__LOG(ctx, XTL_ERROR, "Unable to determine number of CPUS"); + return NULL; + } + + coremap = xc_hypercall_buffer_alloc + (ctx->xch, coremap, sizeof(*coremap) * max_cpus); + socketmap = xc_hypercall_buffer_alloc + (ctx->xch, socketmap, sizeof(*socketmap) * max_cpus); + nodemap = xc_hypercall_buffer_alloc + (ctx->xch, nodemap, sizeof(*nodemap) * max_cpus); + if ((coremap == NULL) || (socketmap == NULL) || (nodemap == NULL)) { + LIBXL__LOG_ERRNOVAL(ctx, XTL_ERROR, ENOMEM, + "Unable to allocate hypercall arguments"); goto fail; - - coremap = xc_hypercall_buffer_alloc(ctx->xch, coremap, sizeof(*coremap) * info->coremap.entries); - socketmap = xc_hypercall_buffer_alloc(ctx->xch, socketmap, sizeof(*socketmap) * info->socketmap.entries); - nodemap = xc_hypercall_buffer_alloc(ctx->xch, nodemap, sizeof(*nodemap) * info->nodemap.entries); - if ((coremap == NULL) || (socketmap == NULL) || (nodemap == NULL)) - goto fail; + } set_xen_guest_handle(tinfo.cpu_to_core, coremap); set_xen_guest_handle(tinfo.cpu_to_socket, socketmap); set_xen_guest_handle(tinfo.cpu_to_node, nodemap); - tinfo.max_cpu_index = info->coremap.entries - 1; - if (xc_topologyinfo(ctx->xch, &tinfo) != 0) + tinfo.max_cpu_index = max_cpus - 1; + if (xc_topologyinfo(ctx->xch, &tinfo) != 0) { + LIBXL__LOG_ERRNO(ctx, XTL_ERROR, "Topology info hypercall failed"); goto fail; - - for (i = 0; i <= tinfo.max_cpu_index; i++) { - if (i < info->coremap.entries) - info->coremap.array[i] = (coremap[i] == INVALID_TOPOLOGY_ID) ? - LIBXL_CPUARRAY_INVALID_ENTRY : coremap[i]; - if (i < info->socketmap.entries) - info->socketmap.array[i] = (socketmap[i] == INVALID_TOPOLOGY_ID) ? - LIBXL_CPUARRAY_INVALID_ENTRY : socketmap[i]; - if (i < info->nodemap.entries) - info->nodemap.array[i] = (nodemap[i] == INVALID_TOPOLOGY_ID) ? - LIBXL_CPUARRAY_INVALID_ENTRY : nodemap[i]; } - xc_hypercall_buffer_free(ctx->xch, coremap); - xc_hypercall_buffer_free(ctx->xch, socketmap); - xc_hypercall_buffer_free(ctx->xch, nodemap); - return 0; + ret = malloc(sizeof(libxl_cputopology) * max_cpus); + if (ret == NULL) { + LIBXL__LOG_ERRNOVAL(ctx, XTL_ERROR, ENOMEM, + "Unable to allocate return value"); + goto fail; + } + + for (i = 0; i <= max_cpus; i++) { +#define V(map, i) (map[i] == INVALID_TOPOLOGY_ID) ? \ + LIBXL_CPUTOPOLOGY_INVALID_ENTRY : map[i] + ret[i].core = V(coremap, i); + ret[i].socket = V(socketmap, i); + ret[i].node = V(nodemap, i); +#undef V + } fail: xc_hypercall_buffer_free(ctx->xch, coremap); xc_hypercall_buffer_free(ctx->xch, socketmap); xc_hypercall_buffer_free(ctx->xch, nodemap); - libxl_topologyinfo_dispose(info); - return ERROR_FAIL; + + if (ret) + *nr = max_cpus; + return ret; } const libxl_version_info* libxl_get_version_info(libxl_ctx *ctx) @@ -3604,30 +3615,30 @@ int libxl_cpupool_cpuadd(libxl_ctx *ctx, int libxl_cpupool_cpuadd_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus) { int rc = 0; - int cpu; + int cpu, nr; libxl_cpumap freemap; - libxl_topologyinfo topology; + libxl_cputopology *topology; if (libxl_get_freecpus(ctx, &freemap)) { return ERROR_FAIL; } - if (libxl_get_topologyinfo(ctx, &topology)) { + topology = libxl_get_cpu_topology(ctx, &nr); + if (!topology) { rc = ERROR_FAIL; goto out; } *cpus = 0; - for (cpu = 0; cpu < topology.nodemap.entries; cpu++) { - if (libxl_cpumap_test(&freemap, cpu) && - (topology.nodemap.array[cpu] == node) && + for (cpu = 0; cpu < nr; cpu++) { + if (libxl_cpumap_test(&freemap, cpu) && (topology[cpu].node == node) && !libxl_cpupool_cpuadd(ctx, poolid, cpu)) { (*cpus)++; } + libxl_cputopology_dispose(&topology[cpu]); } - libxl_topologyinfo_dispose(&topology); - + free(topology); out: libxl_cpumap_dispose(&freemap); return rc; @@ -3651,8 +3662,8 @@ int libxl_cpupool_cpuremove_node(libxl_c int ret = 0; int n_pools; int p; - int cpu; - libxl_topologyinfo topology; + int cpu, nr_cpus; + libxl_cputopology *topology; libxl_cpupoolinfo *poolinfo; poolinfo = libxl_list_cpupool(ctx, &n_pools); @@ -3660,7 +3671,8 @@ int libxl_cpupool_cpuremove_node(libxl_c return ERROR_NOMEM; } - if (libxl_get_topologyinfo(ctx, &topology)) { + topology = libxl_get_cpu_topology(ctx, &nr_cpus); + if (!topology) { ret = ERROR_FAIL; goto out; } @@ -3668,8 +3680,8 @@ int libxl_cpupool_cpuremove_node(libxl_c *cpus = 0; for (p = 0; p < n_pools; p++) { if (poolinfo[p].poolid == poolid) { - for (cpu = 0; cpu < topology.nodemap.entries; cpu++) { - if ((topology.nodemap.array[cpu] == node) && + for (cpu = 0; cpu < nr_cpus; cpu++) { + if ((topology[cpu].node == node) && libxl_cpumap_test(&poolinfo[p].cpumap, cpu) && !libxl_cpupool_cpuremove(ctx, poolid, cpu)) { (*cpus)++; @@ -3678,7 +3690,9 @@ int libxl_cpupool_cpuremove_node(libxl_c } } - libxl_topologyinfo_dispose(&topology); + for (cpu = 0; cpu < nr_cpus; cpu++) + libxl_cputopology_dispose(&topology[cpu]); + free(topology); out: for (p = 0; p < n_pools; p++) { diff -r 1ab41d14959e -r f8fbad48472b tools/libxl/libxl.h --- a/tools/libxl/libxl.h Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/libxl/libxl.h Tue Jan 31 13:11:30 2012 +0000 @@ -576,7 +576,9 @@ int libxl_userdata_retrieve(libxl_ctx *c */ int libxl_get_physinfo(libxl_ctx *ctx, libxl_physinfo *physinfo); -int libxl_get_topologyinfo(libxl_ctx *ctx, libxl_topologyinfo *info); +#define LIBXL_CPUTOPOLOGY_INVALID_ENTRY (~(uint32_t)0) +libxl_cputopology *libxl_get_cpu_topology(libxl_ctx *ctx, int *nr); +void libxl_cputopology_list_free(libxl_cputopology *, int nr); libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid, int *nb_vcpu, int *nrcpus); int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid, diff -r 1ab41d14959e -r f8fbad48472b tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/libxl/libxl_types.idl Tue Jan 31 13:11:30 2012 +0000 @@ -376,10 +376,10 @@ libxl_physinfo = Struct("physinfo", [ ("phys_cap", uint32), ], dispose_fn=None, dir=DIR_OUT) -libxl_topologyinfo = Struct("topologyinfo", [ - ("coremap", libxl_cpuarray), # cpu to core map - ("socketmap", libxl_cpuarray), # cpu to socket map - ("nodemap", libxl_cpuarray), # cpu to node map +libxl_cputopology = Struct("cputopology", [ + ("core", uint32), + ("socket", uint32), + ("node", uint32), ]) libxl_sched_credit = Struct("sched_credit", [ diff -r 1ab41d14959e -r f8fbad48472b tools/libxl/libxl_utils.c --- a/tools/libxl/libxl_utils.c Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/libxl/libxl_utils.c Tue Jan 31 13:11:30 2012 +0000 @@ -557,6 +557,14 @@ int libxl__enum_from_string(const libxl_ return ERROR_FAIL; } +void libxl_cputopology_list_free(libxl_cputopology *list, int nr) +{ + int i; + for (i = 0; i < nr; i++) + libxl_cputopology_dispose(&list[i]); + free(list); +} + /* * Local variables: * mode: C diff -r 1ab41d14959e -r f8fbad48472b tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/libxl/xl_cmdimpl.c Tue Jan 31 13:11:30 2012 +0000 @@ -3856,10 +3856,11 @@ static void output_physinfo(void) static void output_topologyinfo(void) { - libxl_topologyinfo info; - int i; - - if (libxl_get_topologyinfo(ctx, &info)) { + libxl_cputopology *info; + int i, nr; + + info = libxl_get_cpu_topology(ctx, &nr); + if (info == NULL) { fprintf(stderr, "libxl_get_topologyinfo failed.\n"); return; } @@ -3867,16 +3868,16 @@ static void output_topologyinfo(void) printf("cpu_topology :\n"); printf("cpu: core socket node\n"); - for (i = 0; i < info.coremap.entries; i++) { - if (info.coremap.array[i] != LIBXL_CPUARRAY_INVALID_ENTRY) - printf("%3d: %4d %4d %4d\n", i, info.coremap.array[i], - info.socketmap.array[i], info.nodemap.array[i]); - } + for (i = 0; i < nr; i++) { + if (info[i].core != LIBXL_CPUTOPOLOGY_INVALID_ENTRY) + printf("%3d: %4d %4d %4d\n", i, + info[i].core, info[i].socket, info[i].node); + } + + libxl_cputopology_list_free(info, nr); printf("numa_info : none\n"); - libxl_topologyinfo_dispose(&info); - return; } @@ -5373,7 +5374,7 @@ int main_cpupoolcreate(int argc, char ** libxl_cpumap freemap; libxl_cpumap cpumap; libxl_uuid uuid; - libxl_topologyinfo topology; + libxl_cputopology *topology; while (1) { opt = getopt_long(argc, argv, "hnf:", long_options, &option_index); @@ -5482,16 +5483,18 @@ int main_cpupoolcreate(int argc, char ** return -ERROR_FAIL; } if (!xlu_cfg_get_list(config, "nodes", &nodes, 0, 0)) { + int nr; n_cpus = 0; n_nodes = 0; - if (libxl_get_topologyinfo(ctx, &topology)) { + topology = libxl_get_cpu_topology(ctx, &nr); + if (topology == NULL) { fprintf(stderr, "libxl_get_topologyinfo failed\n"); return -ERROR_FAIL; } while ((buf = xlu_cfg_get_listitem(nodes, n_nodes)) != NULL) { n = atoi(buf); - for (i = 0; i < topology.nodemap.entries; i++) { - if ((topology.nodemap.array[i] == n) && + for (i = 0; i < nr; i++) { + if ((topology[i].node == n) && libxl_cpumap_test(&freemap, i)) { libxl_cpumap_set(&cpumap, i); n_cpus++; @@ -5500,7 +5503,7 @@ int main_cpupoolcreate(int argc, char ** n_nodes++; } - libxl_topologyinfo_dispose(&topology); + libxl_cputopology_list_free(topology, nr); if (n_cpus == 0) { fprintf(stderr, "no free cpu found\n"); @@ -5822,11 +5825,12 @@ int main_cpupoolnumasplit(int argc, char int schedid; int n_pools; int node; + int n_cpus; char name[16]; libxl_uuid uuid; libxl_cpumap cpumap; libxl_cpupoolinfo *poolinfo; - libxl_topologyinfo topology; + libxl_cputopology *topology; libxl_dominfo info; if ((opt = def_getopt(argc, argv, "", "cpupool-numa-split", 0)) != -1) @@ -5848,21 +5852,22 @@ int main_cpupoolnumasplit(int argc, char return -ERROR_FAIL; } - if (libxl_get_topologyinfo(ctx, &topology)) { + topology = libxl_get_cpu_topology(ctx, &n_cpus); + if (topology == NULL) { fprintf(stderr, "libxl_get_topologyinfo failed\n"); return -ERROR_FAIL; } if (libxl_cpumap_alloc(ctx, &cpumap)) { fprintf(stderr, "Failed to allocate cpumap\n"); - libxl_topologyinfo_dispose(&topology); + libxl_cputopology_list_free(topology, n_cpus); return -ERROR_FAIL; } /* Reset Pool-0 to 1st node: first add cpus, then remove cpus to avoid a cpupool without cpus in between */ - node = topology.nodemap.array[0]; + node = topology[0].node; if (libxl_cpupool_cpuadd_node(ctx, 0, node, &n)) { fprintf(stderr, "error on adding cpu to Pool 0\n"); return -ERROR_FAIL; @@ -5876,9 +5881,9 @@ int main_cpupoolnumasplit(int argc, char } n = 0; - for (c = 0; c < topology.nodemap.entries; c++) { - if (topology.nodemap.array[c] == node) { - topology.nodemap.array[c] = LIBXL_CPUARRAY_INVALID_ENTRY; + for (c = 0; c < n_cpus; c++) { + if (topology[c].node == node) { + topology[c].node = LIBXL_CPUTOPOLOGY_INVALID_ENTRY; libxl_cpumap_set(&cpumap, n); n++; } @@ -5903,12 +5908,12 @@ int main_cpupoolnumasplit(int argc, char } memset(cpumap.map, 0, cpumap.size); - for (c = 0; c < topology.nodemap.entries; c++) { - if (topology.nodemap.array[c] == LIBXL_CPUARRAY_INVALID_ENTRY) { + for (c = 0; c < n_cpus; c++) { + if (topology[c].node == LIBXL_CPUTOPOLOGY_INVALID_ENTRY) { continue; } - node = topology.nodemap.array[c]; + node = topology[c].node; ret = -libxl_cpupool_cpuremove_node(ctx, 0, node, &n); if (ret) { fprintf(stderr, "error on removing cpu from Pool 0\n"); @@ -5930,15 +5935,15 @@ int main_cpupoolnumasplit(int argc, char goto out; } - for (p = c; p < topology.nodemap.entries; p++) { - if (topology.nodemap.array[p] == node) { - topology.nodemap.array[p] = LIBXL_CPUARRAY_INVALID_ENTRY; + for (p = c; p < n_cpus; p++) { + if (topology[p].node == node) { + topology[p].node = LIBXL_CPUTOPOLOGY_INVALID_ENTRY; } } } out: - libxl_topologyinfo_dispose(&topology); + libxl_cputopology_list_free(topology, n_cpus); libxl_cpumap_dispose(&cpumap); return ret; diff -r 1ab41d14959e -r f8fbad48472b tools/ocaml/libs/xl/genwrap.py --- a/tools/ocaml/libs/xl/genwrap.py Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/ocaml/libs/xl/genwrap.py Tue Jan 31 13:11:30 2012 +0000 @@ -29,6 +29,8 @@ functions = { # ( name , [type1,type2,.. "device_pci": DEVICE_FUNCTIONS, "physinfo": [ ("get", ["unit", "t"]), ], + "cputopology": [ ("get", ["unit", "t array"]), + ], "sched_credit": [ ("domain_get", ["domid", "t"]), ("domain_set", ["domid", "t", "unit"]), ], @@ -266,7 +268,6 @@ if __name__ == '__main__': "domain_create_info", "domain_build_info", "vcpuinfo", - "topologyinfo", "event", ] diff -r 1ab41d14959e -r f8fbad48472b tools/ocaml/libs/xl/xenlight.ml.in --- a/tools/ocaml/libs/xl/xenlight.ml.in Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/ocaml/libs/xl/xenlight.ml.in Tue Jan 31 13:11:30 2012 +0000 @@ -19,17 +19,6 @@ type domid = int (* @@LIBXL_TYPES@@ *) -module Topologyinfo = struct - type t = - { - core : int; - socket : int; - node : int; - } - external get : unit -> t array = "stub_xl_topologyinfo" -end - - external send_trigger : domid -> trigger -> int -> unit = "stub_xl_send_trigger" external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq" external send_debug_keys : domid -> string -> unit = "stub_xl_send_debug_keys" diff -r 1ab41d14959e -r f8fbad48472b tools/ocaml/libs/xl/xenlight.mli.in --- a/tools/ocaml/libs/xl/xenlight.mli.in Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/ocaml/libs/xl/xenlight.mli.in Tue Jan 31 13:11:30 2012 +0000 @@ -19,16 +19,6 @@ type domid = int (* @@LIBXL_TYPES@@ *) -module Topologyinfo : sig - type t = - { - core : int; - socket : int; - node : int; - } - external get : unit -> t array = "stub_xl_topologyinfo" -end - external send_trigger : domid -> trigger -> int -> unit = "stub_xl_send_trigger" external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq" external send_debug_keys : domid -> string -> unit = "stub_xl_send_debug_keys" diff -r 1ab41d14959e -r f8fbad48472b tools/ocaml/libs/xl/xenlight_stubs.c --- a/tools/ocaml/libs/xl/xenlight_stubs.c Tue Jan 31 13:11:29 2012 +0000 +++ b/tools/ocaml/libs/xl/xenlight_stubs.c Tue Jan 31 13:11:30 2012 +0000 @@ -210,28 +210,6 @@ static value Val_hwcap(libxl_hwcap *c_va #include "_libxl_types.inc" -static value Val_topologyinfo(libxl_topologyinfo *c_val) -{ - CAMLparam0(); - CAMLlocal3(v, topology, topologyinfo); - int i; - - topologyinfo = caml_alloc_tuple(c_val->coremap.entries); - for (i = 0; i < c_val->coremap.entries; i++) { - v = Val_none; - if (c_val->coremap.array[i] != LIBXL_CPUARRAY_INVALID_ENTRY) { - topology = caml_alloc_tuple(3); - Store_field(topology, 0, Val_int(c_val->coremap.array[i])); - Store_field(topology, 1, Val_int(c_val->socketmap.array[i])); - Store_field(topology, 2, Val_int(c_val->nodemap.array[i])); - v = Val_some(topology); - } - Store_field(topologyinfo, i, v); - } - - CAMLreturn(topologyinfo); -} - value stub_xl_device_disk_add(value info, value domid) { CAMLparam2(info, domid); @@ -462,22 +440,33 @@ value stub_xl_physinfo_get(value unit) CAMLreturn(physinfo); } -value stub_xl_topologyinfo(value unit) +value stub_xl_cputopology_get(value unit) { CAMLparam1(unit); - CAMLlocal1(topologyinfo); - libxl_topologyinfo c_topologyinfo; - int ret; + CAMLlocal2(topology, v); + libxl_cputopology *c_topology; + int i, nr, ret; INIT_STRUCT(); INIT_CTX(); - ret = libxl_get_topologyinfo(ctx, &c_topologyinfo); + + c_topology = libxl_get_cpu_topology(ctx, &nr); if (ret != 0) failwith_xl("topologyinfo", &lg); + + topology = caml_alloc_tuple(nr); + for (i = 0; i < nr; i++) { + if (c_topology[i].core != LIBXL_CPUTOPOLOGY_INVALID_ENTRY) + v = Val_some(Val_cputopology(&gc, &lg, &c_topology[i])); + else + v = Val_none; + Store_field(topology, i, v); + } + + libxl_cputopology_list_free(c_topology, nr); + FREE_CTX(); - - topologyinfo = Val_topologyinfo(&c_topologyinfo); - CAMLreturn(topologyinfo); + CAMLreturn(topology); } value stub_xl_sched_credit_domain_get(value domid) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |