Re: [kvm-unit-tests PATCH v2 1/8] arm64: microbench: get correct ipi received num
Hi Jingyi, On 7/2/20 5:01 AM, Jingyi Wang wrote: > If ipi_exec() fails because of timeout, we shouldn't increase > the number of ipi received. > > Signed-off-by: Jingyi Wang Reviewed-by: Eric Auger Thanks Eric > --- > arm/micro-bench.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arm/micro-bench.c b/arm/micro-bench.c > index 4612f41..794dfac 100644 > --- a/arm/micro-bench.c > +++ b/arm/micro-bench.c > @@ -103,7 +103,9 @@ static void ipi_exec(void) > while (!ipi_received && tries--) > cpu_relax(); > > - ++received; > + if (ipi_received) > + ++received; > + > assert_msg(ipi_received, "failed to receive IPI in time, but received > %d successfully\n", received); > } > > ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
[kvm-unit-tests PATCH v2 1/8] arm64: microbench: get correct ipi received num
If ipi_exec() fails because of timeout, we shouldn't increase the number of ipi received. Signed-off-by: Jingyi Wang --- arm/micro-bench.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arm/micro-bench.c b/arm/micro-bench.c index 4612f41..794dfac 100644 --- a/arm/micro-bench.c +++ b/arm/micro-bench.c @@ -103,7 +103,9 @@ static void ipi_exec(void) while (!ipi_received && tries--) cpu_relax(); - ++received; + if (ipi_received) + ++received; + assert_msg(ipi_received, "failed to receive IPI in time, but received %d successfully\n", received); } -- 2.19.1 ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm