mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Implement public API for virDomainGetIOThreadsInfo
Add virDomainGetIOThreadInfo in order to return a list of virDomainIOThreadInfoPtr structures which list the IOThread ID and the CPU Affinity map 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 API supports either the --live or --config flag, but not both. Also added virDomainIOThreadsInfoFree in order to free the cpumap and the IOThreadInfo structure. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Description: Provides APIs for the management of domains
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* 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
|
||||
@@ -1590,6 +1590,26 @@ int virDomainGetEmulatorPinInfo (virDomainPtr domain,
|
||||
int maplen,
|
||||
unsigned int flags);
|
||||
|
||||
/**
|
||||
* virIOThreadInfo:
|
||||
*
|
||||
* The data structure for information about all IOThreads in a domain
|
||||
*/
|
||||
typedef struct _virDomainIOThreadInfo virDomainIOThreadInfo;
|
||||
typedef virDomainIOThreadInfo *virDomainIOThreadInfoPtr;
|
||||
struct _virDomainIOThreadInfo {
|
||||
unsigned int iothread_id; /* IOThread ID */
|
||||
unsigned char *cpumap; /* CPU map for thread. A pointer to an */
|
||||
/* array of real CPUs (in 8-bit bytes) */
|
||||
int cpumaplen; /* cpumap size */
|
||||
};
|
||||
|
||||
void virDomainIOThreadsInfoFree(virDomainIOThreadInfoPtr info);
|
||||
|
||||
int virDomainGetIOThreadsInfo(virDomainPtr domain,
|
||||
virDomainIOThreadInfoPtr **info,
|
||||
unsigned int flags);
|
||||
|
||||
/**
|
||||
* VIR_USE_CPU:
|
||||
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
|
||||
|
||||
Reference in New Issue
Block a user