* [Qemu-devel] [PATCH v1] domain_conf: add the support for disk I/O throttle setting
@ 2011-09-07 8:59 Zhi Yong Wu
2011-09-07 9:09 ` [Qemu-devel] sorry, pls ignore, it is not correct.Re: " Zhi Yong Wu
0 siblings, 1 reply; 2+ messages in thread
From: Zhi Yong Wu @ 2011-09-07 8:59 UTC (permalink / raw)
To: qemu-devel; +Cc: zwu.kernel, Zhi Yong Wu, stefanha, agl
The first patch is only used to see if it is suitable for exteeding blkiotune to implement disk I/O throttling.
As you have known, when blkiotune is issued without options, it will display current tuning parameters; If we exceed it, without options, what should it display? both info will? or should one new option be added to separately display them?
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
src/conf/domain_conf.c | 18 ++++++++++++++++++
src/conf/domain_conf.h | 11 +++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index cce9955..7dd350a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9065,6 +9065,24 @@ virDomainDiskDefFormat(virBufferPtr buf,
virBufferAsprintf(buf, " <target dev='%s' bus='%s'/>\n",
def->dst, bus);
+ /*disk I/O throttling*/
+ if (def->blkio.blkiothrottle) {
+ virBufferAsprintf(&buf, " <blkiothrottle>\n");
+ virBufferAsprintf(&buf, " <bps>%llu</bps>\n",
+ def->blkiothrottle.bps);
+ virBufferAsprintf(&buf, " <bps_rd>%llu</bps_rd>\n",
+ def->blkiothrottle.bps_rd);
+ virBufferAsprintf(&buf, " <bps_wr>%llu</bps_wr>\n",
+ def->blkiothrottle.bps_wr);
+ virBufferAsprintf(&buf, " <iops>%llu</iops>\n",
+ def->blkiothrottle.iops);
+ virBufferAsprintf(&buf, " <iops_rd>%llu</iops_rd>\n",
+ def->blkiothrottle.iops_rd);
+ virBufferAsprintf(&buf, " <iops_wr>%llu</iops_wr>\n",
+ def->blkiothrottle.iops_wr);
+ virBufferAsprintf(&buf, " </blkiothrottle>\n");
+ }
+
if (def->bootIndex)
virBufferAsprintf(buf, " <boot order='%d'/>\n", def->bootIndex);
if (def->readonly)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index e218a30..5902377 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -258,6 +258,17 @@ struct _virDomainDiskDef {
virDomainDiskHostDefPtr hosts;
char *driverName;
char *driverType;
+
+ /*disk I/O throttling*/
+ struct {
+ unsigned long long bps;
+ unsigned long long bps_rd;
+ unsigned long long bps_wr;
+ unsigned long long iops;
+ unsigned long long iops_rd;
+ unsigned long long iops_wr;
+ } blkiothrottle;
+
char *serial;
int cachemode;
int error_policy;
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] sorry, pls ignore, it is not correct.Re: [PATCH v1] domain_conf: add the support for disk I/O throttle setting
2011-09-07 8:59 [Qemu-devel] [PATCH v1] domain_conf: add the support for disk I/O throttle setting Zhi Yong Wu
@ 2011-09-07 9:09 ` Zhi Yong Wu
0 siblings, 0 replies; 2+ messages in thread
From: Zhi Yong Wu @ 2011-09-07 9:09 UTC (permalink / raw)
To: qemu-devel
On Wed, Sep 07, 2011 at 04:59:55PM +0800, Zhi Yong Wu wrote:
>From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>To: qemu-devel@nongnu.org
>Cc: stefanha@linux.vnet.ibm.com, agl@us.ibm.com, zwu.kernel@gmail.com, Zhi
> Yong Wu <wuzhy@linux.vnet.ibm.com>
>Subject: [PATCH v1] domain_conf: add the support for disk I/O throttle
> setting
>Date: Wed, 7 Sep 2011 16:59:55 +0800
>Message-Id: <1315385995-23283-1-git-send-email-wuzhy@linux.vnet.ibm.com>
>X-Mailer: git-send-email 1.7.6
>X-Xagent-From: wuzhy@linux.vnet.ibm.com
>X-Xagent-To: wuzhy@linux.vnet.ibm.com
>X-Xagent-Gateway: vmsdvm6.vnet.ibm.com (XAGENTU3 at VMSDVM6)
>
>The first patch is only used to see if it is suitable for exteeding blkiotune to implement disk I/O throttling.
>
>As you have known, when blkiotune is issued without options, it will display current tuning parameters; If we exceed it, without options, what should it display? both info will? or should one new option be added to separately display them?
>
>Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>---
> src/conf/domain_conf.c | 18 ++++++++++++++++++
> src/conf/domain_conf.h | 11 +++++++++++
> 2 files changed, 29 insertions(+), 0 deletions(-)
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index cce9955..7dd350a 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -9065,6 +9065,24 @@ virDomainDiskDefFormat(virBufferPtr buf,
> virBufferAsprintf(buf, " <target dev='%s' bus='%s'/>\n",
> def->dst, bus);
>
>+ /*disk I/O throttling*/
>+ if (def->blkio.blkiothrottle) {
>+ virBufferAsprintf(&buf, " <blkiothrottle>\n");
>+ virBufferAsprintf(&buf, " <bps>%llu</bps>\n",
>+ def->blkiothrottle.bps);
>+ virBufferAsprintf(&buf, " <bps_rd>%llu</bps_rd>\n",
>+ def->blkiothrottle.bps_rd);
>+ virBufferAsprintf(&buf, " <bps_wr>%llu</bps_wr>\n",
>+ def->blkiothrottle.bps_wr);
>+ virBufferAsprintf(&buf, " <iops>%llu</iops>\n",
>+ def->blkiothrottle.iops);
>+ virBufferAsprintf(&buf, " <iops_rd>%llu</iops_rd>\n",
>+ def->blkiothrottle.iops_rd);
>+ virBufferAsprintf(&buf, " <iops_wr>%llu</iops_wr>\n",
>+ def->blkiothrottle.iops_wr);
>+ virBufferAsprintf(&buf, " </blkiothrottle>\n");
>+ }
>+
> if (def->bootIndex)
> virBufferAsprintf(buf, " <boot order='%d'/>\n", def->bootIndex);
> if (def->readonly)
>diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
>index e218a30..5902377 100644
>--- a/src/conf/domain_conf.h
>+++ b/src/conf/domain_conf.h
>@@ -258,6 +258,17 @@ struct _virDomainDiskDef {
> virDomainDiskHostDefPtr hosts;
> char *driverName;
> char *driverType;
>+
>+ /*disk I/O throttling*/
>+ struct {
>+ unsigned long long bps;
>+ unsigned long long bps_rd;
>+ unsigned long long bps_wr;
>+ unsigned long long iops;
>+ unsigned long long iops_rd;
>+ unsigned long long iops_wr;
>+ } blkiothrottle;
>+
> char *serial;
> int cachemode;
> int error_policy;
>--
>1.7.6
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-07 9:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 8:59 [Qemu-devel] [PATCH v1] domain_conf: add the support for disk I/O throttle setting Zhi Yong Wu
2011-09-07 9:09 ` [Qemu-devel] sorry, pls ignore, it is not correct.Re: " Zhi Yong Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).