From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9DF4A5A; Wed, 27 Mar 2019 21:33:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2019 13:33:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,277,1549958400"; d="scan'208";a="158982816" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 27 Mar 2019 13:33:46 -0700 Received: from hasmsx107.ger.corp.intel.com (10.184.198.27) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Mar 2019 13:33:46 -0700 Received: from hasmsx105.ger.corp.intel.com ([169.254.1.16]) by hasmsx107.ger.corp.intel.com ([169.254.2.23]) with mapi id 14.03.0415.000; Wed, 27 Mar 2019 22:33:43 +0200 From: "Stojaczyk, Dariusz" To: Thomas Monjalon CC: "dev@dpdk.org" , "Zhang, Qi Z" , "Burakov, Anatoly" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] eal: initialize alarms early Thread-Index: AQHU5APjFsFLn9yHZE2TJ9K2xhb7EqYfp3+AgABCsiA= Date: Wed, 27 Mar 2019 20:33:43 +0000 Message-ID: References: <20190326184331.13850-1-dariusz.stojaczyk@intel.com> <2545420.xP4CxeWPSp@xps> In-Reply-To: <2545420.xP4CxeWPSp@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.249.45.155] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] eal: initialize alarms early 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: Wed, 27 Mar 2019 20:33:49 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, March 27, 2019 7:12 PM > To: Stojaczyk, Dariusz > Cc: dev@dpdk.org; Zhang, Qi Z ; Burakov, Anatoly > ; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] eal: initialize alarms early >=20 > 26/03/2019 19:43, Darek Stojaczyk: > > We currently initialize rte_alarms after starting > > to listen for IPC hotplug requests, which gives > > us a data race window. Upon receiving such hotplug > > request we always try to set an alarm and this > > obviously doesn't work if the alarms weren't > > initialized yet. > > > > To fix it, we initialize alarms before starting > > to listen for IPC hotplug messages. Specifically, > > we move rte_eal_alarm_init() right after > > rte_eal_intr_init() as it makes some sense to > > keep those two close to each other. >=20 > I wonder which regression it will bring :) > The experience shows that we cannot touch this function > without introducing a regression. Please check twice. Hah, ok - I'll check again the possible outcomes of this. >=20 > > Fixes: 244d5130719c ("eal: enable hotplug on multi-process") > > Cc: Qi Zhang > > Cc: Anatoly Burakov > > Cc: stable@dpdk.org > > > > Signed-off-by: Darek Stojaczyk > > --- > > lib/librte_eal/linux/eal/eal.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > You probably need to update the FreeBSD version too. >=20 Oh, that I cannot do. First of all, in bsd code I don't see rte_mp_dev_hotplug_init() called anywhere, as if bsd did not listen for IPC hotplug messages at all and hence did not have any data race in this area. Second, I would be afraid to touch any bsd code as I'm not running any bsd system. D. 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 7DAF2A05D3 for ; Wed, 27 Mar 2019 21:33:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E0764C88; Wed, 27 Mar 2019 21:33:50 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9DF4A5A; Wed, 27 Mar 2019 21:33:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2019 13:33:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,277,1549958400"; d="scan'208";a="158982816" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 27 Mar 2019 13:33:46 -0700 Received: from hasmsx107.ger.corp.intel.com (10.184.198.27) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 27 Mar 2019 13:33:46 -0700 Received: from hasmsx105.ger.corp.intel.com ([169.254.1.16]) by hasmsx107.ger.corp.intel.com ([169.254.2.23]) with mapi id 14.03.0415.000; Wed, 27 Mar 2019 22:33:43 +0200 From: "Stojaczyk, Dariusz" To: Thomas Monjalon CC: "dev@dpdk.org" , "Zhang, Qi Z" , "Burakov, Anatoly" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] eal: initialize alarms early Thread-Index: AQHU5APjFsFLn9yHZE2TJ9K2xhb7EqYfp3+AgABCsiA= Date: Wed, 27 Mar 2019 20:33:43 +0000 Message-ID: References: <20190326184331.13850-1-dariusz.stojaczyk@intel.com> <2545420.xP4CxeWPSp@xps> In-Reply-To: <2545420.xP4CxeWPSp@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.249.45.155] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] eal: initialize alarms early 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: <20190327203343.wvIGOQGIMJoSNomP91uvMPF4cOHEh4QjokfM_lbvUKc@z> > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, March 27, 2019 7:12 PM > To: Stojaczyk, Dariusz > Cc: dev@dpdk.org; Zhang, Qi Z ; Burakov, Anatoly > ; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] eal: initialize alarms early >=20 > 26/03/2019 19:43, Darek Stojaczyk: > > We currently initialize rte_alarms after starting > > to listen for IPC hotplug requests, which gives > > us a data race window. Upon receiving such hotplug > > request we always try to set an alarm and this > > obviously doesn't work if the alarms weren't > > initialized yet. > > > > To fix it, we initialize alarms before starting > > to listen for IPC hotplug messages. Specifically, > > we move rte_eal_alarm_init() right after > > rte_eal_intr_init() as it makes some sense to > > keep those two close to each other. >=20 > I wonder which regression it will bring :) > The experience shows that we cannot touch this function > without introducing a regression. Please check twice. Hah, ok - I'll check again the possible outcomes of this. >=20 > > Fixes: 244d5130719c ("eal: enable hotplug on multi-process") > > Cc: Qi Zhang > > Cc: Anatoly Burakov > > Cc: stable@dpdk.org > > > > Signed-off-by: Darek Stojaczyk > > --- > > lib/librte_eal/linux/eal/eal.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > You probably need to update the FreeBSD version too. >=20 Oh, that I cannot do. First of all, in bsd code I don't see rte_mp_dev_hotplug_init() called anywhere, as if bsd did not listen for IPC hotplug messages at all and hence did not have any data race in this area. Second, I would be afraid to touch any bsd code as I'm not running any bsd system. D.