From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0046.outbound.protection.outlook.com [104.47.42.46]) by dpdk.org (Postfix) with ESMTP id B71DC20F for ; Thu, 18 May 2017 12:17:22 +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; bh=P46ASdR486ZR8evekaRdnYvrCd58nKPcgyK4FJSGGyE=; b=kXV4fOCrw/KpaNYsBgb1MeloX7C9et/pKlTUjkAduTPqL/jW3wSGlvA76xvi6tTmG0rO86zD/HnXuoY5r9ULRBVADk176zQ/lCHx6P3SKvp4L9bX6LgQV+Mt5YFzeMV2SLoO7st3gvnegxqe+XM4FRZZze4S3N8VQiTsOwPbbh0= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin (111.93.218.67) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Thu, 18 May 2017 10:17:17 +0000 Date: Thu, 18 May 2017 15:46:59 +0530 From: Jerin Jacob To: Jianbo Liu Cc: dev@dpdk.org, thomas@monjalon.net, Jan Viktorin Message-ID: <20170518101657.GA17993@jerin> References: <20170511101046.26456-1-jerin.jacob@caviumnetworks.com> <20170511101046.26456-3-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (10.174.56.16) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ba4c98f-094a-485b-4d5f-08d49dd71170 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:kArlhFy3CFjx9iC9zqST+gPgWJf8VlNVsIvGYZJVxHrTl1Tjmb6s5L7gkKpD0ZzrEYhFmHV2UgrJLTkZfT25uFQgwd5/H+LoJrjjpEbGEUKEwSd1QFSEbJ3yPgsAb4nyUd2KYvXYHcTpiqaSZxxFXrxNfSd+0xq/f94vIGig3nymw7jY9YUsFrvNvleh+oaqzQR7nU90BDje4rL0AbVNgj9/mCdlz0WZIlzlE3G6Q6G/awsWmDQetiGjmWfT8oe+OzuOx2d/07DXT/jip6qdnTbE7drp3+1RRB+X4XktazFOkfnT+vryq0qEe4LKoeufS5TnnONzx5feDM8I3XgDMQ==; 25:ss2pr6Ufx9ir5KuYaawQYWyR1O14K74AsOoETr04D2gvWcX+2SQFu3NZu451rYeaJGFU93TK1OXE4L1YDlwyigng8+Lx+QqQ9TY6yUxnjFsBku8iWPmPpOdcqeLmhmTyI6XFm4HU8tGAhC5fRQfxhphU4IlSEPpQzBhrMqT/AkFWe2cN4xLt9OjGPLkuALaMZ80kAkb8viPYDvKvWNBCbQrprSbLdT8e7d9/ZzmlAsQyHRY4xxASfLQVx5JFOa4sqgZbK5jT/1c0+guzlzN4PLkSHJyMRrnIQ6tf2c9hNMf61kbjKI3uW+p4p0vLrc1Dz0EnFg5RkZv5m1ggZbZ2D1XvbpdgujORbsR1og8zJ3LktoCoeMx5LM2QPbOJStUccKt5uiY3chEPFDteP4RVXem4/o5Zz+D+IF0rzHv6gFLfRZDC1wEIs7kMxjqMgchc91Km8o+xBgeUPovAGcVBkpUB+H48NEnNgoX2wN/ejek= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:o1AcaF8b/Ari+FYstKHQURfKEG3Tgv5OpXI0rtS6FSaKzZVE2ObqH9OJl1f9ErgbzH5iMAuSlLOjDJm9/57dCEj4l2MTaXUkPRvDW6ltkLfBvwBtQQBVELw7nUmg5TgQYvD+EsWEEZCDi4VeHscubOOoXJD3y8qhJlfgm+iIkmIFKaoK3vg0ngSqpf/IMMOnucdDi/vCM0787MXPPm2nzkzqiIGZUH8exMD7PqmiPa8ND3Fhqtslg9llP2JQJO50g/0/5FE70HyDhkeTjc+tsw==; 20:JNgKeSt3EjrzCVmkZzdql56J6/1mqdv2UCxVaF8QkMFw1knkx4Z4bAzSGxh3lMfzxwh4V17yvMRjdO8qDK4tTsJ9mbOUzOKvMeFv9Dr+fZ7SZVLrshufDliS/ZQ39a7T8puOsAPFLsysI5LUiLQ071lDt0h/Zcwz0On0oPtiQ2iuhB2yvvRsrJ7+PqBip2U6e0dMLjfxpVgUn8z4DUEt938N0hgYUAXUSQFWgr/kLX34qqa76EqZAltnc4jczuJtD3YjelKw1BagcchvezZ1P9WUIBo8yBJbazHr00aYEj8HbB7rLAOmwixZQUeUrronN5W/96ol3tNv1D+jrxthzwirD8SXA8n57Or8xsT/NWKYtglwBJRD2HSAGfzdFfZB/0pbFkx2I0UNF3mMaTFy8puWNTfoYKacYUXJvRdsUkxfUj5DqLl70SD7hu9eVYhVQu3bKmJ81kAFT2u2UTd48pibkBwBosPT1nOQLQqeacVEPDWXt5Syz6VQnxxw3I5YEUqfoV3i/VQ1C7FwfjLO0MIHJawKGPNkT6ieXk87ZH2C0cGz7TSzNXQA/5hYDcodLquHz/Od/NCw4l5evAk25O/nLxhmknCKrm2uOl3fFAQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:iMM5XXdTfC6SNLDV46mj0osiKOLh+kQ9nE4u1kHuzSuAHoBacvOU4kY8egJdy6oc4444iVMxRpxU7czB6SiC+4jy4r5xJss7x65/jmkU1UiM6Ps5NBYx30B5sfPplYCVexLoz2wmBPaMlLgCPPVTpEdMsw+/kqqe28mdazcb0BAqbTk8dnJT0rjWB8RlSI7ksxf5CSvbwyyp6C76MXRLHJGuRMh+ay91QpmQcuX0R9AH4r5phFnAkbVGJvLbSnMSZMwzVvZAu47gprdo6tHc/qIuhCJCAM86kw4XAW7C3fpAD55Gg7m4PkVf8A6mVeDpe8Sb28F1VpxdbHIenxWoKIUKV8bCYu89/G5KqvzgX/8KrpgAyrvts7H7mI18NLFRGlxWHYpuLUcRDE0BOlHrl9upw8qClrZWnIItDRZo2W5nmLIzTiyUekyt7dbVcnTft7AzTPGuyo9M0UWNLjRQjaS0rod3eEz9O2uwho8hZV3u6YR5hBuR63ki1cH4OyaW3aHVjy1+2wRCXxKMf6UcR45bu4ubwxLWIW2NJfJd3Cof573vV+i2E24O8STiQ/e8zKraySNYpG7SgDEuaGGU7dNqHpn2ZUIHpjtV8I+2QaZf7GRTZlJAAYPIvKEC2VzKBrFdNP2Y9bik+fXYl3N1pfpV47NhEKc7uAH0iCIeqwBFXXdRMVhJfm5OOGK2j7a5N7ywq/7lnazOFPdQuMcOIrpQ2pI8JoavOXGtKl0saYz25F4Q35abn2L30WQPAYXRUXih4tJk2DJ6mfnFfsOaEA== X-Forefront-PRVS: 0311124FA9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39850400002)(39410400002)(39840400002)(39450400003)(24454002)(13464003)(6496005)(33716001)(6246003)(38730400002)(76176999)(110136004)(5009440100003)(54356999)(50986999)(8676002)(81166006)(53546009)(478600001)(25786009)(66066001)(4001350100001)(55016002)(83506001)(50466002)(9686003)(23726003)(53936002)(6666003)(5660300001)(1076002)(72206003)(6916009)(2950100002)(42882006)(7736002)(229853002)(33656002)(4326008)(42186005)(6116002)(189998001)(3846002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:jerin; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:1PHGX6Ngu5f3yyMjX30G5GsF3Wfq7I4lwHSG5SH?= =?us-ascii?Q?htFd4jyWW05MDPHypBrBmvf6L4xwrMR1x1H9U/pbuYyR30Ip0190od9ZoIbY?= =?us-ascii?Q?HBqBRwXqaj38/ueZl4jJB/L9LXEVKzRsirFx5gB480kjIs7oLCFD7KkQvahX?= =?us-ascii?Q?SLun+K7EoTcNe3epH7JPQduriX3JtxyiUn2HH/ek+K3t9KwopmPi2g/1Ot1b?= =?us-ascii?Q?Y1elIsuLjaTdoPH4x9yYsudZpqJ+aA5quL5CtMThszoLnbsBU51yl//NW/0Q?= =?us-ascii?Q?P2YvWyHmuQUPwqbee+IPOcQXQboia/S+r+n2D4HDnMhd9PlOF5ZKaGLy4Qwa?= =?us-ascii?Q?+4XbmyMSyDRovgEAj1Q2CjNqzJz8/vSMp6n0ZUaLfxV+JtPzKJ80cdGQEU+C?= =?us-ascii?Q?qsOXEvhKBwB7DRdgZ8RCKj02uaBbn87gPbL8ZxzPvQ3AbvXE0ZXxDO5V3O+w?= =?us-ascii?Q?90IEjVpsH3Y6kbCAMRLHbnWeKDSPicQs/6AnRkR+820B8yIE9WISzEfwn6pj?= =?us-ascii?Q?CuQ4HvAZYR7BoW+uS8nAAFwpkjBP+7G3z/AL7gp+xgMz7hMx2L0+JhSnLqPP?= =?us-ascii?Q?yn8naWomPq6oHhtzymt9Kq9tU7Q/jQggzBOcw37Bw5L75YY4pDolWsOPYJu+?= =?us-ascii?Q?DZuwZTnvcZA6co2r4AmHwBd+iWcr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ME2C87ducPXQdgiiCEj1P3dttsWrh+HzXc2cv/UKQA4yAhgWRJq1V4RLZV8yIq3W6UzKvn8mWFHqstSFcutcDps4yL1eCIKl+FW97BHUmbbcRiVWn94ROPtWZcr3wOyWJJ7psqkXsBxJ5LjdNw==; 5:ZHWNNlKKqMltp23w458YVubA34W1h4IR5PNBn0HnMFjOrOKEFbWyM57cD+RJnpcTO7wCtYVa7CH34mWyOFyLOhMsYf8nrnlcvTBZcxUies8iHjglwhQeq4CEAQEHPCbTlMmJd2lcwoCelXmu9Iwd/A==; 24:Z6JS7Y37d4CfDX+Imd2JVUonDcj8YCTnHEGpZfa2fMkbN0daTYHMRBF7v8xZtP4VrH2oUVd8BwlpcXYlRQ+XZVigbbbRJVTCcqSls19+mVs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:+dKO06iF6R2L4ninE0TSIdkON7J/r65nGzzJFdj7KDnaboexiUVxNIp3t0vbPi865xjio46uzoIrmb+fZQLu9R3Q5Nj/G2Y+NOQODbBqV9TU3C8Eh9rK0cssrJUxw12a6juMZXqmwWL5Ct+jHGqy2QkxH4qJn8dwEyv+dnKQ42bb3cRJRvxNcaiKbxjHtCubyb5XP9nQRqGbJshqEln58hegaxTjzEdIkimrBJEsI6RqvAfJd1KDCb+n/95kbpNWTBpQLrfcJW1wpwIhTUB92EBOwCzome253EFXCpQbrmq1Fec/HgxG5Hp901ddUPCZC+6ULMHkdvSf3GEr+7YLEw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2017 10:17:17.9483 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH 3/6] eal/arm64: rte pause implementation for arm64 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, 18 May 2017 10:17:23 -0000 -----Original Message----- > Date: Thu, 18 May 2017 17:40:58 +0800 > From: Jianbo Liu > To: Jerin Jacob > Cc: dev@dpdk.org, thomas@monjalon.net, Jan Viktorin > > Subject: Re: [dpdk-dev] [PATCH 3/6] eal/arm64: rte pause implementation for > arm64 > > On 11 May 2017 at 18:10, Jerin Jacob wrote: > > CC: Jianbo Liu > > Signed-off-by: Jerin Jacob > > --- > > lib/librte_eal/common/include/arch/arm/rte_pause.h | 4 ++ > > .../common/include/arch/arm/rte_pause_64.h | 55 ++++++++++++++++++++++ > > 2 files changed, 59 insertions(+) > > create mode 100644 lib/librte_eal/common/include/arch/arm/rte_pause_64.h > > > > diff --git a/lib/librte_eal/common/include/arch/arm/rte_pause.h b/lib/librte_eal/common/include/arch/arm/rte_pause.h > > index 0fe88aba9..9b79405e6 100644 > > --- a/lib/librte_eal/common/include/arch/arm/rte_pause.h > > +++ b/lib/librte_eal/common/include/arch/arm/rte_pause.h > > @@ -37,7 +37,11 @@ > > extern "C" { > > #endif > > > > +#ifdef RTE_ARCH_64 > > +#include > > +#else > > #include > > +#endif > > > > #ifdef __cplusplus > > } > > diff --git a/lib/librte_eal/common/include/arch/arm/rte_pause_64.h b/lib/librte_eal/common/include/arch/arm/rte_pause_64.h > > new file mode 100644 > > index 000000000..cae996de8 > > --- /dev/null > > +++ b/lib/librte_eal/common/include/arch/arm/rte_pause_64.h > > @@ -0,0 +1,55 @@ > > +/* > > + * BSD LICENSE > > + * > > + * Copyright(c) 2017 Cavium. All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * > > + * * Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * * Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in > > + * the documentation and/or other materials provided with the > > + * distribution. > > + * * Neither the name of Cavium nor the names of its > > + * contributors may be used to endorse or promote products derived > > + * from this software without specific prior written permission. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > + */ > > + > > +#ifndef _RTE_PAUSE_ARM64_H_ > > +#define _RTE_PAUSE_ARM64_H_ > > + > > +#ifdef __cplusplus > > +extern "C" { > > +#endif > > + > > +#include > > +#include "generic/rte_pause.h" > > + > > +static inline void rte_pause(void) > > +{ > > + /* YIELD hints the CPU to switch to another thread if possible > > + * and executes as a NOP otherwise. > > I think you can remove the second line if you are trying to explain > what YIELD instruction is. > And I wonder if it can save power as rte_thread is bounded to certain > core and always polling while YIELD is only a hint instruction. AFAIK, It is HW thread not software OS thread.ie Simultaneous Multi-Threading (SMT) or Hyper threading. For example, Cavium 99xx has 4 HW threads per physical core. I agree on comment. I think, I can remove the comment as YIELD is just a hint and varies based on arm64 implementation. Will fix it v2. > > > + */ > > + asm volatile("yield" ::: "memory"); > > +} > > + > > +#ifdef __cplusplus > > +} > > +#endif > > + > > +#endif /* _RTE_PAUSE_ARM64_H_ */ > > -- > > 2.12.2 > >