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 90221A09FF; Wed, 30 Dec 2020 11:04:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E9DCF2B8E; Wed, 30 Dec 2020 11:04:42 +0100 (CET) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id B4B972B83 for ; Wed, 30 Dec 2020 11:04:40 +0100 (CET) Received: from HKMAIL102.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 30 Dec 2020 18:04:38 +0800 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 30 Dec 2020 10:04:31 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 30 Dec 2020 10:04:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CclTOttP6JVYWsjp5v+CBuM0DEUBPadB/Wwp8NsZuAXFibJTvIuAAVUSuyeleX7niyQB1OJsDAo6G+aRRNIqvAhrzFvaDxhuwnQ9nnraZklMSDguRBb7Jrg8CyESmPqE3+NkB7HRHydLpZhfXM/VZWircmtiBxMuxTaSS+AP7SnpW93HqLL2CAxk+wGs9QYbM0UfiKW/5DlXEQVObnMQLR13+E+inntnIy65A60ig3+uxUGh65gaAphTcdfYCjzbDuDPur5YGGUdPSKWbgyCVvtRxay3j6S0dNNoTgFULmEYfe+aVPMhyBGnc5SL4T35IRNjbtLa/Yn36eXEUL94Uw== 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=BJTTfU3/5wk1HFPIx5h1qFZ2rNN62+WOBHuEQMi3sPk=; b=A/mN7mYMscp9/vUr7r/rQYYY61R8NBGjrVsg+DXTtzOI8zoZebAwKB77LOJbB/dawfxGxSg/JY2yzbcDhxIFs93KscQ+J0mGjHC+2VTLyNLfZ6pTD37TZFTiXbgAT8O3XtYrL925lVZsZJ84cGNFR5SPAEWf2KOZP1nNenPICsvI6Gm/FBz99E5O8jfSKKIUrft8uaKUAQBEGttVjga29nIb3kUXM/yWrFL9Bj+jgdoo/J5D2g1Fa4/xcwJybCnMeMnopQxSoXRm+hHU9ndSe6Q+bAw/ARgj/3tsCJB8B5WpRNZPgUECaLkTxt1MSWWIjUPV7Z/zsmkVbHtoW46NPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3945.namprd12.prod.outlook.com (10.255.172.91) by DM6PR12MB3034.namprd12.prod.outlook.com (20.178.199.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.28; Wed, 30 Dec 2020 10:04:29 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df%7]) with mapi id 15.20.3721.020; Wed, 30 Dec 2020 10:04:28 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , "pallavi.kadam@intel.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "david.marchand@redhat.com" Thread-Topic: [PATCH v5] eal: add generic thread-local-storage functions Thread-Index: AQHW3jhRqIgnczBf5U6Okcn0oV7USKoPaFcQ Date: Wed, 30 Dec 2020 10:04:28 +0000 Message-ID: References: <20201222073044.9084-1-talshn@nvidia.com> <20201226160848.9824-1-talshn@nvidia.com> <20201230021357.3d6ca19e@sovereign> In-Reply-To: <20201230021357.3d6ca19e@sovereign> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.141.17] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 481fa838-75d6-49c7-a51e-08d8acaa4b9e x-ms-traffictypediagnostic: DM6PR12MB3034: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: o+2keRaf6abnQVjiBeuRUh0uhYpNbAY5iXAs6DgdJfCLHCqTl33ljO7eP8HTNZJLSyns8E9HRAk1PTCv+rZDm0W0jXMGmP7tnd5hk602KK9NtftzFSQFt3wOzUBe9Kwnz1FmOpDbYE6D6vUjMqcbWaJfGjZVjExHuu+BAg6q4SmtaI3lcfucAZBDlwzR/Dc9wMc76nnn9RwVWvQIOlyjpS+cEwTbuG8BIBg0PnTzfz0ISGfCxdRIY5hwkcRFPOiwa4dtlNM5Kk+EZRLBsS2XlmRBgbrean3VUVV3omLR3ToimObW8fTIf253CWQN0OZBg/cRrKr2Pq8F1cBblDgVxRztxVhb++vq7IVJldf6mBh2cprqTghV4zU8aJXG2DZYFpt/tqENoPaKdZoNLiUphi/LRac7btUMapN1Vc5ljhRX3crKsX/MmN7D72HoyGFd x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3945.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(396003)(346002)(366004)(39860400002)(33656002)(71200400001)(66476007)(8936002)(66556008)(7696005)(8676002)(86362001)(76116006)(2906002)(4326008)(478600001)(186003)(64756008)(9686003)(5660300002)(6506007)(54906003)(6916009)(26005)(55016002)(66446008)(66946007)(52536014)(316002)(41533002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?MxA+E9isB3oA3F7vg1usSWEKFX6rnXI78sgz6XQFpCNe67gbgrHMt8iOIICE?= =?us-ascii?Q?VHUgI9aZJQpmrxGjmnqSSbJ0lwJRhMe/ggiDFS9hy+o0ZY0wLk5lwFcLBb+S?= =?us-ascii?Q?ATpDRBoE3S4i+i8chAgxMYvM7TNUPMfflLVD0wEXGodT3wjZt9bh1KYYQjz0?= =?us-ascii?Q?vN6+kKhEu/XuuZpFO9UTLJwNX/86piLjanCUXvoGrpcmXhyko1rfzGviVdeY?= =?us-ascii?Q?SC7+I7hWlGEfmwLJx5PKV+IQM13Gvd/qEdHkcLWW4KWJtF4DBS6/RYEjeXpF?= =?us-ascii?Q?WFFk/mA7ZzDpj72Qn/PdG1fHUW+En/n0F7NiKW20HmytPu/1HyY1wwo/b74+?= =?us-ascii?Q?RXIeTt5KAvwzvD041SmeKCXNNNY25VE+IcTUhqxjBCwll0eptAl33oHfcZue?= =?us-ascii?Q?qUmwJwLg1UrALD+CJDdKFlmNY/4mxD6R017jvV5cZXXDMoLe/QtWaMEo5q2f?= =?us-ascii?Q?QYaUzVbRHT7MBGh6p0JXZqf9ePNCJK8PFI6ynxY6tp8YMnAoRUrdfC7yOmL/?= =?us-ascii?Q?Q3T5PCb/gpi/gnOjgcBMp3lUpgmPLZ6/aJBzcTgc81MF47PD5nzLx31+0H8f?= =?us-ascii?Q?N/gg2lKntYODm4vX5oIoojk7b0i43Ar5I9SYHNUfzJVLdqhE2hITDPEWXsPj?= =?us-ascii?Q?KJfnphqT0EHosqUWB1I1nHfMWfUGBhmCuW1kijBInvunXUAAk+ro6TkFQSfp?= =?us-ascii?Q?svzAxwS2ezmRSo5AieJld1QBHJMoFr7oHOzGYqiS9WoL8LOe2zYLq+0xXDgV?= =?us-ascii?Q?araL7uGzQqhfyWxpr8ZijyXD5prEtFsgrNLIPhdyd9etzjCNxcLFHFlQ8TKc?= =?us-ascii?Q?VVcvGpH0sgDh6zOADREzzgvJE/bl2jUT7IFmsI2PGhiNT/aG3ey8ZGiThUK2?= =?us-ascii?Q?etHA/u8hY4wmKbwjQK1HPMXLE+j9GhwkhG21A/IX+Wvhsa1bTN2KxYcre4TH?= =?us-ascii?Q?LuLI4TdNBvQYRPnERf759og91TyMAkh4obW4tTpGwJ0=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3945.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 481fa838-75d6-49c7-a51e-08d8acaa4b9e X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Dec 2020 10:04:28.4841 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7ZfKBLqC8wHNiLyV1DlrDTONL5vvC/YwI4s3TqwxWSHGeie8Dl04oopxWwPlvvl44cfmSepll9k5UWcU41xvDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3034 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1609322678; bh=BJTTfU3/5wk1HFPIx5h1qFZ2rNN62+WOBHuEQMi3sPk=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=fbvfdoolQB3YwJDUka5weQWxw2y56WXqTxCNvDU7THxcCFunrv+qX0vtrBYEO7nFv Q8NVd8p1bmtUdQQQdWOp+cZtklefA1cBUTEO8hQujmgA33T8B2ghuH7Vnw2Sd8UIvj VOPM6IM94xmdF/nnnEX+jib3eF/4KRQBwa2ZKL2aNR+pRd87Vf4UN30qem2auZdGoU JJpdXzlR1W7alCx88ekxbnCYzJzSl4k/zbW6ZZLIOlOw0c8b3yTkMKU56JCbXJosM1 qBBj2pIYiB+ZUTBxr6R50P23H7rXyhwQar7I9SojQA0DQxUD0X70wF4ZkqhE3ngVf8 PFQ44XJQSrXFw== Subject: Re: [dpdk-dev] [PATCH v5] eal: add generic thread-local-storage functions 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" > Subject: Re: [PATCH v5] eal: add generic thread-local-storage functions >=20 > External email: Use caution opening links or attachments >=20 >=20 > On Sat, 26 Dec 2020 18:08:48 +0200, Tal Shnaiderman wrote: > > diff --git a/lib/librte_eal/windows/meson.build > > b/lib/librte_eal/windows/meson.build > > index 3b2faf29eb..f4c3e2f12c 100644 > > --- a/lib/librte_eal/windows/meson.build > > +++ b/lib/librte_eal/windows/meson.build > > @@ -21,4 +21,10 @@ sources +=3D files( > > 'getopt.c', > > ) > > > > +if (dpdk_conf.has('use_windows_pthread')) > > + sources +=3D 'librte_eal/common/rte_thread.c' > > +else > > + sources +=3D 'librte_eal/windows/rte_thread.c' > > +endif > > + >=20 > You need get_option(), not dpdk_conf (apologies again for not being preci= se > when I drafted the approach): >=20 > --- a/lib/librte_eal/windows/meson.build > +++ b/lib/librte_eal/windows/meson.build > @@ -21,7 +21,7 @@ sources +=3D files( > 'getopt.c', > ) >=20 > -if (dpdk_conf.has('use_windows_pthread')) > +if get_option('use_windows_pthread') > sources +=3D 'librte_eal/common/rte_thread.c' > else > sources +=3D 'librte_eal/windows/rte_thread.c' >=20 > Worse, with -Duse_windows_pthread=3Dtrue file in common directory > includes , but it finds pthread shim from windows subdirectory= , > not the file from external library or MinGW toolchain. So the option is n= ot > usable until the shim exists. I suggest removing the option for now, let'= s > reintroduce it when rte_thread.h grows and the shim goes away. >=20 Right, thanks for checking, I'll send a version without it. I was planning to add support for thread priority control to address the is= sue of threads with realtime priority denying cpu time from OS threads, I t= hink it will be a good opportunity to move pthread_create to the new API.