From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BFE46A00C5; Thu, 7 May 2020 14:11:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B1E01DBFD; Thu, 7 May 2020 14:11:58 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 477EE1DA91 for ; Thu, 7 May 2020 14:11:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588853515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vXbTuqWDobuLyxMO+lLJ6+9ruS7Ze0IoUJke4YtTlm8=; b=jUwoLuLn3XVlb4PntgcFoewlsujT2aLDel/sUa7rViAbE5VdCGuRgNY8kHd8UmsexjtNiA Pe6a9k8I5jD9xGyIsV+KVSYl6c+b2z4CoZ4z4If+q8CVOIgwWK40WCEqgHYrDWi+xbHIBb xwPcGanXhVEa1vay9jj8czr26ZH/55g= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-134-UWWgjJFdPcKa1Ftkw59AGg-1; Thu, 07 May 2020 08:11:54 -0400 X-MC-Unique: UWWgjJFdPcKa1Ftkw59AGg-1 Received: by mail-vs1-f69.google.com with SMTP id j5so1170498vsc.6 for ; Thu, 07 May 2020 05:11:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GbSY9Barjh2fQ1xB5xlLoxoT7Hw3+DR4gr6LT4spFYc=; b=OeZS4K+HGagF8DgChDZIVJaeLxRgk2JIEaUxUheWRj1yotEDPrYfdE9Tm66DW6LTLB n7Nq7sFHw7yEWU4S6Fk3YCsuY2pi2Ltxr+fU1kHhRrzNA54FxxjHBiB0aJlri6s8pKVO U9R3b/PnI46DyjTTab8K5fGBO3oCNyDQ26lZMMpf6RvhUsVXRWfVFT+JJ+2V/THKNRxr eJCFuNioS1RHUEj/TJEmHkuRlDPNL5nbZWlWr3yav7gtMoVYywCRQw48b542Vdr/p2mZ ByWH3agpaA5aA2KD0nEEzJvsxJXKchCEXLNjK8gFvfMlmy3tx2hoY2QbplHaotqJGXXg ATig== X-Gm-Message-State: AGi0PuYW7ddkLIcZVt/zvGn1dqSqCzqaQT703hhl7gm1NZdSLDL/FvCQ tSAqYRjsIMo/zDshKtT7ShDS/4UJodYjvMA3N2C3kLYM/KM1+54AuvWPNwk/XOQYhxHq+tDbGH3 k/ogunep5ZkRCr9Zt94w= X-Received: by 2002:a1f:8fc1:: with SMTP id r184mr10966854vkd.12.1588853513343; Thu, 07 May 2020 05:11:53 -0700 (PDT) X-Google-Smtp-Source: APiQypJHA1y7RIdQlqYfBjB6jh89KpQLC4ipFUk8sOokEtWoBRwxgXk/4psW+bd5bJM4JZCIOjDh3kIR9GRKjY0f3GU= X-Received: by 2002:a1f:8fc1:: with SMTP id r184mr10966831vkd.12.1588853513066; Thu, 07 May 2020 05:11:53 -0700 (PDT) MIME-Version: 1.0 References: <20200501155649.2959-1-harry.van.haaren@intel.com> <20200506171642.32105-1-harry.van.haaren@intel.com> In-Reply-To: From: David Marchand Date: Thu, 7 May 2020 14:11:41 +0200 Message-ID: To: Phil Yang , Harry van Haaren Cc: "dev@dpdk.org" , Honnappa Nagarahalli , nd X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2] test/service: add perf test for service on app lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, May 7, 2020 at 8:29 AM Phil Yang wrote: > > > -----Original Message----- > > From: Harry van Haaren > > Sent: Thursday, May 7, 2020 1:17 AM > > To: dev@dpdk.org > > Cc: david.marchand@redhat.com; Phil Yang ; > > Honnappa Nagarahalli ; Harry van Haaren > > > > Subject: [PATCH v2] test/service: add perf test for service on app lcor= e > > > > This commit adds a basic test to check the cycle cost > > of related to calling into a service. > > > > Signed-off-by: Harry van Haaren > > > > --- > > > > v2: > > - Add space at start of output (Phil Yang) > > - Fix compile error on older GCCs (David Marchand) > > > > --- > > app/test/test_service_cores.c | 13 ++++++++++++- > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/app/test/test_service_cores.c b/app/test/test_service_core= s.c > > index a922c7ddc..75a3f8b45 100644 > > --- a/app/test/test_service_cores.c > > +++ b/app/test/test_service_cores.c > > @@ -789,8 +789,19 @@ service_app_lcore_poll_impl(const int mt_safe) > > "MT Unsafe: App core1 didn't return - > > EBUSY"); > > } > > > > - unregister_all(); > > + /* Performance test: call in a loop, and measure tsc() */ > > + uint32_t i; > > + const uint32_t perf_iters =3D (1 << 12); > > + uint64_t start =3D rte_rdtsc(); > > + for (i =3D 0; i < perf_iters; i++) { > > + int err =3D service_run_on_app_core_func(&id); > > + TEST_ASSERT_EQUAL(0, err, "perf test: returned run failur= e"); > > + } > > + uint64_t end =3D rte_rdtsc(); > > + printf("\t\tperf test for %s: %0.1f cycles per call\n", mt_safe ? > > This print will be printed before the function test result. > Apologize for my previous comments. Please ignore it. > > A nitpick comment on formatting the output. > > - printf("\t\tperf test for %s: %0.1f cycles per call\n", mt_safe ? > + printf("Perf test for %-10s: %0.1f cycles per call\n", mt_safe ? > > > Tested-by: Phil Yang > Reviewed-by: Phil Yang Ok, so I will restore this part from the v1 when applying. --=20 David Marchand