struct _qemuMonitorIOThreadInfo {
unsigned int iothread_id;
int thread_id;
+ bool poll_valid;
+ unsigned long long poll_max_ns;
+ unsigned int poll_grow;
+ unsigned int poll_shrink;
};
int qemuMonitorGetIOThreads(qemuMonitorPtr mon,
qemuMonitorIOThreadInfoPtr **iothreads);
"'thread-id' data"));
goto cleanup;
}
+
+ /* Fetch poll values (since QEMU 2.9 ) if available. QEMU
+ * stores these values as int64_t's; however, the qapi type
+ * is an int. The qapi/misc.json also mis-describes the grow
+ * and shrink values as pure add/remove values. The source
+ * util/aio-posix.c function aio_poll uses them as a factor
+ * or divisor in it's calculation. We will fetch and store
+ * them as defined in our structures. */
+ if (virJSONValueObjectGetNumberUlong(child, "poll-max-ns",
+ &info->poll_max_ns) == 0 &&
+ virJSONValueObjectGetNumberUint(child, "poll-grow",
+ &info->poll_grow) == 0 &&
+ virJSONValueObjectGetNumberUint(child, "poll-shrink",
+ &info->poll_shrink) == 0)
+ info->poll_valid = true;
}
ret = n;