From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1E98-0002XK-8Y for qemu-devel@nongnu.org; Wed, 07 Sep 2011 05:10:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1E96-00060w-W5 for qemu-devel@nongnu.org; Wed, 07 Sep 2011 05:10:14 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:53170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1E96-00060c-4k for qemu-devel@nongnu.org; Wed, 07 Sep 2011 05:10:12 -0400 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp02.in.ibm.com (8.14.4/8.13.1) with ESMTP id p879A7oL029796 for ; Wed, 7 Sep 2011 14:40:07 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p879A6nn2617576 for ; Wed, 7 Sep 2011 14:40:06 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p879A5ug002737 for ; Wed, 7 Sep 2011 14:40:05 +0530 Received: from f15.cn.ibm.com ([9.115.118.38]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p879A31s001215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 7 Sep 2011 14:40:05 +0530 Date: Wed, 7 Sep 2011 17:09:26 +0800 From: Zhi Yong Wu Message-ID: <20110907090926.GA2606@f15.cn.ibm.com> References: <1315385995-23283-1-git-send-email-wuzhy@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1315385995-23283-1-git-send-email-wuzhy@linux.vnet.ibm.com> Subject: [Qemu-devel] sorry, pls ignore, it is not correct.Re: [PATCH v1] domain_conf: add the support for disk I/O throttle setting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Sep 07, 2011 at 04:59:55PM +0800, Zhi Yong Wu wrote: >From: Zhi Yong Wu >To: qemu-devel@nongnu.org >Cc: stefanha@linux.vnet.ibm.com, agl@us.ibm.com, zwu.kernel@gmail.com, Zhi > Yong Wu >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 >--- > 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, " \n", > def->dst, bus); > >+ /*disk I/O throttling*/ >+ if (def->blkio.blkiothrottle) { >+ virBufferAsprintf(&buf, " \n"); >+ virBufferAsprintf(&buf, " %llu\n", >+ def->blkiothrottle.bps); >+ virBufferAsprintf(&buf, " %llu\n", >+ def->blkiothrottle.bps_rd); >+ virBufferAsprintf(&buf, " %llu\n", >+ def->blkiothrottle.bps_wr); >+ virBufferAsprintf(&buf, " %llu\n", >+ def->blkiothrottle.iops); >+ virBufferAsprintf(&buf, " %llu\n", >+ def->blkiothrottle.iops_rd); >+ virBufferAsprintf(&buf, " %llu\n", >+ def->blkiothrottle.iops_wr); >+ virBufferAsprintf(&buf, " \n"); >+ } >+ > if (def->bootIndex) > virBufferAsprintf(buf, " \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 >