From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0074.outbound.protection.outlook.com [104.47.37.74]) by dpdk.org (Postfix) with ESMTP id C4385DE3 for ; Mon, 8 Oct 2018 08:27:43 +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=pebssJIzOrXQHE8Kr2Pz96A5uXf+F8q2W5L5H1gms4o=; b=dbFgZhwtG/VqjYlsNXajcp4Gsfv7OdAUqHO6TWeBMAM2UC4KRbKzrJvJsd8X9Z6KRfk6sKYVWSWgV30TOhsCYIGK1Be5pd3a4gO6JMxx1EWTUjqmSpZPPbFcbCfEcXVCQS1i+lzIE7kr366AxnqkbWJgKP40skprlaQajB2NsLQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.167.112.78) by DM6PR07MB5004.namprd07.prod.outlook.com (2603:10b6:5:25::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.27; Mon, 8 Oct 2018 06:27:39 +0000 Date: Mon, 8 Oct 2018 11:57:29 +0530 From: Jerin Jacob To: Ola Liljedahl Cc: Jan Viktorin , "Gavin Hu (Arm Technology China)" , "dev@dpdk.org" , "thomas@monjalon.net" Message-ID: <20181008062728.GA12197@jerin> References: <20181007063127.27960-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [122.167.112.78] X-ClientProxiedBy: SG2PR06CA0145.apcprd06.prod.outlook.com (2603:1096:1:1f::23) To DM6PR07MB5004.namprd07.prod.outlook.com (2603:10b6:5:25::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6286c82d-b21f-41b3-6990-08d62ce726d8 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB5004; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 3:vXfHhtvU8r29cMRkDeSEkaPmk40TdH8f6oUeOj1Rh5JH13fvXjhmZFCoAxLtSaiwr9RlibBg9iuslP8FCPRKCL2LIdAerGeMyz5sfkZCRgRNF4klkWuqDJykq/wpfQUd71vBUhrV0J6SYf5cD7Tto3GVxCVwNHVLfOxBX4TZ/XvPsyY2FSSGdGUEEgIvkkZCzhhSXqlYYBm1iKiRjpYZFWlfvnKV5ZYrdxEsN3Bm80C5luXyqQ3bAweoSwx6pown; 25:fJezI/JggCzbKSCuZIaVDsj8OEWId0TdTmDPGzwlIgb65+Q/WhIx4mshb/df6VbVIB/4IaaVbpnfpLDl75ibS0aHs31VVrb9o5adh8QVG/EE83QduY2ICJRsjzIG8X3hAqDjFui6w7Grgm3W0pmf0M5q/Rtn2HmKZ8mjW9Kc0mFqaK5jXlkAQMcthy3iea810b8kFVNx0grJruF199dfTV97YmyR8Y3xHgRdNg/tlhworyPZ0GYN/K6X5BxGnHIAgsnsVWbUk1zgCMvODwvKRafc6YHNRUAyXVTNEG21gcleQ6awNwoH8qBHxCzeeUUZslcCZpJYhQyJNz2Tr7qsow==; 31:8MJWFlLKLrgMYs2z/OtgeQBh5CJds90y5mwapPLr6eikpoXpDjsQ4FqRu+f91R0LI/Mxwil++ID7kfEFfx7OgqMpXwDbGULJQ/3Ar2W19qE+g7iUXyfCHqgPHB5ylaYp7KUV2TxMMgYcFkzokdSdAA3z1whjCEQj/BA6A48nt1b6jl/F+OfkbgiGl8T0aIbGSdnExRBGThPW2j9dWpVBxv1TjYAu9bBU/FfNPDiyJMU= X-MS-TrafficTypeDiagnostic: DM6PR07MB5004: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 20:pL1PvlRGoD9aUxArs6B2/17qC60vsjvSsHUIaXnSyEuembrOm48tMFDkLWjfdGn/hRaPUTu/zeiH35EadvXJYb3ldk+g8cabe8oCTF5Nj96aGlQHTPpU3/CjWO4+w9klRQ/+mlMkRAcIhkjJFv+5eveMlMIPZVw9y/AXFKFQ+afk012dHk4xRSZvlGHkuGKMl4RUIaO+P4JcguxiQZrD7XOhieI6yhlUgKbAvgNg3Q3TPQ+OnXu1rUBTgnsZuPQIOL8rAVyr5pylgeJDOotoQt51Xhep3hQzTdRIMiu5AoEY8xkcIZ5MKosa6oNyhrGk8tSdk9YONQMjvRzdrki/i/w/8vmKpsN8zE6ypoHkfgdPPPkRYJCsK0qEiQzSzb941w4Sna/CEd9drSsTW4pyFuoh0XLDctvCa78BW+anT8ox1RQIhgGI59GmaHI5tXRa7C3tVbwiIOEajwWDyz2MwelE9ji5HM77Sv/qf82FPXm1I9W601GoKIcQzWYHBJ88MxOnMuw56aryftciqGmLQmZdb7vBgwXFKTKOC1gyz/0udXnxNiJdVzlAmia7ZW25wmk/wscn0b+Xyin0cnSBSc+yeBUPyoQ2J5CkPqapHcI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(183786458502308)(22074186197030); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(3231355)(944501410)(4982022)(52105095)(10201501046)(3002001)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699051)(76991055); SRVR:DM6PR07MB5004; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB5004; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 4:4OIvYa1s3z8IrdJKwLXagcsM3HgdmBmZfbkpNiQrgwDX7//ef7jadNZP+e6pWLBmzKNiLgxRnANIEGObhAIA28fbWCNCAN0x1uBhZi/zHGQJwUfBHZRqDzcrQnSRNx4S9VYkGaulpZwBSVpQHt4CkbkkXgZqc9ktNtrvh9UClph2ZA7vvKW78R8Z69Xs1JwrbxU8yPkhK+XOsDav9up/KaqBErzwdERs7afOZDWTpexX5k35Udo+A/Y6ZgmmZVPf2mqj63kP0qo1cq+c3GpCPkLT9Sn0UanHPbpyNuQOWxWBV4l9fLq7Lifj+aKQ2+6Zg8gRqVG65A594OANFNA11dRXVp0fMcoiV/8q0NN1JFTCmX0gkyhm9kvb448qi1a0 X-Forefront-PRVS: 081904387B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(39860400002)(376002)(346002)(189003)(199004)(13464003)(40434004)(52116002)(76176011)(6246003)(386003)(52146003)(2486003)(23676004)(6496006)(45080400002)(4326008)(2870700001)(25786009)(33896004)(5024004)(478600001)(19627235002)(316002)(33716001)(486006)(14444005)(58126008)(44832011)(3846002)(446003)(6116002)(1076002)(54906003)(966005)(72206003)(956004)(11346002)(476003)(55016002)(97736004)(53936002)(186003)(7736002)(8676002)(16526019)(575784001)(305945005)(26005)(2906002)(68736007)(42882007)(229853002)(8936002)(47776003)(33656002)(50466002)(81156014)(81166006)(66066001)(6666003)(6306002)(6916009)(9686003)(5660300001)(105586002)(106356001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB5004; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTZQUjA3TUI1MDA0OzIzOmRycHZnWW5aT3h6ZnRRdW42WVZ2SjdrZUtZ?= =?utf-8?B?NWFlQjIzY2Q2dFJSbkJMaWR0UTluUnRTekV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Wi7WS+q7BAcBh4E4WEyTrnr7/8FR1sPdBF8jATkzJxAoLiNMWlHYOgYnWOTXoRV4vO3or9whWvtrxf2os9/SQ255BH0V1zj4cAwwg9IDduBoaQSsASt9hiKJnDgCc8PKzgbH9k1Q==; 5:wErg9NLQHvc2t7Qo87hkjX1+SiNpzzH+5nQagfXzx67LwP51IuckVxyWop/IuDUS+ZDcsMiRqYP2eNTf7r5n8srQO2hGryz6UxH45/DsdJrpcYaeUMGyFHU3QqN36cW/Ou6bMd6PP9MRgv/knMRwa4TmUr1TKiQsjitjOXhTWMM=; 7:BQQz4HhRe6vTq7Dw3AprCljz1/6fkRdfDwWnxCh3gnIdSJUparbdc5zxaKph1JUre0aaodzI1VZJs9v6SCrLm9fzu0LhVHwzttcUxX4dV+kLb5KKZ7WyN7npV3MVm0o5C38APMNKwIoi76vyaTHghoWE+z+sMkwpdtkD9l3R+fRLmcEumCISMXNGreIW016+z22VRqUT3HDmsakm5A2tZse9Zq+V42ZR0OutthGKalfmLrHPQt2EqKZCupZV5ab9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2018 06:27:39.8082 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6286c82d-b21f-41b3-6990-08d62ce726d8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5004 Subject: Re: [dpdk-dev] [PATCH] eal/armv7: add support for rte pause 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: Mon, 08 Oct 2018 06:27:44 -0000 -----Original Message----- > Date: Sun, 7 Oct 2018 21:09:25 +0000 > From: Ola Liljedahl > To: Jerin Jacob , Jan Viktorin > , "Gavin Hu (Arm Technology China)" > > CC: "dev@dpdk.org" , "thomas@monjalon.net" > > Subject: Re: [dpdk-dev] [PATCH] eal/armv7: add support for rte pause > user-agent: Microsoft-MacOutlook/10.11.0.180909 > > External Email > > On 07/10/2018, 08:32, "Jerin Jacob" wrote: > > Add support for rte_pause() implementation for armv7. > > Signed-off-by: Jerin Jacob > --- > > The reference implementation for Linux's cpu_relax() for armv7 is at > https://elixir.bootlin.com/linux/latest/source/arch/arm/include/asm/processor.h#L100 > > --- > lib/librte_eal/common/include/arch/arm/rte_pause_32.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/arch/arm/rte_pause_32.h b/lib/librte_eal/common/include/arch/arm/rte_pause_32.h > index d4768c7a9..9b856e0cf 100644 > --- a/lib/librte_eal/common/include/arch/arm/rte_pause_32.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_pause_32.h > @@ -9,11 +9,13 @@ > extern "C" { > #endif > > -#include > +#include > + > #include "generic/rte_pause.h" > > static inline void rte_pause(void) > { > +rte_compiler_barrier(); > The compiler barrier is not mandated by the DPDK documentation for rte_pause(): > http://doc.dpdk.org/api/rte__pause_8h.html We can add that explicitly if required to inline with other arch. Just like Linux kernel's cpu_relax() > > You have to go all the way to the source and GCC documentation to discover that for GCC, rte_pause calls _mm_pause() which in turn is implemented using __builtin_ia32_pause(). > https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/X86-Built-in-Functions.html > void __builtin_ia32_pause (void) > Generates the pause machine instruction with a compiler memory barrier. Yes. IMO, it makes sense to have compiler memory barrier to make sure it waits semantically at least WRT current rte_pause() usage. > > If you are using C11 atomic operations e.g. for polling a location, the atomic operations will be able to provide the required semantics (e.g. don't merge atomic loads from different iterations of a loop, optionally provide acquire and/or release (or stronger) ordering. A compiler barrier here interferes with the (possibly weaker) barriers from the atomic operations. We could use a C11-version of rte_pause() that doesn't have the compiler barrier. But actually, we want support for WFE, x86 also has something similar now, MONITOR/MWAIT If it is WFE then who will wake up from the power saving state. SEV from the other thread? What would be a C11 version of rte_pause()? > > -- Ola > > > } > > #ifdef __cplusplus > -- > 2.19.0 > > > > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.