On 02/24/2015 03:11 PM, Laine Stump wrote: > On 02/17/2015 04:03 PM, John Ferlan wrote: >> Add virDomainGetIOThreadsInfo in order to return a list of >> virDomainIOThreadsInfoPtr structures which list the IOThread ID, >> the CPU Affinity map, and associated resources for each IOThread >> for the domain. For an active domain, the live data will be >> returned, while for an inactive domain, the config data will be >> returned. The resources data is expected to be the src path for >> the disks that have an assigned iothread. >> >> The API supports either the --live or --config flag, but not both. >> >> Also added virDomainIOThreadsInfoFree in order to free the cpumap, >> list of resources, and the array entry structure. >> >> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> >> --- >> include/libvirt/libvirt-domain.h | 23 +++++++++++- >> src/driver-hypervisor.h | 8 +++- >> src/libvirt-domain.c | 80 +++++++++++++++++++++++++++++++++++++++- >> src/libvirt_public.syms | 6 +++ >> 4 files changed, 114 insertions(+), 3 deletions(-) >> >> diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h >> index 4dbd7f5..9dcc424 100644 >> --- a/include/libvirt/libvirt-domain.h >> +++ b/include/libvirt/libvirt-domain.h >> @@ -4,7 +4,7 @@ >> * Description: Provides APIs for the management of domains >> * Author: Daniel Veillard <veillard@xxxxxxxxxx> >> * >> - * Copyright (C) 2006-2014 Red Hat, Inc. >> + * Copyright (C) 2006-2015 Red Hat, Inc. >> * >> * This library is free software; you can redistribute it and/or >> * modify it under the terms of the GNU Lesser General Public >> @@ -1568,6 +1568,27 @@ int virDomainGetEmulatorPinInfo (virDomainPtr domain, >> unsigned int flags); >> >> /** >> + * virIOThreadsInfo: >> + * >> + * The data structure for information about IOThreads in a domain >> + */ >> +typedef struct _virDomainIOThreadsInfo virDomainIOThreadsInfo; >> +typedef virDomainIOThreadsInfo *virDomainIOThreadsInfoPtr; >> +struct _virDomainIOThreadsInfo { >> + unsigned int iothread_id; /* IOThread ID */ >> + unsigned char *cpumap; /* CPU map for thread */ >> + int cpumaplen; /* cpumap size */ >> + size_t nresources; /* count of resources using IOThread */ >> + char **resources; /* array of resources using IOThread */ >> +}; > > As an outsider, I'm left a bit uninformed about exactly what will be in > cpumap and resources. Is this information available elsewhere in the > documentation already? > Point well taken... Just a little lower in the file cpumap is explained a few times, but I can copy those descriptions here too John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list