From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BB30C433DF for ; Thu, 21 May 2020 14:01:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B8EA206F6 for ; Thu, 21 May 2020 14:01:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729531AbgEUOBF (ORCPT ); Thu, 21 May 2020 10:01:05 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:4835 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729460AbgEUOBE (ORCPT ); Thu, 21 May 2020 10:01:04 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B5FDEB054420817EE0C8; Thu, 21 May 2020 22:01:02 +0800 (CST) Received: from [10.173.222.27] (10.173.222.27) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 21 May 2020 22:00:54 +0800 Subject: Re: [kvm-unit-tests PATCH 1/6] arm64: microbench: get correct ipi recieved num To: Jingyi Wang , , , CC: , , References: <20200517100900.30792-1-wangjingyi11@huawei.com> <20200517100900.30792-2-wangjingyi11@huawei.com> From: Zenghui Yu Message-ID: <8e011659-4e4d-7312-4466-5ed3ea54cc9b@huawei.com> Date: Thu, 21 May 2020 22:00:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20200517100900.30792-2-wangjingyi11@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.222.27] X-CFilter-Loop: Reflected Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 2020/5/17 18:08, Jingyi Wang wrote: > 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..ca022d9 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_recieved) I think you may want *ipi_received* ;-) Otherwise it can not even compile! > + ++received; > + > assert_msg(ipi_received, "failed to receive IPI in time, but received %d successfully\n", received); > } With this fixed, this looks good to me, Reviewed-by: Zenghui Yu Thanks.