From: Thomas Huth <thuth@redhat.com>
To: Ben Gardon <bgardon@google.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
linux-kselftest@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Cannon Matthews <cannonmatthews@google.com>,
Peter Xu <peterx@redhat.com>, Andrew Jones <drjones@redhat.com>,
Peter Shier <pshier@google.com>, Oliver Upton <oupton@google.com>
Subject: Re: [PATCH v4 01/10] KVM: selftests: Create a demand paging test
Date: Mon, 27 Jan 2020 10:18:11 +0100 [thread overview]
Message-ID: <2655bc5d-eac1-7cbe-d3b2-5dc9ad3ffa5e@redhat.com> (raw)
In-Reply-To: <20200123180436.99487-2-bgardon@google.com>
On 23/01/2020 19.04, Ben Gardon wrote:
> While userfaultfd, KVM's demand paging implementation, is not specific
> to KVM, having a benchmark for its performance will be useful for
> guiding performance improvements to KVM. As a first step towards creating
> a userfaultfd demand paging test, create a simple memory access test,
> based on dirty_log_test.
>
> Reviewed-by: Oliver Upton <oupton@google.com>
> Signed-off-by: Ben Gardon <bgardon@google.com>
> ---
> tools/testing/selftests/kvm/.gitignore | 1 +
> tools/testing/selftests/kvm/Makefile | 3 +
> .../selftests/kvm/demand_paging_test.c | 286 ++++++++++++++++++
> 3 files changed, 290 insertions(+)
> create mode 100644 tools/testing/selftests/kvm/demand_paging_test.c
>
> diff --git a/tools/testing/selftests/kvm/.gitignore b/tools/testing/selftests/kvm/.gitignore
> index 30072c3f52fbe..9619d96e15c41 100644
> --- a/tools/testing/selftests/kvm/.gitignore
> +++ b/tools/testing/selftests/kvm/.gitignore
> @@ -17,3 +17,4 @@
> /clear_dirty_log_test
> /dirty_log_test
> /kvm_create_max_vcpus
> +/demand_paging_test
> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> index 3138a916574a9..e2e1b92faee3b 100644
> --- a/tools/testing/selftests/kvm/Makefile
> +++ b/tools/testing/selftests/kvm/Makefile
> @@ -28,15 +28,18 @@ TEST_GEN_PROGS_x86_64 += x86_64/vmx_tsc_adjust_test
> TEST_GEN_PROGS_x86_64 += x86_64/xss_msr_test
> TEST_GEN_PROGS_x86_64 += clear_dirty_log_test
> TEST_GEN_PROGS_x86_64 += dirty_log_test
> +TEST_GEN_PROGS_x86_64 += demand_paging_test
> TEST_GEN_PROGS_x86_64 += kvm_create_max_vcpus
>
> TEST_GEN_PROGS_aarch64 += clear_dirty_log_test
> TEST_GEN_PROGS_aarch64 += dirty_log_test
> +TEST_GEN_PROGS_aarch64 += demand_paging_test
> TEST_GEN_PROGS_aarch64 += kvm_create_max_vcpus
>
> TEST_GEN_PROGS_s390x = s390x/memop
> TEST_GEN_PROGS_s390x += s390x/sync_regs_test
> TEST_GEN_PROGS_s390x += dirty_log_test
> +TEST_GEN_PROGS_s390x += demand_paging_test
> TEST_GEN_PROGS_s390x += kvm_create_max_vcpus
I gave your series a quick try on s390x (without patch 10/10 since that
is causing more trouble), but the test does not work there yet:
# selftests: kvm: demand_paging_test
# ==== Test Assertion Failure ====
# lib/kvm_util.c:700: ret == 0
# pid=247240 tid=247240 - Invalid argument
# 1 0x0000000001004085: vm_userspace_mem_region_add at kvm_util.c:695
# 2 0x00000000010042dd: _vm_create at kvm_util.c:233
# 3 0x0000000001001b07: create_vm at demand_paging_test.c:185
# 4 (inlined by) run_test at demand_paging_test.c:387
# 5 (inlined by) main at demand_paging_test.c:676
# 6 0x000003ffb5323461: ?? ??:0
# 7 0x000000000100259d: .annobin_init.c.hot at crt1.o:?
# 8 0xffffffffffffffff: ?? ??:0
# KVM_SET_USER_MEMORY_REGION IOCTL failed,
# rc: -1 errno: 22
# slot: 0 flags: 0x0
# guest_phys_addr: 0x0 size: 0x607000
# Testing guest mode: PA-bits:40, VA-bits:48, 4K pages
not ok 4 selftests: kvm: demand_paging_test # exit=254
I'd suggest to leave it disabled on s390x until the issue has been debugged.
Thomas
next prev parent reply other threads:[~2020-01-27 9:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 18:04 [PATCH v4 00/10] Create a userfaultfd demand paging test Ben Gardon
2020-01-23 18:04 ` [PATCH v4 01/10] KVM: selftests: Create a " Ben Gardon
2020-01-24 9:49 ` Andrew Jones
2020-01-27 9:18 ` Thomas Huth [this message]
2020-01-23 18:04 ` [PATCH v4 02/10] KVM: selftests: Add demand paging content to the " Ben Gardon
2020-01-23 18:04 ` [PATCH v4 03/10] KVM: selftests: Add configurable demand paging delay Ben Gardon
2020-01-23 18:04 ` [PATCH v4 04/10] KVM: selftests: Add memory size parameter to the demand paging test Ben Gardon
2020-01-24 10:01 ` Andrew Jones
2020-01-23 18:04 ` [PATCH v4 05/10] KVM: selftests: Pass args to vCPU in global vCPU args struct Ben Gardon
2020-01-23 18:04 ` [PATCH v4 06/10] KVM: selftests: Add support for vcpu_args_set to aarch64 and s390x Ben Gardon
2020-01-24 9:03 ` Paolo Bonzini
2020-01-24 9:35 ` Andrew Jones
2020-01-24 9:44 ` Paolo Bonzini
2020-01-24 10:45 ` Andrew Jones
2020-01-24 18:33 ` Christian Borntraeger
2020-01-25 9:34 ` Paolo Bonzini
2020-01-27 8:38 ` Andrew Jones
2020-01-27 9:01 ` Thomas Huth
2020-01-23 18:04 ` [PATCH v4 07/10] KVM: selftests: Support multiple vCPUs in demand paging test Ben Gardon
2020-01-24 10:16 ` Andrew Jones
2020-01-24 10:49 ` Andrew Jones
2020-01-25 9:39 ` Paolo Bonzini
2020-01-27 8:39 ` Andrew Jones
2020-01-23 18:04 ` [PATCH v4 08/10] KVM: selftests: Time guest demand paging Ben Gardon
2020-01-24 10:21 ` Andrew Jones
2020-01-23 18:04 ` [PATCH v4 09/10] KVM: selftests: Stop memslot creation in KVM internal memslot region Ben Gardon
2020-01-24 8:58 ` Paolo Bonzini
2020-01-24 18:41 ` Ben Gardon
2020-01-25 9:37 ` Paolo Bonzini
2020-01-27 17:28 ` Ben Gardon
2020-01-23 18:04 ` [PATCH v4 10/10] KVM: selftests: Move memslot 0 above KVM internal memslots Ben Gardon
2020-01-24 9:01 ` Paolo Bonzini
2020-01-24 18:53 ` Ben Gardon
2020-01-27 9:42 ` Thomas Huth
2020-01-24 9:03 ` [PATCH v4 00/10] Create a userfaultfd demand paging test Paolo Bonzini
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=2655bc5d-eac1-7cbe-d3b2-5dc9ad3ffa5e@redhat.com \
--to=thuth@redhat.com \
--cc=bgardon@google.com \
--cc=cannonmatthews@google.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=pshier@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