From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ACA6CA046B for ; Thu, 27 Jun 2019 20:41:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB77A2E8F; Thu, 27 Jun 2019 20:41:45 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 58B1A2BF7 for ; Thu, 27 Jun 2019 20:41:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 11:41:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,424,1557212400"; d="scan'208";a="156328657" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga008.jf.intel.com with ESMTP; 27 Jun 2019 11:41:42 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 27 Jun 2019 11:41:41 -0700 Received: from fmsmsx115.amr.corp.intel.com ([169.254.4.71]) by fmsmsx163.amr.corp.intel.com ([169.254.6.39]) with mapi id 14.03.0439.000; Thu, 27 Jun 2019 11:41:41 -0700 From: "Carrillo, Erik G" To: "Burakov, Anatoly" , "dev@dpdk.org" Thread-Topic: [PATCH 1/2] eal: add internal locks for timer lib into EAL Thread-Index: AQHVK3Cz6I8OwW5Es02lXJGi9mcf+aav11LA Date: Thu, 27 Jun 2019 18:41:41 +0000 Message-ID: References: <1557354906-2500-1-git-send-email-erik.g.carrillo@intel.com> <0743551eba840752223a6447ab4dcaf0731add39.1561478924.git.anatoly.burakov@intel.com> In-Reply-To: <0743551eba840752223a6447ab4dcaf0731add39.1561478924.git.anatoly.burakov@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] eal: add internal locks for timer lib into EAL 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" Hi Anatoly, > -----Original Message----- > From: Burakov, Anatoly > Sent: Tuesday, June 25, 2019 11:12 AM > To: dev@dpdk.org > Cc: Carrillo, Erik G > Subject: [PATCH 1/2] eal: add internal locks for timer lib into EAL >=20 > Currently, timer library has a memory leak because there is no way to > concurrently initialize/deinitialize shared memory because of race condit= ions > [1]. >=20 > Add a spinlock to the shared mem config to have a way to exclusively > initialize/deinitialize the timer library without any races. >=20 > [1] See the following email thread: > https://mails.dpdk.org/archives/dev/2019-May/131498.html >=20 > Signed-off-by: Anatoly Burakov <... snipped ...> > --- a/lib/librte_eal/common/include/rte_eal_memconfig.h > +++ b/lib/librte_eal/common/include/rte_eal_memconfig.h > @@ -109,6 +109,24 @@ rte_mcfg_mempool_write_lock(void); > void > rte_mcfg_mempool_write_unlock(void); >=20 > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice > + * > + * Lock the internal EAL Timer Library lock for exclusive access. > + */ > +void __rte_experimental Depending on the decision made for the following thread, the "__rte_experim= ental" tag location may move: https://mails.dpdk.org/archives/dev/2019-June/136050.html > +rte_mcfg_timer_lock(void); > + > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice > + * > + * Unlock the internal EAL Timer Library lock for exclusive access. > + */ > +void __rte_experimental > +rte_mcfg_timer_unlock(void); > + > #ifdef __cplusplus > } > #endif <... snipped ...> Other than that: Acked-by: Erik Gabriel Carrillo