From: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>
To: Hanna Reitz <hreitz@redhat.com>,
Vladimir Sementsov-Ogievskiy
<vladimir.sementsov-ogievskiy@openvz.org>,
qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, berto@igalia.com,
vsementsov@openvz.org
Subject: Re: [PATCH 1/2] block/throttle-groups: use QEMU_CLOCK_REALTIME for qtest too
Date: Thu, 7 Apr 2022 13:45:15 +0300 [thread overview]
Message-ID: <eb8fd7ca-6e71-236c-ddbd-3ca176e71f91@mail.ru> (raw)
In-Reply-To: <8d1a8d01-82c6-c6be-43e9-e8dde0c94467@redhat.com>
Thanks for explanation!
07.04.2022 09:42, Hanna Reitz wrote:
> On 06.04.22 17:32, Vladimir Sementsov-Ogievskiy wrote:
>> Virtual clock just doesn't tick for iotests, and throttling just not
>> work. Let's use realtime clock.
>
> It does tick when you make it take, specifically with the clock_step qtest command. 093 does this, and so with this patch, it fails, because it is no longer deterministic.
>
> So far, if I needed realtime throttling, I simply switched the accelerator to tcg (e.g. in stream-error-on-reset).
Hm, I tried but it doesn't help (Add vm.add_args('-accel', 'tcg') before vm.launch() in the test), as " -accel qtest" is kept anyway, and therefore do_configure_accelerator is called for qtest and finally qtest_allowed is set to true.
But using QEMUMachine class instead of VM helps.
>
> I’m not really opposed to this, but it does break 093, and without looking too closely into it, I would guess that it’d be difficult to rewrite 093 in a deterministic way without it relying on throttling using the virtual clock. (A runtime option for the throttle-group object to choose the clock type might be an option.)
OK, I don't think we need these patches now.
>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
>> ---
>> block/throttle-groups.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/block/throttle-groups.c b/block/throttle-groups.c
>> index fb203c3ced..029158d797 100644
>> --- a/block/throttle-groups.c
>> +++ b/block/throttle-groups.c
>> @@ -753,10 +753,6 @@ static void throttle_group_obj_init(Object *obj)
>> ThrottleGroup *tg = THROTTLE_GROUP(obj);
>> tg->clock_type = QEMU_CLOCK_REALTIME;
>> - if (qtest_enabled()) {
>> - /* For testing block IO throttling only */
>> - tg->clock_type = QEMU_CLOCK_VIRTUAL;
>> - }
>> tg->is_initialized = false;
>> qemu_mutex_init(&tg->lock);
>> throttle_init(&tg->ts);
>
--
Best regards,
Vladimir
next prev parent reply other threads:[~2022-04-07 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 15:32 [PATCH for-7.1 0/2] throttle-groups: use QEMU_CLOCK_REALTIME Vladimir Sementsov-Ogievskiy
2022-04-06 15:32 ` [PATCH 1/2] block/throttle-groups: use QEMU_CLOCK_REALTIME for qtest too Vladimir Sementsov-Ogievskiy
2022-04-07 6:42 ` Hanna Reitz
2022-04-07 10:45 ` Vladimir Sementsov-Ogievskiy [this message]
2022-04-06 15:32 ` [PATCH 2/2] iotests: add throttle test Vladimir Sementsov-Ogievskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb8fd7ca-6e71-236c-ddbd-3ca176e71f91@mail.ru \
--to=v.sementsov-og@mail.ru \
--cc=berto@igalia.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vladimir.sementsov-ogievskiy@openvz.org \
--cc=vsementsov@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).