[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 03/16] block: introduce bdrv_no_thr
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 03/16] block: introduce bdrv_no_throttling_begin/end |
Date: |
Wed, 9 Mar 2016 08:40:54 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
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