From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0060.outbound.protection.outlook.com [104.47.42.60]) by dpdk.org (Postfix) with ESMTP id 1CF1B1B20B; Sat, 29 Sep 2018 13:00:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m+OMbsT6b/70LaYpI9Mc/HJRN5xbww7sVSYWtiMNF+w=; b=J+YJ0+xQVBwKXmYVkBbW+UF4vg9+e9v8OHJ7Zn1igrC8Bcagw3pAyRY3tZ1lrTWH6K/bAOeCGKbvm9/LXmonrJgVvSBN7Grn27awai3Hlbyr9qccAh/ZC7nrF+aLNX6qQogAH1MObcGajQeJXyA2satYX36Jq+t+j5kYMM1E1/c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by SN6PR07MB5005.namprd07.prod.outlook.com (2603:10b6:805:ac::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.22; Sat, 29 Sep 2018 11:00:02 +0000 Date: Sat, 29 Sep 2018 16:29:48 +0530 From: Jerin Jacob To: Gavin Hu Cc: dev@dpdk.org, Honnappa.Nagarahalli@arm.com, steve.capper@arm.com, Ola.Liljedahl@arm.com, nd@arm.com, stable@dpdk.org Message-ID: <20180929105946.GA1950@jerin> References: <20180807031943.5331-1-gavin.hu@arm.com> <1537172244-64874-1-git-send-email-gavin.hu@arm.com> <1537172244-64874-3-git-send-email-gavin.hu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1537172244-64874-3-git-send-email-gavin.hu@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BMXPR01CA0027.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::13) To SN6PR07MB5005.namprd07.prod.outlook.com (2603:10b6:805:ac::31) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a58bef01-5765-406f-e35c-08d625fab62c X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5005; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5005; 3:a8vFBx1K66Q5qFeUaSjYd3Jg83mLPwAsJ8/8nL9L3IQZzKqiqTQ+eOeofnbe2PI/pzVOgNyffje4KdWjYfCfUvEdS6XiTi3J54e5/8feiAz8Dj7H3HD+uW4QJr02uFqjaC+EmjmH3JH00Lb+F9Go+y7bzY7jeKct6eJuSIO82vbjOXgq7PiTCCR9akbRth9YzBYujSEyXAA3plDvy6SufvU5tzzlxsuDsEPmZA0mIBfXq8pOIXe9oNQkUlqgrpZ7; 25:2L1kvVBav0kiRwPOlkxle7T/9wZjbAgu1ufGj5OFB2grgT7M/J46Wjy38yQ2/J8AUa0YUvN5qbPtWBsUQcKCHMOqVSU86kcIv9WvTo9+d1zgd+7sFTIGNm7RycNdHwTmb7qyIEgicc1NX3JFGa0qj/CTvkx9IRJWSfx+Gx78x4OWqB2lGgLxj4Z1KOaWYr+dhkBLI9pimDPCtkOy09y5j+/0Q3b5HMLKLjmRE3t3/Dyudn2FDUTUPa1SOGgSxj/acevpLi40ikdmpxtARUJTVSuqnDOHVBrGsM2JG0QL9U8KR2IBY2XQnUwrL3ubFPTj3XAgFuKHx/A2bABhuQYsvw==; 31:WaXuApYkcWslTA156GZ66onKavxq+mmviRtU5Cn3b6dx2gwYgKTfqavQy6jSstO+fup0FHwN/wUrQCxSS1rP48uheJVKFQr5T9vzt21IVOifmHKFlNPuo9jE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7oO9C+XytA0+JFKnt66HJlMdUNOCm4Kk1NjC+t6BFQVPXOVuG710xVpm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(3002001)(10201501046)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051); SRVR:SN6PR07MB5005; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5005; X-Forefront-PRVS: 0810818DA0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(376002)(136003)(39860400002)(346002)(13464003)(199004)(189003)(50466002)(6666003)(44832011)(1076002)(25786009)(386003)(956004)(11346002)(486006)(476003)(42882007)(3846002)(6116002)(316002)(23726003)(106356001)(5660300001)(14444005)(6916009)(446003)(33656002)(16586007)(6246003)(58126008)(2906002)(105586002)(4326008)(76176011)(26005)(33896004)(7736002)(47776003)(6496006)(8676002)(305945005)(52116002)(66066001)(33716001)(34290500001)(72206003)(478600001)(8936002)(68736007)(53936002)(9686003)(81156014)(81166006)(97736004)(229853002)(55016002)(186003)(16526019)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5005; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR07MB5005; 23:LstFj2NS3/ELlo1pTQcLuv1NCHKPNo4IHFvf1ztdF?= =?us-ascii?Q?qV9u7yazh3vF5Tr9CnttazLhU07+MiiVu7y7trrENZxhqQN6wL/LPmTI6b3q?= =?us-ascii?Q?PHf2sQ+3U6RnTZwbu0EEdehw501sZX+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zBJQ+W37zBfYc3M7RMUnouvVXYpoQhJsCVYhw1pZlGIqgeCb3MmZOy0dRWttGl4kEY1yK696F2WPsDjdAjsbie2thL7rw5wlpelBOJK3l9zqIYdMOmqjm1SETSdh+x3LxRFVFWvemDcu0dt710FhyiLwHprYaN+US4+CYy0JYeg2U6sgeNX/IBN3umPtkjQ3fc2TQncyCwZ2VWLMQRx+LGLlG36sHwS+AQlJfOnNBaFN8xN7g3oV0h/Zi6z/sYX3HbgjQXN2yFFre8xDcgK/280jDih9uw==; 5:rgj/cTSla+sHoMJ/RWwuxo9fEm1aTdnvMZo4Jvt5W7Swd3qO3ZU1PSAQycZrWf4erWjZC6me0dMC91VCIBONq8/ys97tNQeuK4e4tdd0hEV3N+Zt5syMIwXe4CZP08+fNd6m8ROdQe9/MkTHOWBEqu/CizpvpzN8jKD28nDD10A=; 7:kb06i6XlwvDtPwKouPZJqDU4IahYc56OkWIzABiufhtJRpl2fm5dOX9sXYt4ABErGwzgFUTfvevsU73cla5Fq5UZmTS8YcS0dPdFo5FoPxxA2qERFtjrwzD0lzbRpdOJe9NUfp9U27OKwkT8P2nTb3VtoDGipkf4fPRaV2c5KsgegDU0wOsG04brZUpCAU9PW8DPrnQw3U2+zUB6yhscl0JCx5kMsdJS7eqsb2Rxio0kP+ao/S3ubyhSJH/qVfr8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2018 11:00:02.0918 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a58bef01-5765-406f-e35c-08d625fab62c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5005 Subject: Re: [dpdk-stable] [PATCH v3 3/3] ring: move the atomic load of head above the loop X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2018 11:00:07 -0000 -----Original Message----- > Date: Mon, 17 Sep 2018 16:17:24 +0800 > From: Gavin Hu > To: dev@dpdk.org > CC: gavin.hu@arm.com, Honnappa.Nagarahalli@arm.com, steve.capper@arm.com, > Ola.Liljedahl@arm.com, jerin.jacob@caviumnetworks.com, nd@arm.com, > stable@dpdk.org > Subject: [PATCH v3 3/3] ring: move the atomic load of head above the loop > X-Mailer: git-send-email 2.7.4 > > External Email > > In __rte_ring_move_prod_head, move the __atomic_load_n up and out of > the do {} while loop as upon failure the old_head will be updated, > another load is costly and not necessary. > > This helps a little on the latency,about 1~5%. > > Test result with the patch(two cores): > SP/SC bulk enq/dequeue (size: 8): 5.64 > MP/MC bulk enq/dequeue (size: 8): 9.58 > SP/SC bulk enq/dequeue (size: 32): 1.98 > MP/MC bulk enq/dequeue (size: 32): 2.30 > > Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option") > Cc: stable@dpdk.org > > Signed-off-by: Gavin Hu > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Steve Capper > Reviewed-by: Ola Liljedahl Acked-by: Jerin Jacob Tested-by: Jerin Jacob