From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id DFFD3A490 for ; Wed, 17 Jan 2018 05:04:10 +0100 (CET) Received: by mail-pl0-f68.google.com with SMTP id 66so7820566plc.13 for ; Tue, 16 Jan 2018 20:04:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1apCjqzfsjHSRJIC2r2DK08hWLL/aFzShNo/tI6JEZg=; b=bAxcuo97LvWA5c2PNyTj/ZQDe2krZJpK9PdnUiH/IfS8pJUSPPSPH3Q3broL7R2fCf bMaOTQMDjAUcGwoD3cYqZRBTsB73vyYD6W0A6jDA5xqe821DwQkmodB9Ve7K0ofUQRQp Fq1Tbk+FWM1eUas0l9tyUebWGqdW9EGlbDQzcyUBcupT7HBnvMRfcW9qzRSIFRTMBbBD IEsstrGdEtZltwVKMvLk6GlSkir5kDbygwu739N7112NuowVlNr+mj2OTYGLif4FgjnU sS62CCugSd76N466AmFeEmbPUJxGNmaKKHt3LN6kFQMmExhCBiax2v2D3KAuaV6llk5s +IvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1apCjqzfsjHSRJIC2r2DK08hWLL/aFzShNo/tI6JEZg=; b=Qy67l+9LHDWmg+bB1sXLmRd0UUhlHFVUa0/1Chr4CjdBoLdqTZp5bRPSZ/AVE7LBKU S7BHXU9aTYhiRjMRNp0eh5QCddyNi/EPc6elFCU6nNmHW4IfIevv7/LP4Q0o/Vfs0ts/ DJ7+fEPLm5SZ5x2VXKSKqB92830YKZUAzQb/3COprWD7V7LoLLTE4yRdAlzGcPEtczpv mtP3vLn/2lSDq9xKCYHZXT5mLIdqfzmFgWdpBXb6XV0pXbmphK/jOtR2hHXVDg0//xQ3 7LKyM/VWtz6xILFHusO7G4Z8EDpSNkd1lbiWfZV8VE5NItv9T85evkIwkuc6OTUAwpCJ JFwg== X-Gm-Message-State: AKGB3mK35AJ7YHzGtwGosng1rRdGUU3Y0AoOHzBcm/ZpPYPo1kNO9nHV HVoMzvhET9nYUdz5sI2q8CL/vw== X-Google-Smtp-Source: ACJfBov9N0hIUPaRoKKMLrt1RLPyAa8tRuhpg/TioHFnJ4Diru7fE9Jrw0Wf0b0kbwKrCY4nG0hDFQ== X-Received: by 10.84.228.214 with SMTP id y22mr35759941pli.444.1516161849861; Tue, 16 Jan 2018 20:04:09 -0800 (PST) Received: from localhost.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id b68sm3977759pfg.159.2018.01.16.20.04.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jan 2018 20:04:09 -0800 (PST) From: Jia He To: dev@dpdk.org, Thomas Monjalon Cc: Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , konstantin.ananyev@intel.com, hemant.agrawal@nxp.com, Jia He Date: Tue, 16 Jan 2018 20:03:48 -0800 Message-Id: <1516161831-28719-1-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH v8 0/3] support c11 memory model barrier in librte_ring 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: Wed, 17 Jan 2018 04:04:11 -0000 To support C11 memory model barrier, 2 options are suggested by Jerin: 1. use rte_smp_rmb 2. use load_acquire/store_release CONFIG_RTE_RING_USE_C11_MEM_MODEL is provided, and by default it is "n" on any architectures so far. The reason why providing 2 options is due to the performance benchmark difference in different arm machines. Already fuctionally tested on the machines as follows: - on X86 - on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=y - on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=n --- Changelog: V8: Change the lincense to SPDX tag. Change USE_C11_MEM_MODEL to "n" on any architectures by default V7: fix check-git-log warnings which is suggested by Jerin V6: minor change in subject and log V5: split it into 2 patchset due to the milestone concerns, this is the 2st one. Also fix checkpatch.pl warnings V4: split into small patches V3: arch specific implementation for enqueue/dequeue barrier V2: let users choose whether using load_acquire/store_release V1: rte_smp_rmb() between 2 loads Jia He (3): eal/arm64: remove the braces {} for dmb() and dsb() ring: introduce new header file to include common functions ring: introduce new header file to support C11 memory model config/common_linuxapp | 2 + .../common/include/arch/arm/rte_atomic_64.h | 4 +- lib/librte_eventdev/rte_event_ring.h | 6 +- lib/librte_ring/Makefile | 4 +- lib/librte_ring/rte_ring.h | 173 ++---------------- lib/librte_ring/rte_ring_c11_mem.h | 193 ++++++++++++++++++++ lib/librte_ring/rte_ring_generic.h | 202 +++++++++++++++++++++ 7 files changed, 420 insertions(+), 164 deletions(-) create mode 100644 lib/librte_ring/rte_ring_c11_mem.h create mode 100644 lib/librte_ring/rte_ring_generic.h -- 2.7.4