From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAIrC-0003Ds-KA for qemu-devel@nongnu.org; Fri, 16 Aug 2013 08:10:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VAIr4-0006Vk-6L for qemu-devel@nongnu.org; Fri, 16 Aug 2013 08:10:18 -0400 Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:62865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAIr4-0006VY-0C for qemu-devel@nongnu.org; Fri, 16 Aug 2013 08:10:10 -0400 Received: by mail-wg0-f49.google.com with SMTP id y10so1530016wgg.16 for ; Fri, 16 Aug 2013 05:10:09 -0700 (PDT) Date: Fri, 16 Aug 2013 14:10:04 +0200 From: Stefan Hajnoczi Message-ID: <20130816121004.GD22193@stefanha-thinkpad.redhat.com> References: <1376326396-7676-1-git-send-email-benoit@irqsave.net> <1376326396-7676-6-git-send-email-benoit@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1376326396-7676-6-git-send-email-benoit@irqsave.net> Subject: Re: [Qemu-devel] [PATCH V5 5/5] block: Add iops_sector_count to do the iops accounting for a given io size. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, Aug 12, 2013 at 06:53:16PM +0200, Benoît Canet wrote: > diff --git a/block/qapi.c b/block/qapi.c > index 5ba10f4..f98ff64 100644 > --- a/block/qapi.c > +++ b/block/qapi.c > @@ -258,6 +258,9 @@ void bdrv_query_info(BlockDriverState *bs, > cfg.buckets[THROTTLE_OPS_WRITE].max; > info->inserted->iops_wr_max = > cfg.buckets[THROTTLE_OPS_WRITE].max; > + > + info->inserted->has_iops_sector_count = cfg.op_size; > + info->inserted->iops_sector_count = cfg.op_size; Why introduce the concept of sectors here? Throttling uses bytes and that will help prevent confusion if the user has 4 KB sector disks, for example, instead of 512 bytes.