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 433E1A0096 for ; Tue, 7 May 2019 19:38:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D037D343C; Tue, 7 May 2019 19:38:30 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 202422BD5 for ; Tue, 7 May 2019 19:38:28 +0200 (CEST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x47HcSrA106234 for ; Tue, 7 May 2019 13:38:28 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sbc6setxr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 07 May 2019 13:38:27 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 May 2019 18:37:52 +0100 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 7 May 2019 18:37:51 +0100 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x47HboTJ58392750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 May 2019 17:37:50 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2098C78067; Tue, 7 May 2019 17:37:50 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EDC0B78060; Tue, 7 May 2019 17:37:49 +0000 (GMT) Received: from davids-mbp.usor.ibm.com (unknown [9.70.84.57]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 7 May 2019 17:37:49 +0000 (GMT) To: "Ananyev, Konstantin" , "dev@dpdk.org" References: <1557170634-99830-1-git-send-email-drc@linux.vnet.ibm.com> <2601191342CEEE43887BDE71AB9772580148AA2191@irsmsx105.ger.corp.intel.com> From: David Christensen Date: Tue, 7 May 2019 10:37:49 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2601191342CEEE43887BDE71AB9772580148AA2191@irsmsx105.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19050717-0020-0000-0000-00000EE4E34C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011067; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01199970; UDB=6.00629581; IPR=6.00980851; MB=3.00026772; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-07 17:37:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050717-0021-0000-0000-000065BB7967 Message-Id: <0d1cc529-f44c-08dc-6bce-d52643fc8e8a@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-07_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=839 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905070114 Subject: Re: [dpdk-dev] [PATCH v2 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: <20190507173749.B_jHEWpqs9uaHIPFBnX2JnUGXIpRiFRahpEEaIsv_7k@z> >> @@ -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 */ >> }; > > Not sure why you think this is needed - right now > both iter and sum wouldn't be bigger than 32bit > (max value that sum can reach: 2^27). > I view test_barrier and other tools in the test directory as functional test tools for developers. My understanding is that they are not typically run as part of DTS or any other validation process (please let me know if that is incorrect). As a result, a developer that is testing this functionality might have a valid reason to alter the value of ITER_MAX for a specific functional test. While validating the changes in patch 4 of the series I needed to run more that 2^27 iterations. I encountered situations where some runs of my test code would fail and other runs would pass when using the default ITER_MAX value. As a result, I needed to extend the number of iterations tested to gain confidence in the final fix for Power systems. At the end, I was running 64 billion iterations (MAX_ITER = 0xF_0000_0000) across 64 Power 9 lcores which takes ~16 hours. I felt the patch to extend these values to 64 bit might benefit other developers in the future. And since the cost is low (this is not EAL library code pulled into every user application) there's no harm in making the change. >> - printf("%s: sum[%u]=%u, pt[%u].val=%u, pt[%u].iter=%u;\n", >> + printf("%s: sum[%u]=%lu, pt[%u].val=%lu, pt[%u].iter=%lu;\n", > > Here and in other places, you need to use PRIu64 for 64 bit values. Ok. I'll resubmit if there are no objections to the rationale behind the change. Dave