Commit 9fda6753 authored by David Matlack's avatar David Matlack Committed by Sean Christopherson

KVM: selftests: Rename perf_test_util.[ch] to memstress.[ch]

Rename the perf_test_util.[ch] files to memstress.[ch]. Symbols are
renamed in the following commit to reduce the amount of churn here in
hopes of playiing nice with git's file rename detection.

The name "memstress" was chosen to better describe the functionality
proveded by this library, which is to create and run a VM that
reads/writes to guest memory on all vCPUs in parallel.

"memstress" also contains the same number of chracters as "perf_test",
making it a drop-in replacement in symbols, e.g. function names, without
impacting line lengths. Also the lack of underscore between "mem" and
"stress" makes it clear "memstress" is a noun.
Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20221012165729.3505266-2-dmatlack@google.comSigned-off-by: default avatarSean Christopherson <seanjc@google.com>
parent c967a475
...@@ -43,7 +43,7 @@ LIBKVM += lib/elf.c ...@@ -43,7 +43,7 @@ LIBKVM += lib/elf.c
LIBKVM += lib/guest_modes.c LIBKVM += lib/guest_modes.c
LIBKVM += lib/io.c LIBKVM += lib/io.c
LIBKVM += lib/kvm_util.c LIBKVM += lib/kvm_util.c
LIBKVM += lib/perf_test_util.c LIBKVM += lib/memstress.c
LIBKVM += lib/rbtree.c LIBKVM += lib/rbtree.c
LIBKVM += lib/sparsebit.c LIBKVM += lib/sparsebit.c
LIBKVM += lib/test_util.c LIBKVM += lib/test_util.c
...@@ -52,7 +52,7 @@ LIBKVM_STRING += lib/string_override.c ...@@ -52,7 +52,7 @@ LIBKVM_STRING += lib/string_override.c
LIBKVM_x86_64 += lib/x86_64/apic.c LIBKVM_x86_64 += lib/x86_64/apic.c
LIBKVM_x86_64 += lib/x86_64/handlers.S LIBKVM_x86_64 += lib/x86_64/handlers.S
LIBKVM_x86_64 += lib/x86_64/perf_test_util.c LIBKVM_x86_64 += lib/x86_64/memstress.c
LIBKVM_x86_64 += lib/x86_64/processor.c LIBKVM_x86_64 += lib/x86_64/processor.c
LIBKVM_x86_64 += lib/x86_64/svm.c LIBKVM_x86_64 += lib/x86_64/svm.c
LIBKVM_x86_64 += lib/x86_64/ucall.c LIBKVM_x86_64 += lib/x86_64/ucall.c
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include "kvm_util.h" #include "kvm_util.h"
#include "test_util.h" #include "test_util.h"
#include "perf_test_util.h" #include "memstress.h"
#include "guest_modes.h" #include "guest_modes.h"
/* Global variable used to synchronize all of the vCPU threads. */ /* Global variable used to synchronize all of the vCPU threads. */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "kvm_util.h" #include "kvm_util.h"
#include "test_util.h" #include "test_util.h"
#include "perf_test_util.h" #include "memstress.h"
#include "guest_modes.h" #include "guest_modes.h"
#ifdef __NR_userfaultfd #ifdef __NR_userfaultfd
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "kvm_util.h" #include "kvm_util.h"
#include "test_util.h" #include "test_util.h"
#include "perf_test_util.h" #include "memstress.h"
#include "guest_modes.h" #include "guest_modes.h"
#ifdef __aarch64__ #ifdef __aarch64__
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* /*
* tools/testing/selftests/kvm/include/perf_test_util.h * tools/testing/selftests/kvm/include/memstress.h
* *
* Copyright (C) 2020, Google LLC. * Copyright (C) 2020, Google LLC.
*/ */
#ifndef SELFTEST_KVM_PERF_TEST_UTIL_H #ifndef SELFTEST_KVM_MEMSTRESS_H
#define SELFTEST_KVM_PERF_TEST_UTIL_H #define SELFTEST_KVM_MEMSTRESS_H
#include <pthread.h> #include <pthread.h>
...@@ -69,4 +69,4 @@ void perf_test_guest_code(uint32_t vcpu_id); ...@@ -69,4 +69,4 @@ void perf_test_guest_code(uint32_t vcpu_id);
uint64_t perf_test_nested_pages(int nr_vcpus); uint64_t perf_test_nested_pages(int nr_vcpus);
void perf_test_setup_nested(struct kvm_vm *vm, int nr_vcpus, struct kvm_vcpu *vcpus[]); void perf_test_setup_nested(struct kvm_vm *vm, int nr_vcpus, struct kvm_vcpu *vcpus[]);
#endif /* SELFTEST_KVM_PERF_TEST_UTIL_H */ #endif /* SELFTEST_KVM_MEMSTRESS_H */
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <inttypes.h> #include <inttypes.h>
#include "kvm_util.h" #include "kvm_util.h"
#include "perf_test_util.h" #include "memstress.h"
#include "processor.h" #include "processor.h"
struct perf_test_args perf_test_args; struct perf_test_args perf_test_args;
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* /*
* x86_64-specific extensions to perf_test_util.c. * x86_64-specific extensions to memstress.c.
* *
* Copyright (C) 2022, Google, Inc. * Copyright (C) 2022, Google, Inc.
*/ */
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "test_util.h" #include "test_util.h"
#include "kvm_util.h" #include "kvm_util.h"
#include "perf_test_util.h" #include "memstress.h"
#include "processor.h" #include "processor.h"
#include "vmx.h" #include "vmx.h"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/userfaultfd.h> #include <linux/userfaultfd.h>
#include "perf_test_util.h" #include "memstress.h"
#include "processor.h" #include "processor.h"
#include "test_util.h" #include "test_util.h"
#include "guest_modes.h" #include "guest_modes.h"
...@@ -72,7 +72,7 @@ static void add_remove_memslot(struct kvm_vm *vm, useconds_t delay, ...@@ -72,7 +72,7 @@ static void add_remove_memslot(struct kvm_vm *vm, useconds_t delay,
int i; int i;
/* /*
* Add the dummy memslot just below the perf_test_util memslot, which is * Add the dummy memslot just below the memstress memslot, which is
* at the top of the guest physical address space. * at the top of the guest physical address space.
*/ */
gpa = perf_test_args.gpa - pages * vm->page_size; gpa = perf_test_args.gpa - pages * vm->page_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment