Message ID | 20191015092826.13002-1-ruifeng.wang@arm.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 919AF1EA8A; Tue, 15 Oct 2019 11:28:59 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 6EE531EA05 for <dev@dpdk.org>; Tue, 15 Oct 2019 11:28:58 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DE1D728; Tue, 15 Oct 2019 02:28:52 -0700 (PDT) Received: from net-arm-c2400-02.shanghai.arm.com (net-arm-c2400-02.shanghai.arm.com [10.169.40.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D11AA3F718; Tue, 15 Oct 2019 02:28:50 -0700 (PDT) From: Ruifeng Wang <ruifeng.wang@arm.com> To: david.hunt@intel.com Cc: dev@dpdk.org, hkalra@marvell.com, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, nd@arm.com, Ruifeng Wang <ruifeng.wang@arm.com> Date: Tue, 15 Oct 2019 17:28:24 +0800 Message-Id: <20191015092826.13002-1-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008095524.1585-1-ruifeng.wang@arm.com> References: <20191008095524.1585-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH v3 0/2] fix distributor unit test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
fix distributor unit test
|
|
Message
Ruifeng Wang
Oct. 15, 2019, 9:28 a.m. UTC
Bug 342 reported distributor_autotest execution suspension on aarch64 platform. Issue was due to lack of synchronization among threads. Distributor thread and worker thread may get deadlocked. Fixed synchronization issue by adding barriers. Another issue identified was in test case. Non-atomic operation on stat value could cause value reset not been observed by worker thread and mess counters. The issue was fixed by using atomic operations. --- v3: Added comments for using of C11 acquire/release semantics. (Honnappa) v2: Fixed intermittent packet count incorrect failure. (Aaron, David) Fixed Clang build on 32bit systems. Additional patch to fix non-atomic operation in unit test. Ruifeng Wang (2): lib/distributor: fix deadlock issue for aarch64 test/distributor: fix false unit test failure app/test/test_distributor.c | 6 +- lib/librte_distributor/meson.build | 5 ++ lib/librte_distributor/rte_distributor.c | 68 ++++++++++++++------ lib/librte_distributor/rte_distributor_v20.c | 59 ++++++++++++----- 4 files changed, 101 insertions(+), 37 deletions(-)
Comments
On Tue, Oct 15, 2019 at 11:29 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote: > > Bug 342 reported distributor_autotest execution suspension > on aarch64 platform. > Issue was due to lack of synchronization among threads. Distributor > thread and worker thread may get deadlocked. > Fixed synchronization issue by adding barriers. > > Another issue identified was in test case. Non-atomic operation on > stat value could cause value reset not been observed by worker thread > and mess counters. The issue was fixed by using atomic operations. > > --- > v3: > Added comments for using of C11 acquire/release semantics. (Honnappa) > > v2: > Fixed intermittent packet count incorrect failure. (Aaron, David) > Fixed Clang build on 32bit systems. > Additional patch to fix non-atomic operation in unit test. David, Can you review this series? Thanks.
On 24/10/2019 20:31, David Marchand wrote: > On Tue, Oct 15, 2019 at 11:29 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote: >> Bug 342 reported distributor_autotest execution suspension >> on aarch64 platform. >> Issue was due to lack of synchronization among threads. Distributor >> thread and worker thread may get deadlocked. >> Fixed synchronization issue by adding barriers. >> >> Another issue identified was in test case. Non-atomic operation on >> stat value could cause value reset not been observed by worker thread >> and mess counters. The issue was fixed by using atomic operations. >> >> --- >> v3: >> Added comments for using of C11 acquire/release semantics. (Honnappa) >> >> v2: >> Fixed intermittent packet count incorrect failure. (Aaron, David) >> Fixed Clang build on 32bit systems. >> Additional patch to fix non-atomic operation in unit test. > David, > > Can you review this series? > Thanks. > Hi David, I had tested this previously, including performance comparisons against original version on x86, and saw no performance degradation, so I Acked it. I can re-ack on the latest version now. Thanks, Dave.
On Fri, Oct 25, 2019 at 10:11 AM Hunt, David <david.hunt@intel.com> wrote: > > > On 24/10/2019 20:31, David Marchand wrote: > > On Tue, Oct 15, 2019 at 11:29 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote: > >> Bug 342 reported distributor_autotest execution suspension > >> on aarch64 platform. > >> Issue was due to lack of synchronization among threads. Distributor > >> thread and worker thread may get deadlocked. > >> Fixed synchronization issue by adding barriers. > >> > >> Another issue identified was in test case. Non-atomic operation on > >> stat value could cause value reset not been observed by worker thread > >> and mess counters. The issue was fixed by using atomic operations. > >> > >> --- > >> v3: > >> Added comments for using of C11 acquire/release semantics. (Honnappa) The comments are also something to maintain, so checking the v3 made sense to me. > >> > >> v2: > >> Fixed intermittent packet count incorrect failure. (Aaron, David) > >> Fixed Clang build on 32bit systems. > >> Additional patch to fix non-atomic operation in unit test. > > David, > > > > Can you review this series? > > Thanks. > > > > Hi David, > > I had tested this previously, including performance comparisons > against original version on x86, and saw no performance degradation, so > I Acked it. I can re-ack on the latest version now. If you think this is fine as is, I will go and apply with your ack.
On 25/10/2019 09:18, David Marchand wrote: > On Fri, Oct 25, 2019 at 10:11 AM Hunt, David <david.hunt@intel.com> wrote: >> >> On 24/10/2019 20:31, David Marchand wrote: >>> On Tue, Oct 15, 2019 at 11:29 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote: >>>> Bug 342 reported distributor_autotest execution suspension >>>> on aarch64 platform. >>>> Issue was due to lack of synchronization among threads. Distributor >>>> thread and worker thread may get deadlocked. >>>> Fixed synchronization issue by adding barriers. >>>> >>>> Another issue identified was in test case. Non-atomic operation on >>>> stat value could cause value reset not been observed by worker thread >>>> and mess counters. The issue was fixed by using atomic operations. >>>> >>>> --- >>>> v3: >>>> Added comments for using of C11 acquire/release semantics. (Honnappa) > The comments are also something to maintain, so checking the v3 made > sense to me. I agree, and the comments look good to me. > >>>> v2: >>>> Fixed intermittent packet count incorrect failure. (Aaron, David) >>>> Fixed Clang build on 32bit systems. >>>> Additional patch to fix non-atomic operation in unit test. >>> David, >>> >>> Can you review this series? >>> Thanks. >>> >> Hi David, >> >> I had tested this previously, including performance comparisons >> against original version on x86, and saw no performance degradation, so >> I Acked it. I can re-ack on the latest version now. > If you think this is fine as is, I will go and apply with your ack. Sure, thanks. Regards, Dave.
On Tue, Oct 15, 2019 at 11:29 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote: > > Bug 342 reported distributor_autotest execution suspension > on aarch64 platform. > Issue was due to lack of synchronization among threads. Distributor > thread and worker thread may get deadlocked. > Fixed synchronization issue by adding barriers. > > Another issue identified was in test case. Non-atomic operation on > stat value could cause value reset not been observed by worker thread > and mess counters. The issue was fixed by using atomic operations. Acked-by: David Hunt <david.hunt@intel.com> Applied, thanks. -- David Marchand