From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6606C1B39F for ; Thu, 21 Mar 2019 02:02:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 18:02:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,250,1549958400"; d="scan'208";a="127242089" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 20 Mar 2019 18:02:00 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 20 Mar 2019 18:02:00 -0700 Received: from fmsmsx115.amr.corp.intel.com ([169.254.4.62]) by fmsmsx156.amr.corp.intel.com ([169.254.13.6]) with mapi id 14.03.0415.000; Wed, 20 Mar 2019 18:02:00 -0700 From: "Carrillo, Erik G" To: "Sanford, Robert" CC: "thomas@monjalon.net" , "dev@dpdk.org" , "nhorman@tuxdriver.com" Thread-Topic: [PATCH v4 1/2] timer: allow timer management in shared memory Thread-Index: AQHU3yQ9aN4Jx/BLnUGtubMFuhQZvaYVRRfS Date: Thu, 21 Mar 2019 01:01:59 +0000 Message-ID: References: <1544739996-26011-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-2-git-send-email-erik.g.carrillo@intel.com>, <40792313-7864-470F-B188-9AA1A0F072B8@akamai.com> In-Reply-To: <40792313-7864-470F-B188-9AA1A0F072B8@akamai.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 1/2] timer: allow timer management in shared memory 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, 21 Mar 2019 01:02:03 -0000 SGkgUm9iZXJ0LA0KDQpUaGFua3MgZm9yIHRoZSByZXZpZXcgYW5kIHN1Z2dlc3Rpb25zLiAgSeKA mW0gb3V0IG9mIHRoZSBvZmZpY2Ugb24gYm9uZGluZyBsZWF2ZSBmb3IgdGhlIG5leHQgZmV3IHdl ZWtzLCBidXQgSeKAmWxsIHVwZGF0ZSB0aGUgcGF0Y2ggdG8gYWRkcmVzcyB5b3VyIHBvaW50cyBi ZWxvdyB3aGVuIEkgcmV0dXJuLg0KDQpUaGFua3MsDQpFcmlrDQoNCj4gT24gTWFyIDIwLCAyMDE5 LCBhdCA4OjUzIEFNLCBTYW5mb3JkLCBSb2JlcnQgPHJzYW5mb3JkQGFrYW1haS5jb20+IHdyb3Rl Og0KPiANCj4gSGkgRXJpaywNCj4gDQo+IEkgaGF2ZSBhIGZldyBxdWVzdGlvbnMgYW5kIGNvbW1l bnRzIG9uIHRoaXMgcGF0Y2ggc2VyaWVzLg0KPiANCj4gMS4gRG9uJ3QgeW91IHRoaW5rIHdlIG5l ZWQgbmV3IHRlc3RzIChpbiB0ZXN0L3Rlc3QvKSB0byB2ZXJpZnkgdGhlIHNlY29uZGFyeS1wcm9j ZXNzIEFQSXM/DQo+IDIuIEkgc3VnZ2VzdCB3ZSBkZWZpbmUgZGVmYXVsdF9kYXRhX2lkIGFzIGNv bnN0LCBhbmQgZXhwbGljaXRseSBzZXQgaXQgdG8gMC4NCj4gMy4gVGhlIG91dGVyIGZvci1sb29w IGluIHJ0ZV90aW1lcl9hbHRfbWFuYWdlKCkgdG91Y2hlcyBiZXlvbmQgdGhlIGVuZCBvZiBwb2xs X2xjb3Jlc1t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dXJfdGltZSkgew0KPiArICAgICAgICAg ICAgcnRlX3NwaW5sb2NrX3VubG9jaygmcHJpdnAtPmxpc3RfbG9jayk7DQo+ICsgICAgICAgICAg ICBjb250aW51ZTsNCj4gKyAgICAgICAgfQ0KPiArDQo+ICsgICAgICAgIC8qIHNhdmUgc3RhcnQg b2YgbGlzdCBvZiBleHBpcmVkIHRpbWVycyAqLw0KPiArICAgICAgICB0aW0gPSBwcml2cC0+cGVu ZGluZ19oZWFkLnNsX25leHRbMF07DQo+ICsNCj4gKyAgICAgICAgLyogYnJlYWsgdGhlIGV4aXN0 aW5nIGxpc3QgYXQgY3VycmVudCB0aW1lIHBvaW50ICovDQo+ICsgICAgICAgIHRpbWVyX2dldF9w cmV2X2VudHJpZXMoY3VyX3RpbWUsIHBvbGxfbGNvcmUsIHByZXYsDQo+ICsgICAgICAgICAgICAg ICAgICAgICAgIGRhdGEtPnByaXZfdGltZXIpOw0KPiArICAgICAgICBmb3IgKGogPSBwcml2cC0+ Y3Vycl9za2lwbGlzdF9kZXB0aCAtIDE7IGogPj0gMDsgai0tKSB7DQo+ICsgICAgICAgICAgICBp ZiAocHJldltqXSA9PSAmcHJpdnAtPnBlbmRpbmdfaGVhZCkNCj4gKyAgICAgICAgICAgICAgICBj b250aW51ZTsNCj4gKyAgICAgICAgICAgIHByaXZwLT5wZW5kaW5nX2hlYWQuc2xfbmV4dFtqXSA9 DQo+ICsgICAgICAgICAgICAgICAgcHJldltqXS0+c2xfbmV4dFtqXTsNCj4gKyAgICAgICAgICAg IGlmIChwcmV2W2pdLT5zbF9uZXh0W2pdID09IE5VTEwpDQo+ICsgICAgICAgICAgICAgICAgcHJp dnAtPmN1cnJfc2tpcGxpc3RfZGVwdGgtLTsNCj4gKw0KPiArICAgICAgICAgICAgcHJldltqXS0+ c2xfbmV4dFtqXSA9IE5VTEw7DQo+ICsgICAgICAgIH0NCj4gKw0KPiArICAgICAgICAvKiB0cmFu c2l0aW9uIHJ1bi1saXN0IGZyb20gUEVORElORyB0byBSVU5OSU5HICovDQo+ICsgICAgICAgIHJ1 bl9maXJzdF90aW1zW25iX3J1bmxpc3RzXSA9IHRpbTsNCj4gKyAgICAgICAgcnVubGlzdF9sY29y ZV9pZHNbbmJfcnVubGlzdHNdID0gcG9sbF9sY29yZTsNCj4gKyAgICAgICAgcHByZXYgPSAmcnVu X2ZpcnN0X3RpbXNbbmJfcnVubGlzdHNdOw0KPiArICAgICAgICBuYl9ydW5saXN0cysrOw0KPiAr DQo+ICsgICAgICAgIGZvciAoIDsgdGltICE9IE5VTEw7IHRpbSA9IG5leHRfdGltKSB7DQo+ICsg ICAgICAgICAgICBuZXh0X3RpbSA9IHRpbS0+c2xfbmV4dFswXTsNCj4gKw0KPiArICAgICAgICAg ICAgcmV0ID0gdGltZXJfc2V0X3J1bm5pbmdfc3RhdGUodGltKTsNCj4gKyAgICAgICAgICAgIGlm IChsaWtlbHkocmV0ID09IDApKSB7DQo+ICsgICAgICAgICAgICAgICAgcHByZXYgPSAmdGltLT5z bF9uZXh0WzBdOw0KPiArICAgICAgICAgICAgfSBlbHNlIHsNCj4gKyAgICAgICAgICAgICAgICAv KiBhbm90aGVyIGNvcmUgaXMgdHJ5aW5nIHRvIHJlLWNvbmZpZyB0aGlzIG9uZSwNCj4gKyAgICAg ICAgICAgICAgICAgKiByZW1vdmUgaXQgZnJvbSBsb2NhbCBleHBpcmVkIGxpc3QNCj4gKyAgICAg ICAgICAgICAgICAgKi8NCj4gKyAgICAgICAgICAgICAgICAqcHByZXYgPSBuZXh0X3RpbTsNCj4g KyAgICAgICAgICAgIH0NCj4gKyAgICAgICAgfQ0KPiArDQo+ICsgICAgICAgIC8qIHVwZGF0ZSB0 aGUgbmV4dCB0byBleHBpcmUgdGltZXIgdmFsdWUgKi8NCj4gKyAgICAgICAgcHJpdnAtPnBlbmRp bmdfaGVhZC5leHBpcmUgPQ0KPiArICAgICAgICAgICAgKHByaXZwLT5wZW5kaW5nX2hlYWQuc2xf bmV4dFswXSA9PSBOVUxMKSA/IDAgOg0KPiArICAgICAgICAgICAgcHJpdnAtPnBlbmRpbmdfaGVh ZC5zbF9uZXh0WzBdLT5leHBpcmU7DQo+ICsNCj4gKyAgICAgICAgcnRlX3NwaW5sb2NrX3VubG9j aygmcHJpdnAtPmxpc3RfbG9jayk7DQo+ICsgICAgfQ0KPiArDQo+ICsgICAgLyogTm93IHByb2Nl c3MgdGhlIHJ1biBsaXN0cyAqLw0KPiArICAgIHdoaWxlICgxKSB7DQo+ICsgICAgICAgIGJvb2wg ZG9uZSA9IHRydWU7DQo+ICsgICAgICAgIHVpbnQ2NF90IG1pbl9leHBpcmUgPSBVSU5UNjRfTUFY Ow0KPiArICAgICAgICBpbnQgbWluX2lkeCA9IDA7DQo+ICsNCj4gKyAgICAgICAgLyogRmluZCB0 aGUgbmV4dCBvbGRlc3QgdGltZXIgdG8gcHJvY2VzcyAqLw0KPiArICAgICAgICBmb3IgKGkgPSAw OyBpIDwgbmJfcnVubGlzdHM7IGkrKykgew0KPiArICAgICAgICAgICAgdGltID0gcnVuX2ZpcnN0 X3RpbXNbaV07DQo+ICsNCj4gKyAgICAgICAgICAgIGlmICh0aW0gIT0gTlVMTCAmJiB0aW0tPmV4 cGlyZSA8IG1pbl9leHBpcmUpIHsNCj4gKyAgICAgICAgICAgICAgICBtaW5fZXhwaXJlID0gdGlt LT5leHBpcmU7DQo+ICsgICAgICAgICAgICAgICAgbWluX2lkeCA9IGk7DQo+ICsgICAgICAgICAg ICAgICAgZG9uZSA9IGZhbHNlOw0KPiArICAgICAgICAgICAgfQ0KPiArICAgICAgICB9DQo+ICsN Cj4gKyAgICAgICAgaWYgKGRvbmUpDQo+ICsgICAgICAgICAgICBicmVhazsNCj4gKw0KPiArICAg ICAgICB0aW0gPSBydW5fZmlyc3RfdGltc1ttaW5faWR4XTsNCj4gKyAgICAgICAgcHJpdnAgPSAm ZGF0YS0+cHJpdl90aW1lcltydW5saXN0X2xjb3JlX2lkc1ttaW5faWR4XV07DQo+ICsNCj4gKyAg ICAgICAgLyogTW92ZSBkb3duIHRoZSBydW5saXN0IGZyb20gd2hpY2ggd2UgcGlja2VkIGEgdGlt ZXIgdG8NCj4gKyAgICAgICAgICogZXhlY3V0ZQ0KPiArICAgICAgICAgKi8NCj4gKyAgICAgICAg cnVuX2ZpcnN0X3RpbXNbbWluX2lkeF0gPSBydW5fZmlyc3RfdGltc1ttaW5faWR4XS0+c2xfbmV4 dFswXTsNCj4gKw0KPiArICAgICAgICBwcml2cC0+dXBkYXRlZCA9IDA7DQo+ICsgICAgICAgIHBy aXZwLT5ydW5uaW5nX3RpbSA9IHRpbTsNCj4gKw0KPiArICAgICAgICAvKiBDYWxsIHRoZSBwcm92 aWRlZCBjYWxsYmFjayBmdW5jdGlvbiAqLw0KPiArICAgICAgICBmKHRpbSk7DQo+ICsNCj4gKyAg ICAgICAgX19USU1FUl9TVEFUX0FERChwcml2cCwgcGVuZGluZywgLTEpOw0KPiArDQo+ICsgICAg ICAgIC8qIHRoZSB0aW1lciB3YXMgc3RvcHBlZCBvciByZWxvYWRlZCBieSB0aGUgY2FsbGJhY2sN Cj4gKyAgICAgICAgICogZnVuY3Rpb24sIHdlIGhhdmUgbm90aGluZyB0byBkbyBoZXJlDQo+ICsg ICAgICAgICAqLw0KPiArICAgICAgICBpZiAocHJpdnAtPnVwZGF0ZWQgPT0gMSkNCj4gKyAgICAg ICAgICAgIGNvbnRpbnVlOw0KPiArDQo+ICsgICAgICAgIGlmICh0aW0tPnBlcmlvZCA9PSAwKSB7 DQo+ICsgICAgICAgICAgICAvKiByZW1vdmUgZnJvbSBkb25lIGxpc3QgYW5kIG1hcmsgdGltZXIg YXMgc3RvcHBlZCAqLw0KPiArICAgICAgICAgICAgc3RhdHVzLnN0YXRlID0gUlRFX1RJTUVSX1NU T1A7DQo+ICsgICAgICAgICAgICBzdGF0dXMub3duZXIgPSBSVEVfVElNRVJfTk9fT1dORVI7DQo+ ICsgICAgICAgICAgICBydGVfd21iKCk7DQo+ICsgICAgICAgICAgICB0aW0tPnN0YXR1cy51MzIg PSBzdGF0dXMudTMyOw0KPiArICAgICAgICB9IGVsc2Ugew0KPiArICAgICAgICAgICAgLyoga2Vl cCBpdCBpbiBsaXN0IGFuZCBtYXJrIHRpbWVyIGFzIHBlbmRpbmcgKi8NCj4gKyAgICAgICAgICAg IHJ0ZV9zcGlubG9ja19sb2NrKA0KPiArICAgICAgICAgICAgICAgICZkYXRhLT5wcml2X3RpbWVy W3RoaXNfbGNvcmVdLmxpc3RfbG9jayk7DQo+ICsgICAgICAgICAgICBzdGF0dXMuc3RhdGUgPSBS VEVfVElNRVJfUEVORElORzsNCj4gKyAgICAgICAgICAgIF9fVElNRVJfU1RBVF9BREQoZGF0YS0+ cHJpdl90aW1lciwgcGVuZGluZywgMSk7DQo+ICsgICAgICAgICAgICBzdGF0dXMub3duZXIgPSAo aW50MTZfdCl0aGlzX2xjb3JlOw0KPiArICAgICAgICAgICAgcnRlX3dtYigpOw0KPiArICAgICAg ICAgICAgdGltLT5zdGF0dXMudTMyID0gc3RhdHVzLnUzMjsNCj4gKyAgICAgICAgICAgIF9fcnRl X3RpbWVyX3Jlc2V0KHRpbSwgdGltLT5leHBpcmUgKyB0aW0tPnBlcmlvZCwNCj4gKyAgICAgICAg ICAgICAgICB0aW0tPnBlcmlvZCwgdGhpc19sY29yZSwgdGltLT5mLCB0aW0tPmFyZywgMSwNCj4g KyAgICAgICAgICAgICAgICBkYXRhKTsNCj4gKyAgICAgICAgICAgIHJ0ZV9zcGlubG9ja191bmxv Y2soDQo+ICsgICAgICAgICAgICAgICAgJmRhdGEtPnByaXZfdGltZXJbdGhpc19sY29yZV0ubGlz dF9sb2NrKTsNCj4gKyAgICAgICAgfQ0KPiArDQo+ICsgICAgICAgIHByaXZwLT5ydW5uaW5nX3Rp bSA9IE5VTEw7DQo+ICsgICAgfQ0KPiArDQo+ICsgICAgcmV0dXJuIDA7DQo+ICt9DQo+ICsNCj4g LyogZHVtcCBzdGF0aXN0aW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cnNpb24ubWFwDQo+IGluZGV4IDliMmU0YjguLmMyZTU4MzYgMTAwNjQ0DQo+IC0tLSBh L2xpYi9saWJydGVfdGltZXIvcnRlX3RpbWVyX3ZlcnNpb24ubWFwDQo+ICsrKyBiL2xpYi9saWJy dGVfdGltZXIvcnRlX3RpbWVyX3ZlcnNpb24ubWFwDQo+IEBAIC0xMywzICsxMywyNSBAQCBEUERL XzIuMCB7DQo+IA0KPiAgICBsb2NhbDogKjsNCj4gfTsNCj4gKw0KPiArRFBES18xOS4wNSB7DQo+ ICsgICAgZ2xvYmFsOg0KPiArDQo+ICsgICAgcnRlX3RpbWVyX2R1bXBfc3RhdHM7DQo+ICsgICAg cnRlX3RpbWVyX21hbmFnZTsNCj4gKyAgICBydGVfdGltZXJfcmVzZXQ7DQo+ICsgICAgcnRlX3Rp bWVyX3N0b3A7DQo+ICsgICAgcnRlX3RpbWVyX3N1YnN5c3RlbV9pbml0Ow0KPiArfSBEUERLXzIu MDsNCj4gKw0KPiArRVhQRVJJTUVOVEFMIHsNCj4gKyAgICBnbG9iYWw6DQo+ICsNCj4gKyAgICBy dGVfdGltZXJfYWx0X2R1bXBfc3RhdHM7DQo+ICsgICAgcnRlX3RpbWVyX2FsdF9tYW5hZ2U7DQo+ ICsgICAgcnRlX3RpbWVyX2FsdF9yZXNldDsNCj4gKyAgICBydGVfdGltZXJfYWx0X3N0b3A7DQo+ ICsgICAgcnRlX3RpbWVyX2RhdGFfYWxsb2M7DQo+ICsgICAgcnRlX3RpbWVyX2RhdGFfZGVhbGxv YzsNCj4gKyAgICBydGVfdGltZXJfc3Vic3lzdGVtX2ZpbmFsaXplOw0KPiArfTsNCj4gLS0gDQo+ IDIuNi40DQo+IA0KPiANCg== From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id DCB7BA00E6 for ; Thu, 21 Mar 2019 02:02:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1491E1B3A3; Thu, 21 Mar 2019 02:02:04 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6606C1B39F for ; Thu, 21 Mar 2019 02:02:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 18:02:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,250,1549958400"; d="scan'208";a="127242089" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 20 Mar 2019 18:02:00 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 20 Mar 2019 18:02:00 -0700 Received: from fmsmsx115.amr.corp.intel.com ([169.254.4.62]) by fmsmsx156.amr.corp.intel.com ([169.254.13.6]) with mapi id 14.03.0415.000; Wed, 20 Mar 2019 18:02:00 -0700 From: "Carrillo, Erik G" To: "Sanford, Robert" CC: "thomas@monjalon.net" , "dev@dpdk.org" , "nhorman@tuxdriver.com" Thread-Topic: [PATCH v4 1/2] timer: allow timer management in shared memory Thread-Index: AQHU3yQ9aN4Jx/BLnUGtubMFuhQZvaYVRRfS Date: Thu, 21 Mar 2019 01:01:59 +0000 Message-ID: References: <1544739996-26011-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-2-git-send-email-erik.g.carrillo@intel.com>, <40792313-7864-470F-B188-9AA1A0F072B8@akamai.com> In-Reply-To: <40792313-7864-470F-B188-9AA1A0F072B8@akamai.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 1/2] timer: allow timer management in shared memory 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190321010159.ZO26IHSCNoIIVK693bEvvkUoqx17Z-TY2vrqABYDQa0@z> SGkgUm9iZXJ0LA0KDQpUaGFua3MgZm9yIHRoZSByZXZpZXcgYW5kIHN1Z2dlc3Rpb25zLiAgSeKA mW0gb3V0IG9mIHRoZSBvZmZpY2Ugb24gYm9uZGluZyBsZWF2ZSBmb3IgdGhlIG5leHQgZmV3IHdl ZWtzLCBidXQgSeKAmWxsIHVwZGF0ZSB0aGUgcGF0Y2ggdG8gYWRkcmVzcyB5b3VyIHBvaW50cyBi ZWxvdyB3aGVuIEkgcmV0dXJuLg0KDQpUaGFua3MsDQpFcmlrDQoNCj4gT24gTWFyIDIwLCAyMDE5 LCBhdCA4OjUzIEFNLCBTYW5mb3JkLCBSb2JlcnQgPHJzYW5mb3JkQGFrYW1haS5jb20+IHdyb3Rl Og0KPiANCj4gSGkgRXJpaywNCj4gDQo+IEkgaGF2ZSBhIGZldyBxdWVzdGlvbnMgYW5kIGNvbW1l bnRzIG9uIHRoaXMgcGF0Y2ggc2VyaWVzLg0KPiANCj4gMS4gRG9uJ3QgeW91IHRoaW5rIHdlIG5l ZWQgbmV3IHRlc3RzIChpbiB0ZXN0L3Rlc3QvKSB0byB2ZXJpZnkgdGhlIHNlY29uZGFyeS1wcm9j ZXNzIEFQSXM/DQo+IDIuIEkgc3VnZ2VzdCB3ZSBkZWZpbmUgZGVmYXVsdF9kYXRhX2lkIGFzIGNv bnN0LCBhbmQgZXhwbGljaXRseSBzZXQgaXQgdG8gMC4NCj4gMy4gVGhlIG91dGVyIGZvci1sb29w I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gPT0gTlVMTCB8fA0KPiArICAgICAgICAgICAgcHJpdnAtPnBl bmRpbmdfaGVhZC5zbF9uZXh0WzBdLT5leHBpcmUgPiBjdXJfdGltZSkgew0KPiArICAgICAgICAg ICAgcnRlX3NwaW5sb2NrX3VubG9jaygmcHJpdnAtPmxpc3RfbG9jayk7DQo+ICsgICAgICAgICAg ICBjb250aW51ZTsNCj4gKyAgICAgICAgfQ0KPiArDQo+ICsgICAgICAgIC8qIHNhdmUgc3RhcnQg b2YgbGlzdCBvZiBleHBpcmVkIHRpbWVycyAqLw0KPiArICAgICAgICB0aW0gPSBwcml2cC0+cGVu ZGluZ19oZWFkLnNsX25leHRbMF07DQo+ICsNCj4gKyAgICAgICAgLyogYnJlYWsgdGhlIGV4aXN0 aW5nIGxpc3QgYXQgY3VycmVudCB0aW1lIHBvaW50ICovDQo+ICsgICAgICAgIHRpbWVyX2dldF9w cmV2X2VudHJpZXMoY3VyX3RpbWUsIHBvbGxfbGNvcmUsIHByZXYsDQo+ICsgICAgICAgICAgICAg ICAgICAgICAgIGRhdGEtPnByaXZfdGltZXIpOw0KPiArICAgICAgICBmb3IgKGogPSBwcml2cC0+ Y3Vycl9za2lwbGlzdF9kZXB0aCAtIDE7IGogPj0gMDsgai0tKSB7DQo+ICsgICAgICAgICAgICBp ZiAocHJldltqXSA9PSAmcHJpdnAtPnBlbmRpbmdfaGVhZCkNCj4gKyAgICAgICAgICAgICAgICBj b250aW51ZTsNCj4gKyAgICAgICAgICAgIHByaXZwLT5wZW5kaW5nX2hlYWQuc2xfbmV4dFtqXSA9 DQo+ICsgICAgICAgICAgICAgICAgcHJldltqXS0+c2xfbmV4dFtqXTsNCj4gKyAgICAgICAgICAg IGlmIChwcmV2W2pdLT5zbF9uZXh0W2pdID09IE5VTEwpDQo+ICsgICAgICAgICAgICAgICAgcHJp dnAtPmN1cnJfc2tpcGxpc3RfZGVwdGgtLTsNCj4gKw0KPiArICAgICAgICAgICAgcHJldltqXS0+ c2xfbmV4dFtqXSA9IE5VTEw7DQo+ICsgICAgICAgIH0NCj4gKw0KPiArICAgICAgICAvKiB0cmFu c2l0aW9uIHJ1bi1saXN0IGZyb20gUEVORElORyB0byBSVU5OSU5HICovDQo+ICsgICAgICAgIHJ1 bl9maXJzdF90aW1zW25iX3J1bmxpc3RzXSA9IHRpbTsNCj4gKyAgICAgICAgcnVubGlzdF9sY29y ZV9pZHNbbmJfcnVubGlzdHNdID0gcG9sbF9sY29yZTsNCj4gKyAgICAgICAgcHByZXYgPSAmcnVu X2ZpcnN0X3RpbXNbbmJfcnVubGlzdHNdOw0KPiArICAgICAgICBuYl9ydW5saXN0cysrOw0KPiAr DQo+ICsgICAgICAgIGZvciAoIDsgdGltICE9IE5VTEw7IHRpbSA9IG5leHRfdGltKSB7DQo+ICsg ICAgICAgICAgICBuZXh0X3RpbSA9IHRpbS0+c2xfbmV4dFswXTsNCj4gKw0KPiArICAgICAgICAg ICAgcmV0ID0gdGltZXJfc2V0X3J1bm5pbmdfc3RhdGUodGltKTsNCj4gKyAgICAgICAgICAgIGlm IChsaWtlbHkocmV0ID09IDApKSB7DQo+ICsgICAgICAgICAgICAgICAgcHByZXYgPSAmdGltLT5z bF9uZXh0WzBdOw0KPiArICAgICAgICAgICAgfSBlbHNlIHsNCj4gKyAgICAgICAgICAgICAgICAv KiBhbm90aGVyIGNvcmUgaXMgdHJ5aW5nIHRvIHJlLWNvbmZpZyB0aGlzIG9uZSwNCj4gKyAgICAg ICAgICAgICAgICAgKiByZW1vdmUgaXQgZnJvbSBsb2NhbCBleHBpcmVkIGxpc3QNCj4gKyAgICAg ICAgICAgICAgICAgKi8NCj4gKyAgICAgICAgICAgICAgICAqcHByZXYgPSBuZXh0X3RpbTsNCj4g KyAgICAgICAgICAgIH0NCj4gKyAgICAgICAgfQ0KPiArDQo+ICsgICAgICAgIC8qIHVwZGF0ZSB0 aGUgbmV4dCB0byBleHBpcmUgdGltZXIgdmFsdWUgKi8NCj4gKyAgICAgICAgcHJpdnAtPnBlbmRp bmdfaGVhZC5leHBpcmUgPQ0KPiArICAgICAgICAgICAgKHByaXZwLT5wZW5kaW5nX2hlYWQuc2xf bmV4dFswXSA9PSBOVUxMKSA/IDAgOg0KPiArICAgICAgICAgICAgcHJpdnAtPnBlbmRpbmdfaGVh ZC5zbF9uZXh0WzBdLT5leHBpcmU7DQo+ICsNCj4gKyAgICAgICAgcnRlX3NwaW5sb2NrX3VubG9j aygmcHJpdnAtPmxpc3RfbG9jayk7DQo+ICsgICAgfQ0KPiArDQo+ICsgICAgLyogTm93IHByb2Nl c3MgdGhlIHJ1biBsaXN0cyAqLw0KPiArICAgIHdoaWxlICgxKSB7DQo+ICsgICAgICAgIGJvb2wg ZG9uZSA9IHRydWU7DQo+ICsgICAgICAgIHVpbnQ2NF90IG1pbl9leHBpcmUgPSBVSU5UNjRfTUFY Ow0KPiArICAgICAgICBpbnQgbWluX2lkeCA9IDA7DQo+ICsNCj4gKyAgICAgICAgLyogRmluZCB0 aGUgbmV4dCBvbGRlc3QgdGltZXIgdG8gcHJvY2VzcyAqLw0KPiArICAgICAgICBmb3IgKGkgPSAw OyBpIDwgbmJfcnVubGlzdHM7IGkrKykgew0KPiArICAgICAgICAgICAgdGltID0gcnVuX2ZpcnN0 X3RpbXNbaV07DQo+ICsNCj4gKyAgICAgICAgICAgIGlmICh0aW0gIT0gTlVMTCAmJiB0aW0tPmV4 cGlyZSA8IG1pbl9leHBpcmUpIHsNCj4gKyAgICAgICAgICAgICAgICBtaW5fZXhwaXJlID0gdGlt LT5leHBpcmU7DQo+ICsgICAgICAgICAgICAgICAgbWluX2lkeCA9IGk7DQo+ICsgICAgICAgICAg ICAgICAgZG9uZSA9IGZhbHNlOw0KPiArICAgICAgICAgICAgfQ0KPiArICAgICAgICB9DQo+ICsN Cj4gKyAgICAgICAgaWYgKGRvbmUpDQo+ICsgICAgICAgICAgICBicmVhazsNCj4gKw0KPiArICAg ICAgICB0aW0gPSBydW5fZmlyc3RfdGltc1ttaW5faWR4XT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gICAgICAgICBzdGF0dXMub3duZXIgPSBSVEVfVElNRVJfTk9fT1dORVI7DQo+ ICsgICAgICAgICAgICBydGVfd21iKCk7DQo+ICsgICAgICAgICAgICB0aW0tPnN0YXR1cy51MzIg PSBzdGF0dXMudTMyOw0KPiArICAgICAgICB9IGVsc2Ugew0KPiArICAgICAgICAgICAgLyoga2Vl cCBpdCBpbiBsaXN0IGFuZCBtYXJrIHRpbWVyIGFzIHBlbmRpbmcgKi8NCj4gKyAgICAgICAgICAg IHJ0ZV9zcGlubG9ja19sb2NrKA0KPiArICAgICAgICAgICAgICAgICZkYXRhLT5wcml2X3RpbWVy W3RoaXNfbGNvcmVdLmxpc3RfbG9jayk7DQo+ICsgICAgICAgICAgICBzdGF0dXMuc3RhdGUgPSBS VEVfVElNRVJfUEVORElORzsNCj4gKyAgICAgICAgICAgIF9fVElNRVJfU1RBVF9BREQoZGF0YS0+ cHJpdl90aW1lciwgcGVuZGluZywgMSk7DQo+ICsgICAgICAgICAgICBzdGF0dXMub3duZXIgPSAo aW50MTZfdCl0aGlzX2xjb3JlOw0KPiArICAgICAgICAgICAgcnRlX3dtYigpOw0KPiArICAgICAg ICAgICAgdGltLT5zdGF0dXMudTMyID0gc3RhdHVzLnUzMjsNCj4gKyAgICAgICAgICAgIF9fcnRl X3RpbWVyX3Jlc2V0KHRpbSwgdGltLT5leHBpcmUgKyB0aW0tPnBlcmlvZCwNCj4gKyAgICAgICAg ICAgICAgICB0aW0tPnBlcmlvZCwgdGhpc19sY29yZSwgdGltLT5mLCB0aW0tPmFyZywgMSwNCj4g KyAgICAgICAgICAgICAgICBkYXRhKTsNCj4gKyAgICAgICAgICAgIHJ0ZV9zcGlubG9ja191bmxv Y2soDQo+ICsgICAgICAgICAgICAgICAgJmRhdGEtPnByaXZfdGltZXJbdGhpc19sY29yZV0ubGlz dF9sb2NrKTsNCj4gKyAgICAgICAgfQ0KPiArDQo+ICsgICAgICAgIHByaXZwLT5ydW5uaW5nX3Rp bSA9IE5V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