mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: Introduce qemuDomainAgentJob
Introduce guest agent specific job categories to allow threads to run agent monitor specific jobs while normal monitor jobs can also be running. Alter _qemuDomainJobObj in order to duplicate certain fields that will be used for guest agent specific tasks to increase concurrency and throughput and reduce serialization. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
df6f857fbf
commit
4621350f6d
@ -93,6 +93,12 @@ VIR_ENUM_IMPL(qemuDomainJob, QEMU_JOB_LAST,
|
|||||||
"async nested",
|
"async nested",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
VIR_ENUM_IMPL(qemuDomainAgentJob, QEMU_AGENT_JOB_LAST,
|
||||||
|
"none",
|
||||||
|
"query",
|
||||||
|
"modify",
|
||||||
|
);
|
||||||
|
|
||||||
VIR_ENUM_IMPL(qemuDomainAsyncJob, QEMU_ASYNC_JOB_LAST,
|
VIR_ENUM_IMPL(qemuDomainAsyncJob, QEMU_ASYNC_JOB_LAST,
|
||||||
"none",
|
"none",
|
||||||
"migration out",
|
"migration out",
|
||||||
|
@ -82,6 +82,15 @@ typedef enum {
|
|||||||
} qemuDomainJob;
|
} qemuDomainJob;
|
||||||
VIR_ENUM_DECL(qemuDomainJob)
|
VIR_ENUM_DECL(qemuDomainJob)
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
QEMU_AGENT_JOB_NONE = 0, /* No agent job. */
|
||||||
|
QEMU_AGENT_JOB_QUERY, /* Does not change state of domain */
|
||||||
|
QEMU_AGENT_JOB_MODIFY, /* May change state of domain */
|
||||||
|
|
||||||
|
QEMU_AGENT_JOB_LAST
|
||||||
|
} qemuDomainAgentJob;
|
||||||
|
VIR_ENUM_DECL(qemuDomainAgentJob)
|
||||||
|
|
||||||
/* Async job consists of a series of jobs that may change state. Independent
|
/* Async job consists of a series of jobs that may change state. Independent
|
||||||
* jobs that do not change state (and possibly others if explicitly allowed by
|
* jobs that do not change state (and possibly others if explicitly allowed by
|
||||||
* current async job) are allowed to be run even if async job is active.
|
* current async job) are allowed to be run even if async job is active.
|
||||||
@ -158,11 +167,20 @@ typedef struct _qemuDomainJobObj qemuDomainJobObj;
|
|||||||
typedef qemuDomainJobObj *qemuDomainJobObjPtr;
|
typedef qemuDomainJobObj *qemuDomainJobObjPtr;
|
||||||
struct _qemuDomainJobObj {
|
struct _qemuDomainJobObj {
|
||||||
virCond cond; /* Use to coordinate jobs */
|
virCond cond; /* Use to coordinate jobs */
|
||||||
|
|
||||||
|
/* The following members are for QEMU_JOB_* */
|
||||||
qemuDomainJob active; /* Currently running job */
|
qemuDomainJob active; /* Currently running job */
|
||||||
unsigned long long owner; /* Thread id which set current job */
|
unsigned long long owner; /* Thread id which set current job */
|
||||||
const char *ownerAPI; /* The API which owns the job */
|
const char *ownerAPI; /* The API which owns the job */
|
||||||
unsigned long long started; /* When the current job started */
|
unsigned long long started; /* When the current job started */
|
||||||
|
|
||||||
|
/* The following members are for QEMU_AGENT_JOB_* */
|
||||||
|
qemuDomainAgentJob agentActive; /* Currently running agent job */
|
||||||
|
unsigned long long agentOwner; /* Thread id which set current agent job */
|
||||||
|
const char *agentOwnerAPI; /* The API which owns the agent job */
|
||||||
|
unsigned long long agentStarted; /* When the current agent job started */
|
||||||
|
|
||||||
|
/* The following members are for QEMU_ASYNC_JOB_* */
|
||||||
virCond asyncCond; /* Use to coordinate with async jobs */
|
virCond asyncCond; /* Use to coordinate with async jobs */
|
||||||
qemuDomainAsyncJob asyncJob; /* Currently active async job */
|
qemuDomainAsyncJob asyncJob; /* Currently active async job */
|
||||||
unsigned long long asyncOwner; /* Thread which set current async job */
|
unsigned long long asyncOwner; /* Thread which set current async job */
|
||||||
|
Loading…
Reference in New Issue
Block a user