From: Lucas Meneghel Rodrigues Subject: Re: [Autotest] [KVM-AUTOTEST PATCH 3/7] KVM test: new test timedrift_with_migration Date: Mon, 12 Oct 2009 12:28:54 -0300 Message-ID: <6ac58f4f0910120828m25446cdeq1d1b9050a11aa91c@mail.gmail.com> References: <1254938062-15286-1-git-send-email-mgoldish@redhat.com> <1254938062-15286-2-git-send-email-mgoldish@redhat.com> <1254938062-15286-3-git-send-email-mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: Michael Goldish Return-path: Received: from mail-px0-f179.google.com ([209.85.216.179]:53648 "EHLO mail-px0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755549AbZJLP3a convert rfc822-to-8bit (ORCPT ); Mon, 12 Oct 2009 11:29:30 -0400 Received: by pxi9 with SMTP id 9so8662988pxi.4 for ; Mon, 12 Oct 2009 08:28:54 -0700 (PDT) In-Reply-To: <1254938062-15286-3-git-send-email-mgoldish@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Michael, I am reviewing your patchset and have just a minor remark to make here: On Wed, Oct 7, 2009 at 2:54 PM, Michael Goldish w= rote: > This patch adds a new test that checks the timedrift introduced by mi= grations. > It uses the same parameters used by the timedrift test to get the gue= st time. > In addition, the number of migrations the test performs is controlled= by the > parameter 'migration_iterations'. > > Signed-off-by: Michael Goldish > --- > =A0client/tests/kvm/kvm_tests.cfg.sample =A0 =A0 =A0 =A0 =A0 =A0 =A0|= =A0 33 ++++--- > =A0client/tests/kvm/tests/timedrift_with_migration.py | =A0 95 ++++++= ++++++++++++++ > =A02 files changed, 115 insertions(+), 13 deletions(-) > =A0create mode 100644 client/tests/kvm/tests/timedrift_with_migration= =2Epy > > diff --git a/client/tests/kvm/kvm_tests.cfg.sample b/client/tests/kvm= /kvm_tests.cfg.sample > index 540d0a2..618c21e 100644 > --- a/client/tests/kvm/kvm_tests.cfg.sample > +++ b/client/tests/kvm/kvm_tests.cfg.sample > @@ -100,19 +100,26 @@ variants: > =A0 =A0 =A0 =A0 type =3D linux_s3 > > =A0 =A0 - timedrift: =A0 =A0install setup > - =A0 =A0 =A0 =A0type =3D timedrift > =A0 =A0 =A0 =A0 extra_params +=3D " -rtc-td-hack" > - =A0 =A0 =A0 =A0# Pin the VM and host load to CPU #0 > - =A0 =A0 =A0 =A0cpu_mask =3D 0x1 > - =A0 =A0 =A0 =A0# Set the load and rest durations > - =A0 =A0 =A0 =A0load_duration =3D 20 > - =A0 =A0 =A0 =A0rest_duration =3D 20 > - =A0 =A0 =A0 =A0# Fail if the drift after load is higher than 50% > - =A0 =A0 =A0 =A0drift_threshold =3D 50 > - =A0 =A0 =A0 =A0# Fail if the drift after the rest period is higher = than 10% > - =A0 =A0 =A0 =A0drift_threshold_after_rest =3D 10 > - =A0 =A0 =A0 =A0# For now, make sure this test is executed alone > - =A0 =A0 =A0 =A0used_cpus =3D 100 > + =A0 =A0 =A0 =A0variants: > + =A0 =A0 =A0 =A0 =A0 =A0- with_load: > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0type =3D timedrift > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Pin the VM and host load to CPU #0 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpu_mask =3D 0x1 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Set the load and rest durations > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0load_duration =3D 20 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rest_duration =3D 20 Even the default duration here seems way too brief here, is there any reason why 20s was chosen instead of, let's say, 1800s? I am under the impression that 20s of load won't be enough to cause any noticeable drift... > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Fail if the drift after load is hi= gher than 50% > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0drift_threshold =3D 50 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Fail if the drift after the rest p= eriod is higher than 10% > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0drift_threshold_after_rest =3D 10 I am also curious about those tresholds and the reasoning behind them. Is there any official agreement on what we consider to be an unreasonable drift? Another thing that struck me out is drift calculation: On the original timedrift test, the guest drift is normalized against the host drift: drift =3D 100.0 * (host_delta - guest_delta) / host_delta While in the new drift tests, we consider only the guest drift. I believe is better to normalize all tests based on one drift calculation criteria, and those values should be reviewed, and at least a certain level of agreement on our development community should be reached. Other than this concern that came to my mind, the new tests look good and work fine here. I had to do a slight rebase in one of the patches, very minor stuff. The default values and the drift calculation can be changed on a later time. Thanks!