Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yosry Ahmed <yosry@kernel.org>
Cc: Jim Mattson <jmattson@google.com>,
	kvm@vger.kernel.org,  Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [kvm-unit-tests PATCH] x86: nVMX: Add retry loop to advanced RTM debugging subtest
Date: Mon, 2 Mar 2026 16:26:54 -0800	[thread overview]
Message-ID: <aaYqzgO_Il2Pqixm@google.com> (raw)
In-Reply-To: <CAO9r8zNe9_vhspg4T=zswZ3Hr31XJGPz8=aDbqVvL1Wa9_mrAQ@mail.gmail.com>

On Mon, Mar 02, 2026, Yosry Ahmed wrote:
> On Mon, Mar 2, 2026 at 4:08 PM Jim Mattson <jmattson@google.com> wrote:
> > > IIUC this will be in the order of 100s of milliseconds. Do we need to
> > > wait that long between retries? If the CPU is in a state where it will
> > > always abort RTM, 30 retries will end up taking seconds or 10s of
> > > seconds, right?
> >
> > I tried reducing the delay by a factor of 10. At 200 retries, I still
> > see a 2% skip rate on a Skylake Xeon E5 @ 2GHz. I'd like to get the
> > skip rate under 1%. But, maybe others don't care as much?
> >
> > Yes, 30 billion cycles is going to be on the order of 10 seconds.
> 
> I personally care more about the test time than the fact that it won't
> test RTM 2% of the time, but my opinion doesn't really matter :P

I generally care more about runtime too, but isn't 10 seconds only the worst
case scenario, and only on these fubar CPUs?  E.g. if there's no perf activity
in the host, or the CPU isn't one of these oddballs, isn't XBEGIN going to succeed
~100% of the time?

If this were a choice between "eat N seconds every time" and "skip the test",
I'd be a-ok with a skip rate of 50% if it meant reducing N.  But, assuming this
requires perf activity and a Skylake-era CPU, odds are good this will only be hit
in CI environments, at which point adding ~10 seconds to the worst case scenario
isn't a bad tradeoff (so long as it doesn't push the total runtime close to the
timeout).

  reply	other threads:[~2026-03-03  0:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 21:38 [kvm-unit-tests PATCH] x86: nVMX: Add retry loop to advanced RTM debugging subtest Jim Mattson
2026-02-28  0:55 ` Yosry Ahmed
2026-03-03  0:08   ` Jim Mattson
2026-03-03  0:09     ` Yosry Ahmed
2026-03-03  0:26       ` Sean Christopherson [this message]
2026-03-03  0:38         ` Yosry Ahmed

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=aaYqzgO_Il2Pqixm@google.com \
    --to=seanjc@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yosry@kernel.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