From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 88611203B99A8 for ; Sun, 8 Jul 2018 20:04:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2018 20:04:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,328,1526367600"; d="scan'208";a="56086603" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 08 Jul 2018 20:04:19 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Jul 2018 20:04:19 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Jul 2018 20:04:19 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.57]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.100]) with mapi id 14.03.0319.002; Mon, 9 Jul 2018 11:04:15 +0800 From: "Dong, Eric" To: Laszlo Ersek , Fan Jeff , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" Thread-Topic: =?utf-8?B?W2VkazJdIOetlOWkjTogW1BhdGNoXSBVZWZpQ3B1UGtnL01wSW5pdExpYjog?= =?utf-8?Q?Optimize_get_processor_number_performance.?= Thread-Index: AQHUE3rmDFOShawv6UKSeDwsvBHbsKSAFEKAgAYl3lA= Date: Mon, 9 Jul 2018 03:04:14 +0000 Message-ID: References: <20180704083736.9272-1-eric.dong@intel.com> <58bddde7-da02-1a73-f738-70c58c10b60a@redhat.com> In-Reply-To: <58bddde7-da02-1a73-f738-70c58c10b60a@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: =?UTF-8?B?UmU6IOetlOWkjTogW1BhdGNoXSBVZWZpQ3B1UGtnL01wSW5pdExpYjogT3B0aW1pemUgZ2V0IHByb2Nlc3NvciBudW1iZXIgcGVyZm9ybWFuY2Uu?= X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 03:04:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgTGFzemxvLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IExhc3ps byBFcnNlayBbbWFpbHRvOmxlcnNla0ByZWRoYXQuY29tXQ0KPiBTZW50OiBUaHVyc2RheSwgSnVs eSA1LCAyMDE4IDk6MDQgUE0NCj4gVG86IEZhbiBKZWZmIDx2YW5qZWZmXzkxOUBob3RtYWlsLmNv bT47IERvbmcsIEVyaWMgPGVyaWMuZG9uZ0BpbnRlbC5jb20+Ow0KPiBlZGsyLWRldmVsQGxpc3Rz LjAxLm9yZw0KPiBDYzogTmksIFJ1aXl1IDxydWl5dS5uaUBpbnRlbC5jb20+DQo+IFN1YmplY3Q6 IFJlOiBbZWRrMl0g562U5aSNOiBbUGF0Y2hdIFVlZmlDcHVQa2cvTXBJbml0TGliOiBPcHRpbWl6 ZSBnZXQNCj4gcHJvY2Vzc29yIG51bWJlciBwZXJmb3JtYW5jZS4NCj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