From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id EB5332B87 for ; Thu, 9 May 2019 20:10:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 11:10:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,450,1549958400"; d="scan'208";a="170053390" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 09 May 2019 11:10:45 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 19:10:44 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.31]) by irsmsx111.ger.corp.intel.com ([169.254.2.85]) with mapi id 14.03.0415.000; Thu, 9 May 2019 19:10:44 +0100 From: "Ananyev, Konstantin" To: David Christensen , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 3/4] test: change memory barrier variables to uint64_t Thread-Index: AQHVBeF01/v82gOfJkCp4q2z3X2FoKZjGS/g Date: Thu, 9 May 2019 18:10:43 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772580148AA346F@irsmsx105.ger.corp.intel.com> References: <1557349352-26070-1-git-send-email-drc@linux.vnet.ibm.com> In-Reply-To: <1557349352-26070-1-git-send-email-drc@linux.vnet.ibm.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODI1YTcwYTMtYzY0Yy00N2ZjLTg3NDQtNGI3NGMyYjczOGVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicldOUUNlaHpyY29USGVVTndobnVjWDNFXC9yQ1BqZjNPQVBodzZLMUpXazVDY3FMcSs4dEVpR05lNHNta2EyZ1gifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 3/4] test: change memory barrier variables to uint64_t 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: , X-List-Received-Date: Thu, 09 May 2019 18:10:47 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Christensen > Sent: Wednesday, May 8, 2019 10:03 PM > To: dev@dpdk.org > Cc: David Christensen > Subject: [dpdk-dev] [PATCH v3 3/4] test: change memory barrier variables = to uint64_t >=20 > Memory barrier failures can be intermittent. Increase the size of the > sum/val/iteration variables to allow tests that can run for days so that > sporadic errors can be identified. >=20 > Signed-off-by: David Christensen > --- > v2: > * Removed change to ITER_MAX > v3: > * None > --- > app/test/test_barrier.c | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-) >=20 > diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c > index ae37b1e..a0b4704 100644 > --- a/app/test/test_barrier.c > +++ b/app/test/test_barrier.c > @@ -55,8 +55,8 @@ struct plock { > */ > struct plock_test { > struct plock lock; > - uint32_t val; > - uint32_t iter; > + uint64_t val; > + uint64_t iter; > }; >=20 > /* > @@ -65,8 +65,8 @@ struct plock_test { > */ > struct lcore_plock_test { > struct plock_test *pt[2]; /* shared, lock-protected data */ > - uint32_t sum[2]; /* local copy of the shared data */ > - uint32_t iter; /* number of iterations to perfom */ > + uint64_t sum[2]; /* local copy of the shared data */ > + uint64_t iter; /* number of iterations to perfom */ > uint32_t lc; /* given lcore id */ > }; >=20 > @@ -130,7 +130,8 @@ struct lcore_plock_test { > plock_test1_lcore(void *data) > { > uint64_t tm; > - uint32_t i, lc, ln, n; > + uint32_t lc, ln; > + uint64_t i, n; > struct lcore_plock_test *lpt; >=20 > lpt =3D data; > @@ -166,9 +167,9 @@ struct lcore_plock_test { >=20 > tm =3D rte_get_timer_cycles() - tm; >=20 > - printf("%s(%u): %u iterations finished, in %" PRIu64 > + printf("%s(%u): %" PRIu64 " iterations finished, in %" PRIu64 > " cycles, %#Lf cycles/iteration, " > - "local sum=3D{%u, %u}\n", > + "local sum=3D{%" PRIu64 ", %" PRIu64 "}\n", > __func__, lc, i, tm, (long double)tm / i, > lpt->sum[0], lpt->sum[1]); > return 0; > @@ -184,11 +185,11 @@ struct lcore_plock_test { > * and local data are the same. > */ > static int > -plock_test(uint32_t iter, enum plock_use_type utype) > +plock_test(uint64_t iter, enum plock_use_type utype) > { > int32_t rc; > uint32_t i, lc, n; > - uint32_t *sum; > + uint64_t *sum; > struct plock_test *pt; > struct lcore_plock_test *lpt; >=20 > @@ -199,7 +200,7 @@ struct lcore_plock_test { > lpt =3D calloc(n, sizeof(*lpt)); > sum =3D calloc(n + 1, sizeof(*sum)); >=20 > - printf("%s(iter=3D%u, utype=3D%u) started on %u lcores\n", > + printf("%s(iter=3D%" PRIu64 ", utype=3D%u) started on %u lcores\n", > __func__, iter, utype, n); >=20 > if (pt =3D=3D NULL || lpt =3D=3D NULL || sum =3D=3D NULL) { > @@ -247,7 +248,7 @@ struct lcore_plock_test { >=20 > rc =3D 0; > for (i =3D 0; i !=3D n; i++) { > - printf("%s: sum[%u]=3D%u, pt[%u].val=3D%u, pt[%u].iter=3D%u;\n", > + printf("%s: sum[%u]=3D%" PRIu64 ", pt[%u].val=3D%" PRIu64 ", pt[%u].it= er=3D%" PRIu64 ";\n", > __func__, i, sum[i], i, pt[i].val, i, pt[i].iter); >=20 > /* race condition occurred, lock doesn't work properly */ > -- Acked-by: Konstantin Ananyev > 1.8.3.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B315CA0096 for ; Thu, 9 May 2019 20:10:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9CD8A2C2B; Thu, 9 May 2019 20:10:48 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id EB5332B87 for ; Thu, 9 May 2019 20:10:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 11:10:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,450,1549958400"; d="scan'208";a="170053390" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 09 May 2019 11:10:45 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 19:10:44 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.31]) by irsmsx111.ger.corp.intel.com ([169.254.2.85]) with mapi id 14.03.0415.000; Thu, 9 May 2019 19:10:44 +0100 From: "Ananyev, Konstantin" To: David Christensen , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 3/4] test: change memory barrier variables to uint64_t Thread-Index: AQHVBeF01/v82gOfJkCp4q2z3X2FoKZjGS/g Date: Thu, 9 May 2019 18:10:43 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772580148AA346F@irsmsx105.ger.corp.intel.com> References: <1557349352-26070-1-git-send-email-drc@linux.vnet.ibm.com> In-Reply-To: <1557349352-26070-1-git-send-email-drc@linux.vnet.ibm.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODI1YTcwYTMtYzY0Yy00N2ZjLTg3NDQtNGI3NGMyYjczOGVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicldOUUNlaHpyY29USGVVTndobnVjWDNFXC9yQ1BqZjNPQVBodzZLMUpXazVDY3FMcSs4dEVpR05lNHNta2EyZ1gifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 3/4] test: change memory barrier variables to uint64_t 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" Message-ID: <20190509181043.SY1TQTlB7TgkJllGfn3A_M4OaFmPRcJFxm-OAviMigg@z> > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Christensen > Sent: Wednesday, May 8, 2019 10:03 PM > To: dev@dpdk.org > Cc: David Christensen > Subject: [dpdk-dev] [PATCH v3 3/4] test: change memory barrier variables = to uint64_t >=20 > Memory barrier failures can be intermittent. Increase the size of the > sum/val/iteration variables to allow tests that can run for days so that > sporadic errors can be identified. >=20 > Signed-off-by: David Christensen > --- > v2: > * Removed change to ITER_MAX > v3: > * None > --- > app/test/test_barrier.c | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-) >=20 > diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c > index ae37b1e..a0b4704 100644 > --- a/app/test/test_barrier.c > +++ b/app/test/test_barrier.c > @@ -55,8 +55,8 @@ struct plock { > */ > struct plock_test { > struct plock lock; > - uint32_t val; > - uint32_t iter; > + uint64_t val; > + uint64_t iter; > }; >=20 > /* > @@ -65,8 +65,8 @@ struct plock_test { > */ > struct lcore_plock_test { > struct plock_test *pt[2]; /* shared, lock-protected data */ > - uint32_t sum[2]; /* local copy of the shared data */ > - uint32_t iter; /* number of iterations to perfom */ > + uint64_t sum[2]; /* local copy of the shared data */ > + uint64_t iter; /* number of iterations to perfom */ > uint32_t lc; /* given lcore id */ > }; >=20 > @@ -130,7 +130,8 @@ struct lcore_plock_test { > plock_test1_lcore(void *data) > { > uint64_t tm; > - uint32_t i, lc, ln, n; > + uint32_t lc, ln; > + uint64_t i, n; > struct lcore_plock_test *lpt; >=20 > lpt =3D data; > @@ -166,9 +167,9 @@ struct lcore_plock_test { >=20 > tm =3D rte_get_timer_cycles() - tm; >=20 > - printf("%s(%u): %u iterations finished, in %" PRIu64 > + printf("%s(%u): %" PRIu64 " iterations finished, in %" PRIu64 > " cycles, %#Lf cycles/iteration, " > - "local sum=3D{%u, %u}\n", > + "local sum=3D{%" PRIu64 ", %" PRIu64 "}\n", > __func__, lc, i, tm, (long double)tm / i, > lpt->sum[0], lpt->sum[1]); > return 0; > @@ -184,11 +185,11 @@ struct lcore_plock_test { > * and local data are the same. > */ > static int > -plock_test(uint32_t iter, enum plock_use_type utype) > +plock_test(uint64_t iter, enum plock_use_type utype) > { > int32_t rc; > uint32_t i, lc, n; > - uint32_t *sum; > + uint64_t *sum; > struct plock_test *pt; > struct lcore_plock_test *lpt; >=20 > @@ -199,7 +200,7 @@ struct lcore_plock_test { > lpt =3D calloc(n, sizeof(*lpt)); > sum =3D calloc(n + 1, sizeof(*sum)); >=20 > - printf("%s(iter=3D%u, utype=3D%u) started on %u lcores\n", > + printf("%s(iter=3D%" PRIu64 ", utype=3D%u) started on %u lcores\n", > __func__, iter, utype, n); >=20 > if (pt =3D=3D NULL || lpt =3D=3D NULL || sum =3D=3D NULL) { > @@ -247,7 +248,7 @@ struct lcore_plock_test { >=20 > rc =3D 0; > for (i =3D 0; i !=3D n; i++) { > - printf("%s: sum[%u]=3D%u, pt[%u].val=3D%u, pt[%u].iter=3D%u;\n", > + printf("%s: sum[%u]=3D%" PRIu64 ", pt[%u].val=3D%" PRIu64 ", pt[%u].it= er=3D%" PRIu64 ";\n", > __func__, i, sum[i], i, pt[i].val, i, pt[i].iter); >=20 > /* race condition occurred, lock doesn't work properly */ > -- Acked-by: Konstantin Ananyev > 1.8.3.1