From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.2750.1614425387887518053 for ; Sat, 27 Feb 2021 03:29:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=l+5IYa5J; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ray.ni@intel.com) IronPort-SDR: yjiAe6JAWNRh3LHCg8ZbKmK7vjadK0X1pIwKX3ibIyrQF47c2P18n9qMiPUO4QqsPiQ+7TrCoZ SVxMP0/v/KFA== X-IronPort-AV: E=McAfee;i="6000,8403,9907"; a="165962685" X-IronPort-AV: E=Sophos;i="5.81,211,1610438400"; d="scan'208";a="165962685" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2021 03:29:47 -0800 IronPort-SDR: yXzjIdNWlIpt69FmKMYs+JKOj56f3hTjIlUFECFzmT+ZJuhCEyYNDbm01Q2Ve1liXoco2r0yOI wnOsjlNW1M1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,211,1610438400"; d="scan'208";a="366142385" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 27 Feb 2021 03:29:46 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 27 Feb 2021 03:29:46 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Sat, 27 Feb 2021 03:29:46 -0800 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.54) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Sat, 27 Feb 2021 03:29:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AZ03j+iJxKeNy0JMzpk2GcX1HrtI6eTB82ZlXQVOVZHRij9oRsYnRhr00jNnUuF6cJ28aU1O4BPbS8+n2GgPVGF+Pg/LMu+eoSrXarueqGW9Zs56DwMfyBvjCCIGrhNZvPuSuAchuNoXLW0SJkKVm+g+n6QBHqldSRb5czq+GaReNvS8cUHHpfI1AKl2sHR7Fy3VRvtKUxeozHXpGhVRybBF9HIqxXPEvOCQUpQb/tnafy8rC49TMTeKjZsar2oFQ6nI+43kfvO634ft8CRQ5BqmVGqK4m+RH5uWxe0mVR+j1dJurxgi9v4xZPC9lvADDC4mTLNLB92+EOLyS2gPuQ== 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-SenderADCheck; bh=Jj2yZ+R8maPrDiFJDeB5+mV3OczlG/PiFUv6HK5+YaU=; b=ionAGqv9GRX1Xpw5GzjhaHVyppRVQjUHUaaGkr46JWXcd1jyM1iTX30lWHnxlWJXUWnE2Z6C2GxHWX3JO7NGTVRfNFAMdHnJu1Ii9hPWG733Shw+dWtnk9XUJoEhytLsvz0g/IocTK9VpZipnRUVe6oIaERu7cq6DpcH4pfbaHw9datxqtoJe7E7Ef4dDLMxtSm8FGiCW3I8UGM+5J9ez4f0e+eTs1pf5PXCyHWHr+w/2xxqXH1qEwMWlWBnklbREJ6D+A8ijdfoIBG/A9zxEPjJ1RkLY4/mQonkDUZ4fhiapJdp3krkZEBN9LuamppKVzttO10WZSozQIbFoUCw/g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jj2yZ+R8maPrDiFJDeB5+mV3OczlG/PiFUv6HK5+YaU=; b=l+5IYa5JAXMs2+t2W4TAKE3yGpI1F/JpTbd8AKuupO+d8y5Gkhmy83v4j3ij24hriSrHGo9ApZ+n1jQ02IdquWcgt2DWx9QA/n5cvi/q8sJMFjuGGrVmNtFHbA980JuZS37aFX/2iwXZzCpbqiiGR3Q2Y06RFGrl0fSsiT54mxk= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by CO1PR11MB5139.namprd11.prod.outlook.com (2603:10b6:303:95::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Sat, 27 Feb 2021 11:29:45 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::8d64:91ed:c259:e95]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::8d64:91ed:c259:e95%7]) with mapi id 15.20.3890.026; Sat, 27 Feb 2021 11:29:44 +0000 From: "Ni, Ray" To: "gaoliming@byosoft.com.cn" CC: "devel@edk2.groups.io" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH v3 0/4] Use XADD to avoid lock acquire/release Thread-Topic: [edk2-devel] [PATCH v3 0/4] Use XADD to avoid lock acquire/release Thread-Index: AQHW/u4/vaaYxYcgyUCc3aD507MPr6pr+Z4Q Date: Sat, 27 Feb 2021 11:29:44 +0000 Message-ID: References: <166219FED0821D4E.31350@groups.io> In-Reply-To: <166219FED0821D4E.31350@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: byosoft.com.cn; dkim=none (message not signed) header.d=none;byosoft.com.cn; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: de0d3947-f77c-45fe-249a-08d8db12fb91 x-ms-traffictypediagnostic: CO1PR11MB5139: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AEQWpSFGVjW0BpT0H3jgQVp3Slgx3imIcBcfvVdIb1AXKokU04rtOs41BhPeb44yJQomaKeCX33V19VGbIff8BNnbD+0/nyhKEoxGQOvtossvQGQGUlHPQfdZUZsBKEUU86kZyDaFIuHPkfzWkxAcUNsFt8zilEvSCFUQ4SHRQmskBsXyvRq6RZzIKljwVvHtWp7zo93Er29zdTahHLs/9lg5Jh6F0Xi1fdkA0dAfX2U2zUnMkmAlLu9/ydVKaVk5awpn/K3lhWg1ia4nXBY0TJUf1ftY9GsfhKoeXYbn8Sk++dpZA2wjOVUR9XBzyDwmraO9f1m0HNjzHK5YTz9xUME+6Njj0HnRVVROBJZ1AEL1+HNkftGgamQlHHZyQuansjZ2t/+fbBmvghVPlhML0bZGfvGD7i80tXHmRcvnvRa7AyDuzyccfimY5/6ED2+F0nGqe1fc8PPrRODLaRKUJKhHMt/dUylDdaBLMi+gUeA2Le58vYAlG8yGp0YCRQDfzEXJs351yEnLyHED0MO09KaUk4PCWwZe+T2IVaigQqO5hn+4pODq3HhHTAnXEz9yusOtWSDdKRe9tWga2pbWArMdL1+oW12cgR/fyT+HoI= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(366004)(346002)(396003)(136003)(39860400002)(9686003)(55016002)(54906003)(8936002)(19627235002)(8676002)(107886003)(76116006)(7696005)(478600001)(71200400001)(86362001)(316002)(6916009)(966005)(4326008)(2906002)(66556008)(83380400001)(66446008)(53546011)(5660300002)(64756008)(26005)(6506007)(186003)(33656002)(66946007)(52536014)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?YJXDnWhmRFCFULlnkjP81FGEMs8sPzEAc/BEK3SM8oWIU6Q/NhKLjhucdpol?= =?us-ascii?Q?cAq0adOIPyxapDDV+KZ3rsOxphuwauS9b45Hm9FZhgufnXIPNqTEm4RSNvRr?= =?us-ascii?Q?4D0xfm/XCqWMbT1QmaUEJ+bgbuhbYi/8xskvpK9QhoX4mOA/SYA2bTDPp26r?= =?us-ascii?Q?qs5cegZGaQylXrMZaLrnDXeeBoH/Khc1mQ17RtoktEPScatfyJubQK3p9JZg?= =?us-ascii?Q?RidXTh2yvxPiGxvGxIMvQc7G5gro22pJFwi7WmPTTHBvmi6k5LjsCS8pWpHW?= =?us-ascii?Q?mVviJnv2lp9jU4BJfyANgO2lPyD04S+xFBFSMj952ybR25GjBemJQTSMTqRN?= =?us-ascii?Q?Ej8NgM5OeE/vUKSoA5cedvUUbaFVzS+z8xgoKSQfWmKK7eYmXNVxLkNW198h?= =?us-ascii?Q?puNnpnS7BxK/9qFcZgGUImrEYF4prW9FAYczVjPq6c8YGoLcMYSv1im6eQfb?= =?us-ascii?Q?m3pF1PktBpRS93V79UqPDc/PE360HKlLepTAkr6ICD7+ENqQ8VLphiqqs8p2?= =?us-ascii?Q?ES+fYFrCFWc4BiB358fVeRq0wehpOKyWuW28it3dKY889hhGDduZJe116reS?= =?us-ascii?Q?AKYn82fWUfI2VdCmyHmcu95YsBSEALoe833bpo2r7Gq6HIKWnZT+niz59IG3?= =?us-ascii?Q?jOGlydKh41d7zZCBafcC569B2JBFnzaem7ibaDVSto9jj0+rIrhtkaGXD6T7?= =?us-ascii?Q?CD03oh7XUNr0bkAeDtwjodHDJH8BBgzjr2gPEYJduKcGbzBBKRg8VoXoY1Bn?= =?us-ascii?Q?YbG8v7n2k2VH4U3jNSeTykqGz/ZQkle+VEjNOIQ3GAY5AojEty6QIY9FICpf?= =?us-ascii?Q?60JqNVWcwTqBXyietp0IC8g8PqueANyXbpWsIAvA3tzvFMm8Fy/dpgWyxLtS?= =?us-ascii?Q?vacxWC6SWY1m77pQc7MQ8eXrJ/eLZOCOqu+F6Runj1BfSaUVyQ3qx4KlLi+W?= =?us-ascii?Q?S/o7v1VhyiOKvApBlpRR5hTL618r4bm2PIxpPsTzUBmJbooBuPXByzb0L9L6?= =?us-ascii?Q?TUZ+GbLhEHFPi9l38rhrHqSPd7FKeagV0qoayle7PX/+71LoMiKfdLNHQY19?= =?us-ascii?Q?jc3qcfaVthMZiBXjPz34J74JGlOnR5IZjKLM4M5WtryO3AQjBF+prKvmJqET?= =?us-ascii?Q?7i/HbzoThIHAhhP9x6675J6LlW8zIxu1QLNDwK23zeF+NQFtdvtnIjRcfWlR?= =?us-ascii?Q?N5KVLma7bmY6L/nfdk/qSrL+D8SrJfFihzMVH+x48lN+jg+XDb2oqNi/ya+q?= =?us-ascii?Q?TzrMRzEF/ABoAqRcpGFI1XXg4bNkUNJdS8MuclE3j0jTaVOkb3TrgNcnX1pQ?= =?us-ascii?Q?qbLcoY4n895haFHVcM2ua9vw?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: de0d3947-f77c-45fe-249a-08d8db12fb91 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2021 11:29:44.7998 (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: QM5tF+gUk57dwdGRmFSyeh5lnIjITG19H2A1nCcgVz/bp9AGctBn2MN2FSEvlGuEcbTgTS7X4VI6WZ0HCehjAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5139 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Liming, I pushed the first patch as it's a bug fix. For the remaining 3 patches, I am ok to push them after the freeze time. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Tuesday, February 9, 2021 10:17 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH v3 0/4] Use XADD to avoid lock acquire/rele= ase >=20 > Patch #1 follows Mike's suggestion to use XADD to avoid lock acquire/rel= ease. > Patch #2 follows Laszlo's suggestion to add global NASM macros for NASM = struc usage. > Patch #3 simply remves all hardcode offset in NASM without changing any = logic. > Patch #4 removes the dead code. >=20 > The final code is the same as that of V2. >=20 > Ray Ni (4): > UefiCpuPkg/MpInitLib: Use XADD to avoid lock acquire/release > MdePkg/Nasm.inc: add macros for C types used in structure definition > UefiCpuPkg/MpInitLib: Use NASM struc to avoid hardcode offset > UefiCpuPkg/MpInitLib: Remove unused Lock from MP_CPU_EXCHANGE_INFO >=20 > MdePkg/Include/Ia32/Nasm.inc | 38 ++++++ > MdePkg/Include/X64/Nasm.inc | 38 ++++++ > UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 5 +- > UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc | 43 ------- > .../Library/MpInitLib/Ia32/MpFuncs.nasm | 98 +++++++--------- > UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 99 ++++++++++++++++ > UefiCpuPkg/Library/MpInitLib/MpLib.c | 1 - > UefiCpuPkg/Library/MpInitLib/MpLib.h | 3 +- > UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 5 +- > UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc | 45 -------- > UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 108 ++++++++---------- > 11 files changed, 272 insertions(+), 211 deletions(-) > delete mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc > create mode 100644 UefiCpuPkg/Library/MpInitLib/MpEqu.inc > delete mode 100644 UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc >=20 > -- > 2.27.0.windows.1 >=20 >=20 >=20 >=20 >=20