public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: James Houghton <jthoughton@google.com>
Cc: axelrasmussen@google.com, cgroups@vger.kernel.org,
	dmatlack@google.com,  hannes@cmpxchg.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org,  mkoutny@suse.com,
	mlevitsk@redhat.com, tj@kernel.org, yosry.ahmed@linux.dev,
	 yuzhao@google.com
Subject: Re: [PATCH v3 5/5] KVM: selftests: access_tracking_perf_test: Use MGLRU for access tracking
Date: Wed, 30 Apr 2025 14:41:52 -0700	[thread overview]
Message-ID: <aBKZILBdDfx-Gwi3@google.com> (raw)
In-Reply-To: <20250429225550.106865-1-jthoughton@google.com>

On Tue, Apr 29, 2025, James Houghton wrote:
> On Mon, Apr 28, 2025 at 9:19 PM Sean Christopherson <seanjc@google.com> wrote:
> > Using MGLRU on my home box fails.  It's full cgroup v2, and has both
> > CONFIG_IDLE_PAGE_TRACKING=y and MGLRU enabled.
> >
> > ==== Test Assertion Failure ====
> >   access_tracking_perf_test.c:244: false
> >   pid=114670 tid=114670 errno=17 - File exists
> >      1  0x00000000004032a9: find_generation at access_tracking_perf_test.c:244
> >      2  0x00000000004032da: lru_gen_mark_memory_idle at access_tracking_perf_test.c:272
> >      3  0x00000000004034e4: mark_memory_idle at access_tracking_perf_test.c:391
> >      4   (inlined by) run_test at access_tracking_perf_test.c:431
> >      5  0x0000000000403d84: for_each_guest_mode at guest_modes.c:96
> >      6  0x0000000000402c61: run_test_for_each_guest_mode at access_tracking_perf_test.c:492
> >      7  0x000000000041d8e2: cg_run at cgroup_util.c:382
> >      8  0x00000000004027fa: main at access_tracking_perf_test.c:572
> >      9  0x00007fa1cb629d8f: ?? ??:0
> >     10  0x00007fa1cb629e3f: ?? ??:0
> >     11  0x00000000004029d4: _start at ??:?
> >   Could not find a generation with 90% of guest memory (235929 pages).
> >
> > Interestingly, if I force the test to use /sys/kernel/mm/page_idle/bitmap, it
> > passes.
> >
> > Please try to reproduce the failure (assuming you haven't already tested that
> > exact combination of cgroups v2, MGLRU=y, and CONFIG_IDLE_PAGE_TRACKING=y). I
> > don't have bandwidth to dig any further at this time.
> 
> Sorry... please see the bottom of this message for a diff that should fix this.
> It fixes these bugs:
> 
> 1.  Tracking generation numbers without hardware Accessed bit management.
>     (This is addition of lru_gen_last_gen.)
> 1.5 It does an initial aging pass so that pages always move to newer
>     generations in (or before) the subsequent aging passes. This probably
>     isn't needed given the change I made for (1).
> 2.  Fixes the expected number of pages for guest page sizes > PAGE_SIZE.
>     (This is the move of test_pages. test_pages has also been renamed to avoid
>     shadowing.)
> 3.  Fixes an off-by-one error when looking for the generation with the most
>     pages. Previously it failed to check the youngest generation, which I think
>     is the bug you ran into. (This is the change to lru_gen_util.c.)

Ya, this was the bug I initially ran into, I also encountered more failues after
applying just that fix.  But, with the full diff applied, it's passing, so good
to go for the next version from my end.

      reply	other threads:[~2025-04-30 21:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14 20:09 [PATCH v3 0/5] KVM: selftests: access_tracking_perf_test fixes for NUMA balancing and MGLRU James Houghton
2025-04-14 20:09 ` [PATCH v3 1/5] KVM: selftests: Extract guts of THP accessor to standalone sysfs helpers James Houghton
2025-04-14 20:09 ` [PATCH v3 2/5] KVM: selftests: access_tracking_perf_test: Add option to skip the sanity check James Houghton
2025-04-14 20:09 ` [PATCH v3 3/5] cgroup: selftests: Move cgroup_util into its own library James Houghton
2025-04-14 20:25   ` James Houghton
2025-04-14 20:09 ` [PATCH v3 4/5] KVM: selftests: Build and link selftests/cgroup/lib into KVM selftests James Houghton
2025-04-29  1:03   ` Sean Christopherson
2025-04-29 12:05     ` Michal Koutný
2025-04-14 20:09 ` [PATCH v3 5/5] KVM: selftests: access_tracking_perf_test: Use MGLRU for access tracking James Houghton
2025-04-26  0:31   ` Sean Christopherson
2025-04-28 19:54     ` James Houghton
2025-04-29  0:56       ` Sean Christopherson
2025-04-29  1:19   ` Sean Christopherson
2025-04-29 22:55     ` James Houghton
2025-04-30 21:41       ` Sean Christopherson [this message]

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=aBKZILBdDfx-Gwi3@google.com \
    --to=seanjc@google.com \
    --cc=axelrasmussen@google.com \
    --cc=cgroups@vger.kernel.org \
    --cc=dmatlack@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=jthoughton@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=mlevitsk@redhat.com \
    --cc=tj@kernel.org \
    --cc=yosry.ahmed@linux.dev \
    --cc=yuzhao@google.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