From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhi Yong Wu Subject: Re: [Qemu-devel] [PATCH v8 3/4] block: add block timer and throttling algorithm Date: Tue, 18 Oct 2011 16:29:40 +0800 Message-ID: References: <1315476668-19812-1-git-send-email-wuzhy@linux.vnet.ibm.com> <1315476668-19812-4-git-send-email-wuzhy@linux.vnet.ibm.com> <4E7CB18F.1080402@redhat.com> <4E9C02D7.3030203@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Zhi Yong Wu , aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, pair@us.ibm.com, ryanh@us.ibm.com, Kevin Wolf To: Stefan Hajnoczi Return-path: Received: from mail-vw0-f46.google.com ([209.85.212.46]:60234 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754492Ab1JRI3k convert rfc822-to-8bit (ORCPT ); Tue, 18 Oct 2011 04:29:40 -0400 Received: by vws1 with SMTP id 1so127925vws.19 for ; Tue, 18 Oct 2011 01:29:40 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Oct 17, 2011 at 11:54 PM, Stefan Hajnoczi = wrote: > On Mon, Oct 17, 2011 at 11:26 AM, Kevin Wolf wrote= : >> Am 26.09.2011 09:24, schrieb Zhi Yong Wu: >>> On Sat, Sep 24, 2011 at 12:19 AM, Kevin Wolf wro= te: >>>> Am 08.09.2011 12:11, schrieb Zhi Yong Wu: >>>>> Note: >>>>> =A0 =A0 =A01.) When bps/iops limits are specified to a small valu= e such as 511 bytes/s, this VM will hang up. We are considering how to = handle this senario. >>>>> =A0 =A0 =A02.) When "dd" command is issued in guest, if its optio= n bs is set to a large value such as "bs=3D1024K", the result speed wil= l slightly bigger than the limits. >>>>> >>>>> For these problems, if you have nice thought, pls let us know.:) >>>>> >>>>> Signed-off-by: Zhi Yong Wu >>>>> --- >>>>> =A0block.c | =A0259 +++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++--- >>>>> =A0block.h | =A0 =A01 - >>>>> =A02 files changed, 248 insertions(+), 12 deletions(-) >>>> >>>> One general comment: What about synchronous and/or coroutine I/O >>>> operations? Do you think they are just not important enough to con= sider >>>> here or were they forgotten? >>> For sync ops, we assume that it will be converse into async mode at >>> some point of future, right? >>> For coroutine I/O, it is introduced in image driver layer, and behi= nd >>> bdrv_aio_readv/writev. I think that we need not consider them, righ= t? >> >> Meanwhile the block layer has been changed to handle all requests in >> terms of coroutines. So you would best move your intercepting code i= nto >> the coroutine functions. > > Some additional info: the advantage of handling all requests in > coroutines is that there is now a single place where you can put I/O > throttling. =A0It will work for bdrv_read(), bdrv_co_readv(), and > bdrv_aio_readv(). =A0There is no code duplication, just put the I/O > throttling logic in bdrv_co_do_readv(). got it. thanks. > > Stefan > --=20 Regards, Zhi Yong Wu From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG53O-0003Wy-0t for qemu-devel@nongnu.org; Tue, 18 Oct 2011 04:29:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG53M-0001ZE-UV for qemu-devel@nongnu.org; Tue, 18 Oct 2011 04:29:41 -0400 Received: from mail-vx0-f173.google.com ([209.85.220.173]:35424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG53M-0001Z6-S6 for qemu-devel@nongnu.org; Tue, 18 Oct 2011 04:29:40 -0400 Received: by vcbfl17 with SMTP id fl17so325151vcb.4 for ; Tue, 18 Oct 2011 01:29:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1315476668-19812-1-git-send-email-wuzhy@linux.vnet.ibm.com> <1315476668-19812-4-git-send-email-wuzhy@linux.vnet.ibm.com> <4E7CB18F.1080402@redhat.com> <4E9C02D7.3030203@redhat.com> Date: Tue, 18 Oct 2011 16:29:40 +0800 Message-ID: From: Zhi Yong Wu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 3/4] block: add block timer and throttling algorithm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, pair@us.ibm.com, ryanh@us.ibm.com, Zhi Yong Wu On Mon, Oct 17, 2011 at 11:54 PM, Stefan Hajnoczi wrot= e: > On Mon, Oct 17, 2011 at 11:26 AM, Kevin Wolf wrote: >> Am 26.09.2011 09:24, schrieb Zhi Yong Wu: >>> On Sat, Sep 24, 2011 at 12:19 AM, Kevin Wolf wrote: >>>> Am 08.09.2011 12:11, schrieb Zhi Yong Wu: >>>>> Note: >>>>> =A0 =A0 =A01.) When bps/iops limits are specified to a small value su= ch as 511 bytes/s, this VM will hang up. We are considering how to handle t= his senario. >>>>> =A0 =A0 =A02.) When "dd" command is issued in guest, if its option bs= is set to a large value such as "bs=3D1024K", the result speed will slight= ly bigger than the limits. >>>>> >>>>> For these problems, if you have nice thought, pls let us know.:) >>>>> >>>>> Signed-off-by: Zhi Yong Wu >>>>> --- >>>>> =A0block.c | =A0259 +++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++--- >>>>> =A0block.h | =A0 =A01 - >>>>> =A02 files changed, 248 insertions(+), 12 deletions(-) >>>> >>>> One general comment: What about synchronous and/or coroutine I/O >>>> operations? Do you think they are just not important enough to conside= r >>>> here or were they forgotten? >>> For sync ops, we assume that it will be converse into async mode at >>> some point of future, right? >>> For coroutine I/O, it is introduced in image driver layer, and behind >>> bdrv_aio_readv/writev. I think that we need not consider them, right? >> >> Meanwhile the block layer has been changed to handle all requests in >> terms of coroutines. So you would best move your intercepting code into >> the coroutine functions. > > Some additional info: the advantage of handling all requests in > coroutines is that there is now a single place where you can put I/O > throttling. =A0It will work for bdrv_read(), bdrv_co_readv(), and > bdrv_aio_readv(). =A0There is no code duplication, just put the I/O > throttling logic in bdrv_co_do_readv(). got it. thanks. > > Stefan > --=20 Regards, Zhi Yong Wu