Skip to content

KVM: selftests: access_tracking_perf_test fixes for NUMA balancing and MGLRU

James Houghton cgroups kvm lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 2 repliesIn review
  2. v35 patches 9 repliesSuperseded
  3. v25 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches6 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7KVM: selftests: Extract guts of THP accessor to standalone sysfs helperstools/testing/selftests/kvm/lib/test_util.c+24 -110 replies
2/7KVM: selftests: access_tracking_perf_test: Add option to skip the sanity checktools/testing/selftests/kvm/access_tracking_perf_test.c tools/testing/selftests/kvm/include/test_util.h tools/testing/selftests/kvm/lib/test_util.c+61 -90 replies
3/7cgroup: selftests: Move memcontrol specific helpers out of common cgroup_util.ctools/testing/selftests/cgroup/cgroup_util.c tools/testing/selftests/cgroup/cgroup_util.h tools/testing/selftests/cgroup/test_memcontrol.c+83 -850 replies
4/7cgroup: selftests: Move cgroup_util into its own librarytools/testing/selftests/cgroup/Makefile tools/testing/selftests/cgroup/lib/cgroup_util.c tools/testing/selftests/cgroup/lib/include/cgroup_util.h +1 more+33 -130 replies
5/7cgroup: selftests: Add API to find root of specific controllertools/testing/selftests/cgroup/lib/cgroup_util.c tools/testing/selftests/cgroup/lib/include/cgroup_util.h+28 -70 replies
6/7KVM: selftests: Build and link selftests/cgroup/lib into KVM selfteststools/testing/selftests/kvm/Makefile.kvm+2 -10 replies
7/7KVM: selftests: access_tracking_perf_test: Use MGLRU for access trackingtools/testing/selftests/kvm/Makefile.kvm tools/testing/selftests/kvm/access_tracking_perf_test.c tools/testing/selftests/kvm/include/lru_gen_util.h +1 more+638 -271 reply

Reviews trailers per patch

3 of 7 patches have a Reviewed-by or Acked-by.

PatchMaxim LevitskyMichal KoutnýTejun Heo
1/7
2/7R-b
3/7A-b
4/7A-b
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/7] KVM: selftests: access_tracking_perf_test fixes for NUMA balancing and MGLRU

This series fixes some issues with access_tracking_perf_test when MGLRU or NUMA balancing are in use.

With MGLRU, touching a page doesn't necessarily clear the Idle flag. This has come up in the past, and the recommendation was to use MGLRU generation numbers[1], which this series does.

With NUMA balancing, pages are temporarily mapped as PROT_NONE, so the SPTEs will be zapped, losing the Accessed bits. The fix here is, in the event we have lost access information to print a warning and continue with the test, just like what we do if the test is running a nested VM.

A flag is added for the user to specify if they wish for the test to always enforce or always skip this check.

Based on kvm/next.

Changelog:

v3[4] -> v4:
- Multiple fixes to access_tracking_perf_test:
1. Fix for software-managed A/D-bit configs.
2. Fix for expected number of pages when guest page size is > PAGE_SIZE.
3. Properly check youngest generation when looking for pages.
- Do an initial aging pass for MGLRU. This allows us to check that pages move back to the youngest generation after the first access pass.
- Add controller-root location logic in the cgroup utils, and use this to make the test work for cgroup-v1 (thanks Sean!).
- Some cleanup for access_tracking_perf_test code, comments, warning messages, and the commit message (thanks Sean!).

v2[3] -> v3:
- Applied David's directory fix on patch 3.
- Added SoB-by, R-by (patch 2, missed in v2), and A-by.

v1[2] -> v2:
- Re-add clone3_selftests.h for cgroup selftests (thanks Michal!)
- Some comment fixes, patches 2 and 5 (thanks Maxim!).

[1]: https://lore.kernel.org/all/CAOUHufZeADNp_y=Ng+acmMMgnTR=ZGFZ7z-m6O47O=CmJauWjw@mail.gmail.com/
[2]: https://lore.kernel.org/kvm/[email protected]/
[3]: https://lore.kernel.org/kvm/[email protected]/
[4]: https://lore.kernel.org/kvm/[email protected]/

James Houghton (3):
cgroup: selftests: Move cgroup_util into its own library
KVM: selftests: Build and link selftests/cgroup/lib into KVM selftests
KVM: selftests: access_tracking_perf_test: Use MGLRU for access
tracking

Maxim Levitsky (1):
KVM: selftests: access_tracking_perf_test: Add option to skip the
sanity check

Sean Christopherson (3):
KVM: selftests: Extract guts of THP accessor to standalone sysfs
helpers
cgroup: selftests: Move memcontrol specific helpers out of common
cgroup_util.c
cgroup: selftests: Add API to find root of specific controller

 tools/testing/selftests/cgroup/Makefile       |  21 +-
 .../selftests/cgroup/{ => lib}/cgroup_util.c  | 118 ++----
 .../cgroup/{ => lib/include}/cgroup_util.h    |  13 +-
 .../testing/selftests/cgroup/lib/libcgroup.mk |  19 +
 .../selftests/cgroup/test_memcontrol.c        |  78 ++++
 tools/testing/selftests/kvm/Makefile.kvm      |   4 +-
 .../selftests/kvm/access_tracking_perf_test.c | 281 +++++++++++--
 .../selftests/kvm/include/lru_gen_util.h      |  51 +++
 .../testing/selftests/kvm/include/test_util.h |   1 +
 .../testing/selftests/kvm/lib/lru_gen_util.c  | 386 ++++++++++++++++++
 tools/testing/selftests/kvm/lib/test_util.c   |  42 +-
 11 files changed, 865 insertions(+), 149 deletions(-)
 rename tools/testing/selftests/cgroup/{ => lib}/cgroup_util.c (88%)
 rename tools/testing/selftests/cgroup/{ => lib/include}/cgroup_util.h (91%)
 create mode 100644 tools/testing/selftests/cgroup/lib/libcgroup.mk
 create mode 100644 tools/testing/selftests/kvm/include/lru_gen_util.h
 create mode 100644 tools/testing/selftests/kvm/lib/lru_gen_util.c

base-commit: 45eb29140e68ffe8e93a5471006858a018480a45

Signature · 1 line
2.49.0.1015.ga840276032-goog