From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CCD93423A1; Tue, 10 Jan 2023 10:17:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B26EF40691; Tue, 10 Jan 2023 10:17:01 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 827C140689 for ; Tue, 10 Jan 2023 10:16:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673342219; x=1704878219; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=Z6mbItIipUDkNh1MstnPUjqxCs6vZYFARrU7q/AF/uQ=; b=Fg2MDJhPVmf671JUvdh7f+jO4CWX5rQwEOdsIajgi/ZDklfyXJl9igqE 84YZeoSNYzby+nERopOIh+COjTxLT+FX623qpy8eiuYK/K5H0hFownig2 mMJeyTK+EB7aDxOcnVHNbF6sVf4lEcoAzYNpmgUHlbf1TJtqFLZPxRbTU 5XczIb+MjdTUe84s26kZtMzK4MRxgeSbBu6rPaCzssitBtW92ATVOdAI3 ZPMT4S0OG5kBSXDz+nI2OTkqzuLLXJb4BNr1KLlRhtvUL0qg6x+e8vQ9f OE1NfhSQQ5dHU2ttfocHKgwgi7tR5HHe1KfaMVGc6xuB40DjprbIvjYVV g==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="385403063" X-IronPort-AV: E=Sophos;i="5.96,314,1665471600"; d="scan'208";a="385403063" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 01:16:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="656982787" X-IronPort-AV: E=Sophos;i="5.96,314,1665471600"; d="scan'208";a="656982787" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 10 Jan 2023 01:16:58 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 10 Jan 2023 01:16:57 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 10 Jan 2023 01:16:57 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 10 Jan 2023 01:16:57 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Tue, 10 Jan 2023 01:16:56 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UJABoU3THm9AqAehSWCHy60XIWaDqQruPiY08LDbbHNXyWnWOOEDefVpLHYHgm8loP03IUvB3r9rVkqssKN6ByyKNN6LUBcykf2uUWNSZ1YyZG9TgRU7/QCsdvO2C0amgGk974a9nUzYYH3kg+HoP7adLVEAlg30mzJd5t8xGXsCWyeZ6xJgkInmZ+OxCoawbncJoNtGVAVY5xRMJ1q3jHRVwXNV5W2ois6d5G9HFtyBylJj26771l5ZcMBZ1/6J9GuxsdurpupA7zwjmfBghaalbEuqoduX4dmtFMDcS9S9xdJVabdI8kEClin6/5qmxvVuLK2Uh0JLE7FP2JfhTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4ION2C23cYX40amJkY4ckXdJmBSwTEvFj9NEq4DFaOE=; b=j5h5rvrZMTO7aDjzCJ7GulcTQvGWuyRr5k6leBxOCBRUj8Ya7ucqwwC7pWI1R4GmEwjHpSNFyAz6n7ilYu4RDTr38Kq16ub5aMNZTAD7mr2GOlGHH7lNznwfuY7sMw36HM81T/D1zAXTvs0Iz34ksX/ZSVtw2DYsrhCiAGwcEaoY78Tud7WeBwKKaiymTpgdpR+Tpz2tpMrWRnGAIAQqVHcTEN+9gx7Zx2PtJffVNDkjKnqyjonT6RtSSjxcqlWmJtMJ8rpx61+e3jmYcqYUBQMPBNUi3yuohLZvwoz600FRr99p3N9WyAXXTiKf9sG4OYv1Pi+B035ePclc5Q2bfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by MW4PR11MB6691.namprd11.prod.outlook.com (2603:10b6:303:20f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Tue, 10 Jan 2023 09:16:54 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee%8]) with mapi id 15.20.5986.018; Tue, 10 Jan 2023 09:16:54 +0000 Date: Tue, 10 Jan 2023 09:16:48 +0000 From: Bruce Richardson To: Tyler Retzlaff CC: Subject: Re: RFC abstracting atomics Message-ID: References: <20230109225604.GA25566@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230109225604.GA25566@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-ClientProxiedBy: LO2P265CA0111.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::27) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|MW4PR11MB6691:EE_ X-MS-Office365-Filtering-Correlation-Id: 25784c58-8f37-4982-8c60-08daf2eb6a8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vErMjJVxmlAfD9ZUf6HP+A3kA4c9WVN6W/3MQRkvRGUPijkoA/ri2LWDm9UsWrLQLHe3GrOGDpb7aOz+TjMI+Fk50JLa6qJFMJT5kN1MFTFOmAiUzjK5GMMMmTJm2EK8aWErKaRWZshMxYzWTDM+CPOZ5i/byNnlNfUF8UtEKweUuWXn5vdAZnY+fVv6XAfn2jZMDShtdv0pCSLvHwzvaMW6mF08foz1AxrFN0jRIz1lfVE7JhftQUTSxVOBgfPPEVIOMyiD1gtwOy1dyW4wAGg0auIPeswyEji/E7+OPex/T7tjZB7Q7w1sPFF1fUrkEggaFu4ejuyp34d8mAhCkX6A0YnWGfayDcuohcTrGTPpypqL22haC1b+wGo3dwTchsK295SKLvTXd/6IdYGw810jpsQTsjizQF1sFlQ71JbCvF2Glmsaj7KQjklowwyt+Tw3mWuWBEn6QojGA8Mt1AnGVtB6DBH9XIBkYRRZyKeo1isGvvXAmFZj2d/7FIDX4lHakQkRwDlHKExoYCldwImFSkcfd/IKvnNUuLwo3vgN58baCf4va4YKNPFk7XZky5PFsVcsjdHm1iioUHPwzfDxR7FQqgTHtS4tAU5iSzMA+PKxEouM/Jy36fwsFGQLH+vQqmbfh1LOp7MAuS22tg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(376002)(346002)(396003)(39860400002)(136003)(451199015)(3480700007)(44832011)(2906002)(66899015)(66476007)(66556008)(5660300002)(66946007)(6666004)(8936002)(26005)(186003)(6506007)(6512007)(6916009)(478600001)(82960400001)(38100700002)(7116003)(6486002)(8676002)(41300700001)(86362001)(4326008)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hZ9zhW6A51oMYpwvqGL9Ok7ApnRtTFAKbIotqgx9yXSWWj+9yQGt6LKtm8vr?= =?us-ascii?Q?ixhBcapi9UANXVJA6knt40cz1+N3yiCuV078DyT+q/nWh80y4ITb75iFJWof?= =?us-ascii?Q?4VyY26zkc1GKkWxk2c5g1Unl8sOrExHUHiuBEBs40djkr/Q4BicJm7IBI5V7?= =?us-ascii?Q?FEG1wFjjBTJzflqmUfedaRNwc2fwWj5hkwkaZqjcna6DpGCjyniOFIHAQvvE?= =?us-ascii?Q?2kIEQA4VGdBDa/3FclLtxV8QVjJKJTTSJLjoyMxYcGVaMnb2bYJPNyW0hCTU?= =?us-ascii?Q?QUZsx0GhBAQGKAZ/Vyp2/vnQpoYBFS710Ywy11cq+u3KJgdqhrDjewfrLpwZ?= =?us-ascii?Q?jTAS4pBTolVlFi8zz+iSjhClk0Q0ctMF5NUvEFomBc2Tf1wHf956Wf71liSI?= =?us-ascii?Q?B1YTxpwefCNHg9vR1V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?= =?us-ascii?Q?1c01h6z3BMQ3BclL3oR2l/jFx+1uUHVGKI2PRmEdA3Kqd7oDoSUXGKhf1QdQ?= =?us-ascii?Q?6i7rUGaLXHo8FvfhJoDUcYEvcskrBnBiR2K4EgCxE8iptPeeITyvdxoObf/Z?= =?us-ascii?Q?fj95H+rbCVnfOYWr+eodZaqbCTZ6wtSLrzdC5RqRUcE/v+JmvRWOYhjBlTeU?= =?us-ascii?Q?G8NF/kfju/RrNCVuipsXGPPCqeDMbx5ma6K2LY+cdyzREULw0q2YoJnl8nUv?= =?us-ascii?Q?UGjy5pqWJVTmi3jMLidXhiGtF+FP6I/dsUft+UbFhG70jcGJLVaLthKu0GYC?= =?us-ascii?Q?6w=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 25784c58-8f37-4982-8c60-08daf2eb6a8e X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2023 09:16:54.7028 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tnaBPXVJN/yC0xZuURKWwycNJ+4b7ePw/tWsu8biCGSLdcBLZ98T6QajuWco/Xn8NMKnek0qp8IEao7Tcv5XDYcxRltx9qMBDc1C+3zgRYA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6691 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jan 09, 2023 at 02:56:04PM -0800, Tyler Retzlaff wrote: > hi folks, > > i would like to introduce a layer of abstraction that would allow > optional use of standard C11 atomics when the platform / toolchain > combination has them available. > > making the option usable would be a phased approach intended to focus > review and minimize dealing with churn on such a broad change. > > 1. provide an initial series to add the abstraction and the ability > control enablement with a meson option enable_stdatomics=false will > be the default. > > for all existing platform / toolchain combinations the default would > remain false. i.e. i have no plans to enable it for existing platforms > toolchain combinations but leaves a change of default open to the > community as a future discussion if it is desired. > > 2. once the initial abstraction is integrated a series will be introduced to > port the tree to the abstraction with enable_stdatomics=false. the goal > being low or no change to the current use of gcc builtin C++11 memory > model atomics. > > 3. once the tree is ported a final series will be introduced to introduce > the remaining change to allow the use of enable_stdatomics=true. > > would appreciate any assistance / suggestions you can provide to > introduce the abstraction smoothly. > Plan generally sounds ok. However, beyond point #3, would there then be plans to remove the option and always use stdatomics in future? To slightly expand the scope of the discussion - would it be worthwhile putting these abstractions in a new library in DPDK other than EAL, to start the process of splitting out some of the lower-level material from that library? /Bruce