mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: James Houghton <jthoughton@google.com>
Cc: Maxim Levitsky <mlevitsk@redhat.com>,
	kvm@vger.kernel.org,
	 Muhammad Usama Anjum <usama.anjum@collabora.com>,
	linux-kernel@vger.kernel.org,  Shuah Khan <shuah@kernel.org>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	 Oliver Upton <oliver.upton@linux.dev>,
	Paolo Bonzini <pbonzini@redhat.com>,
	 linux-kselftest@vger.kernel.org,
	Anup Patel <anup@brainfault.org>
Subject: Re: [PATCH v2 2/2] KVM: selftests: access_tracking_perf_test: add option to skip the sanity check
Date: Wed, 26 Mar 2025 12:27:09 -0700	[thread overview]
Message-ID: <Z-RVDQC4HNxrD-pI@google.com> (raw)
In-Reply-To: <CADrL8HV=ERo3dB7u-24VhjVQ6muBHEXeAfZYY7cuE7cxALRRRA@mail.gmail.com>

On Wed, Mar 26, 2025, James Houghton wrote:
> On Wed, Mar 26, 2025 at 11:41 AM Sean Christopherson <seanjc@google.com> wrote:
> > Then the auto resolving works as below, and as James pointed out, the assert
> > becomes
> >
> >                 TEST_ASSERT(!warn_only, ....);
> 
> I think the auto-resolving below needs to be flipped, and the
> TEST_ASSERT should be for `warn_only`, not `!warn_only`.
> 
> If warn_only == 1, the assert should pass.

/facepalm, yep

> > > > +                       break;
> > > >                 case 'h':
> > > >                 default:
> > > >                         help(argv[0]);
> > > > @@ -386,6 +394,23 @@ int main(int argc, char *argv[])
> > > >         page_idle_fd = open("/sys/kernel/mm/page_idle/bitmap", O_RDWR);
> > > >         __TEST_REQUIRE(page_idle_fd >= 0,
> > > >                        "CONFIG_IDLE_PAGE_TRACKING is not enabled");
> > > > +       if (warn_on_too_many_idle_pages == -1) {
> > > > +#ifdef __x86_64__
> > > > +               if (this_cpu_has(X86_FEATURE_HYPERVISOR)) {
> > > > +                       printf("Skipping idle page count sanity check, because the test is run nested\n");
> > > > +                       warn_on_too_many_idle_pages = 0;
> > > > +               } else
> > > > +#endif
> > > > +               if (is_numa_balancing_enabled()) {
> > > > +                       printf("Skipping idle page count sanity check, because NUMA balance is enabled\n");
> > > > +                       warn_on_too_many_idle_pages = 0;
> > > > +               } else {
> > > > +                       warn_on_too_many_idle_pages = 1;
> > > > +               }
> > > > +       } else if (!warn_on_too_many_idle_pages) {
> > > > +               printf("Skipping idle page count sanity check, because this was requested by the user\n");
> >
> > Eh, I vote to omit this.  The sanity check is still there, it's just degraded to
> > a warn.  I'm not totally against it, just seems superfluous and potentially confusing.
> 
> I agree, it's not adding much.
> 
> Separately: I've finished the MGLRU version of this test. It uses
> MGLRU if it is available, and marking pages as idle is much faster
> when using it. If MGLRU is enabled but otherwise not usable, the test
> fails, as the idle page bitmap is no longer usable for this test.
> 
> I'm happy to post a new version of Maxim's patch with the MGLRU
> patches too, Maxim, if you're okay with that.

  reply	other threads:[~2025-03-26 19:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25  1:57 [PATCH v2 0/2] KVM: selftests: access_tracking_perf_test: skip the test when NUMA balancing is active Maxim Levitsky
2025-03-25  1:57 ` [PATCH v2 1/2] KVM: selftests: Extract guts of THP accessor to standalone sysfs helpers Maxim Levitsky
2025-03-25  1:57 ` [PATCH v2 2/2] KVM: selftests: access_tracking_perf_test: add option to skip the sanity check Maxim Levitsky
2025-03-25 18:01   ` James Houghton
2025-03-26 18:41     ` Sean Christopherson
2025-03-26 19:08       ` James Houghton
2025-03-26 19:27         ` Sean Christopherson [this message]
2025-03-26 19:38     ` Maxim Levitsky

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=Z-RVDQC4HNxrD-pI@google.com \
    --to=seanjc@google.com \
    --cc=anup@brainfault.org \
    --cc=imbrenda@linux.ibm.com \
    --cc=jthoughton@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    --cc=usama.anjum@collabora.com \
    /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

all inboxes | Powered by JetHome®