From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adYjw-00062T-5Q for qemu-devel@nongnu.org; Wed, 09 Mar 2016 02:41:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adYjv-0002KC-7y for qemu-devel@nongnu.org; Wed, 09 Mar 2016 02:41:04 -0500 Sender: Paolo Bonzini References: <1455645388-32401-1-git-send-email-pbonzini@redhat.com> <1455645388-32401-4-git-send-email-pbonzini@redhat.com> <20160309014546.GC17947@ad.usersys.redhat.com> From: Paolo Bonzini Message-ID: <56DFD386.4090100@redhat.com> Date: Wed, 9 Mar 2016 08:40:54 +0100 MIME-Version: 1.0 In-Reply-To: <20160309014546.GC17947@ad.usersys.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/16] block: introduce bdrv_no_throttling_begin/end List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com On 09/03/2016 02:45, Fam Zheng wrote: >> > @@ -555,11 +574,7 @@ static int bdrv_prwv_co(BlockDriverState *bs, int64_t offset, >> > * will not fire; so the I/O throttling function has to be disabled here >> > * if it has been enabled. >> > */ >> > - if (bs->io_limits_enabled) { >> > - fprintf(stderr, "Disabling I/O throttling on '%s' due " >> > - "to synchronous I/O.\n", bdrv_get_device_name(bs)); >> > - bdrv_io_limits_disable(bs); >> > - } >> > + bdrv_no_throttling_begin(bs); >> > >> > if (qemu_in_coroutine()) { >> > /* Fast-path if already in coroutine context */ >> > @@ -573,6 +588,8 @@ static int bdrv_prwv_co(BlockDriverState *bs, int64_t offset, >> > aio_poll(aio_context, true); >> > } >> > } >> > + >> > + bdrv_no_throttling_end(bs); > > Does this change the behavior? There wasn't a bdrv_io_limits_enable() here, and > the throttle doesn't come back automatically. Just want to make sure it's > intended. Yes, it's intended. As long as the I/O stays synchronous, throttling is disabled. If it starts to be asynchronous, it will be re-enabled automatically. Paolo