lkml.org 
[lkml]   [2021]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/6] KVM: selftests: Convert iterations to int in dirty_log_perf_test
From
Date
On 12/01/2021 22.42, Ben Gardon wrote:
> In order to add an iteration -1 to indicate that the memory population
> phase has not yet completed, convert the interations counters to ints.
>
> No functional change intended.
>
> Reviewed-by: Jacob Xu <jacobhxu@google.com>
>
> Signed-off-by: Ben Gardon <bgardon@google.com>
> ---
> .../selftests/kvm/dirty_log_perf_test.c | 26 +++++++++----------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/dirty_log_perf_test.c b/tools/testing/selftests/kvm/dirty_log_perf_test.c
> index 15a9c45bdb5f..3875f22d7283 100644
> --- a/tools/testing/selftests/kvm/dirty_log_perf_test.c
> +++ b/tools/testing/selftests/kvm/dirty_log_perf_test.c
> @@ -28,8 +28,8 @@ static uint64_t guest_percpu_mem_size = DEFAULT_PER_VCPU_MEM_SIZE;
> /* Host variables */
> static u64 dirty_log_manual_caps;
> static bool host_quit;
> -static uint64_t iteration;
> -static uint64_t vcpu_last_completed_iteration[KVM_MAX_VCPUS];
> +static int iteration;
> +static int vcpu_last_completed_iteration[KVM_MAX_VCPUS];

Wouldn't it be better to use signed 64-bit variables instead? I.e. "int64_t" ?

Thomas

\
 
 \ /
  Last update: 2021-01-13 08:43    [W:0.125 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site