From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84ECEA0567; Tue, 9 Mar 2021 09:30:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01D104069D; Tue, 9 Mar 2021 09:30:38 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr770084.outbound.protection.outlook.com [40.107.77.84]) by mails.dpdk.org (Postfix) with ESMTP id 1FF394068A; Tue, 9 Mar 2021 09:30:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZcpPbyaogGu9z0V1+ZCjHRC939m/ePKDc/B+ESuek5Ig1Yq9dTgKHFCBwJ4K4v8QcwwTrW2of0UZHlbg5k/Z5QF/PtSQjsGMpH2oM9zhWONo34jjWZcFYw6j8oQ/qAKMNtu6m7/2ebtySw9o6tzWOo8mQ83JIXfryhPF6ucoJVCqLes8bP7xdfESw1UO+Ci8VzyDxQbsf13vv/647sJEGRoAPKz/Lfmouuvow7naLgbGXdeRDdxPskPki6suj0d+tp9Mc3BpXPphnMftFAQiXr2sEo9UVInKRThzME7Eq0HWQiBJumiA9StOufZuDVxeXzLDb8cmkOXRi0HystEvCw== 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=RApvxylTszQMbg0WRDLc9cOsS11gGt9tlsHQMW6wnkw=; b=Y/SFSxgwRSmz+ppTeVT7h7wrjwquUM9/Vgkd7w0Nn5Gc4Zruk4SThEZkpOMWgjq+2Vzh5aAuC9y7ChctV0K7s8ugOIWTXAIXcy4eRqATLb9+U/kIJqSxt8HafcIFhD1KvrJqiZPvKcGKgbU5hDjMg/WbJcsTh7ComgaR85mOVYNuG0Pl3mMeekr8T68fys5vzcy2zGQ2irlhRqKnQ+/Cpkyd2LR9yW7vlT+HMiIWW7RI4MDxc1RT4POZEXbKdrKXqaSXZIFp04DrAjX96HNZFX+9wXHEeDIvpmiitVrh4ylPFDMABxxHxvBwmtp/8TyINzIfhXGy3Yy4OmMf/wQ6HA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RApvxylTszQMbg0WRDLc9cOsS11gGt9tlsHQMW6wnkw=; b=Jq31f1fB8RYLuRtUIqHP6f/FMUl1b56eImNOht2lpoP0vsvnplmqfnmhr46/hIM8CP0fgE1IgEJh8q2b3WcXMKocTI3OGo35rly/fb/IT5C6sRpA6KdGYdwwxo2X+Scr9jwKEwM30oHqhyb0Ebp9uhRWnNibb0DcLyxU8EyosZCRvpHUypl/ctn6SsajurD0Z3CqsXd0Y88tTV3AXeHjU8nRwHEDChhbsava7uS7VYaUd0sVWZ+fMioAxrR8qf0ybZwt65Ktcm4jsYgOQmiXJx0PsNkfVOI6a4sBJFdJwHWr20ykmMLvLlQ+dP4n+XuhvBT48i+biMJXPbUpMoaT3Q== Received: from DM6PR12MB3945.namprd12.prod.outlook.com (2603:10b6:5:1c2::27) by DM6PR12MB4745.namprd12.prod.outlook.com (2603:10b6:5:7b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Tue, 9 Mar 2021 08:30:34 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d%5]) with mapi id 15.20.3912.027; Tue, 9 Mar 2021 08:30:34 +0000 From: Tal Shnaiderman To: "dev@dpdk.org" CC: NBU-Contact-Thomas Monjalon , "pallavi.kadam@intel.com" , "dmitry.kozliuk@gmail.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "david.marchand@redhat.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] eal/windows: fix default thread priority Thread-Index: AQHXBesO8yp7SaKwF0u/qG3i3wgKtqp7cLcA Date: Tue, 9 Mar 2021 08:30:34 +0000 Message-ID: References: <20210218114058.13248-1-talshn@nvidia.com> In-Reply-To: <20210218114058.13248-1-talshn@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [37.142.1.13] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 86fa41e2-5ff3-4fb0-7b9c-08d8e2d59bc6 x-ms-traffictypediagnostic: DM6PR12MB4745: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-transport-forked: True x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NSLaIEVpdXNuj9w+Lq2RCis3NRcfpDUhm4pTigGiE/xC3nxcbDKfxcWCofYfPOn7ewDnyY+tOfccnaVEK1uwH1+JAVTh5pe6/B4yLmslVpkySw+VhmgslDS97MCItfhjLWsbPE7apZ4mENsugpHiPN5Lb1zn4TANWTnwzDwOEOzVCn0TgMcp5W+Wcyr4ZhiGLYnC1zU0YiiaOOvEPEAOrhk3Jq5RZGQa2qiWeBCph3VS3KrpK9CJt/lZZiIH93iNKuaUKAyC/WZoMucyw9fahcXZfJNLYCsv22Zr8hHBWvairaF8FDHJWs9WFx6WRA6wn2fhVkIS4CAR7qngwnQsAMng6kCjFC+tO2Tu6wbTmqeLMDn3WlfZoh1+hqPfPVxjjhHrtW4b5LycRXVF64v5ojjz7PEreSGCTIIp+6Cp3ZD7/y42zysexKKa3GtreejeFx15SRKhEBPl7QwjlkmWTUTS1MuAhtcN/6NTilrRoRlTm/dH9rgiNQc8Fms5s2IFI9EVMYVTsSvtg+nyDtvMqw== 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)(376002)(39860400002)(346002)(136003)(366004)(396003)(55016002)(6916009)(54906003)(8676002)(316002)(64756008)(8936002)(6506007)(4326008)(66446008)(66556008)(7696005)(2906002)(52536014)(186003)(33656002)(26005)(9686003)(83380400001)(66476007)(71200400001)(86362001)(478600001)(5660300002)(76116006)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?8rs0eOazCgpAHF2gGiWiPl13PqVo0idvs9YdSrYEGMe6tuLg2K06mUqZXVtu?= =?us-ascii?Q?mJcFJ36tlYZeDydERbcL/4vU7ExySZwjpCzn2Dl+D28+5Y8WxBMDACLYPh79?= =?us-ascii?Q?lADZB239J3iDghiYuGpUMBsOpHjaVQyP9ZxFFolewi/m2rDy2uboynmw8so4?= =?us-ascii?Q?VD0SQ1VNGqVtwXOLbj013sKD8NgJPybpZ7b3D30P2Ns+BMkSoKeXTq4lpTGB?= =?us-ascii?Q?Y1RyFb3QJsKM/rNJp/VKAKifCoHdvf0VoSkpc6Iik/VuIQACw2V8Ck0i90XX?= =?us-ascii?Q?q0MgY+LMqyOii7lQES74gM125XF8s0Wc2HrhnZ9xv0dWHMbLR39J5xwsUuiy?= =?us-ascii?Q?1URhyxiu6AnLN1W+IStp58ifp1KiND1aWtFX0R8qOAkGou2AR/TKeezi8jQg?= =?us-ascii?Q?G2RSQ3Zgm1aLM6dWxs+hbQpvCCNPrlt1QudyV+TY6LhylMqFriXLb19lnVgm?= =?us-ascii?Q?tqys3dBHGQJ9hFOM90/OGw8YxOJfLv22mS0NM0fr8xKYtUmZJ+4dGsbI/OFF?= =?us-ascii?Q?bIiY9OqWdeqZErw8SiqAhLiym0+1xfE/qM+hiUkwvknN1nrf2XvNONOZtG2j?= =?us-ascii?Q?BaSfO9W/0FXEz+v0ROBKJSKXRbzrEcO8v2Ye+Ix6KAjteKQRGRaEtKbBegJs?= =?us-ascii?Q?IheqiRCIt73exhN+RweA2++FKaKU6RiDD+M3ajW/njogULvS1OW/BwH/x8Qd?= =?us-ascii?Q?qnWpIZeGUuM4lYLPJrp4tjoGN5KNXyCoojE5bFojueklvA4QWNWe0axR8t9F?= =?us-ascii?Q?6anieskI18NDnSCXozqXiLQq9LBl9474y+ni1ykw5USRixN5W/U5Al9cxGGr?= =?us-ascii?Q?0W/1GbFmIPkscElOBuhXITE5SNnefp/4ksfI35RGWYNenUi6qtvAzBLqBXzp?= =?us-ascii?Q?uT6jQE27AM7pNt6meLgoWabVOl+0kjgNZwnCGjKLXLwlfx/0eXdPzXD6oKoA?= =?us-ascii?Q?5m6zes88wkNrL2V7rT/689msUu9H3BGqM4/lmuwQOqYGkbEyj0UCPNMIJRDk?= =?us-ascii?Q?R/ZisTF4K2K1POfLn3Aw6Au+bYp+13pCfHoNeMUdvojAG/hG9nWyBaD4ghIZ?= =?us-ascii?Q?nLDwJtUx++GufYCm227F+Vhbk10QQ4r7JD2KeChUYl5TbsyVge/opT/m4CPb?= =?us-ascii?Q?9ksKacvzrv/ofTtLG5hULSUCKq6XJRwoiHRlZdsJv2krRK0TS0iXJK1Q5OeH?= =?us-ascii?Q?xmQ05h8IOW/sEVYP3xM2cZfG3rTSwDtiHhDpNz/jAbCkxBs/HFJnIhnUBSpV?= =?us-ascii?Q?aMVDUqVYcnLC7ZMhc24VkoVn4pU09D7C1io4QgI5/SSLFZMT79vAuDokPepr?= =?us-ascii?Q?8Os=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3945.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86fa41e2-5ff3-4fb0-7b9c-08d8e2d59bc6 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2021 08:30:34.1553 (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: uHhc0m2jqToZQN6R0pxxOOF/8v8NOlpLKuwsMsErCLV7U43zFXaMdZhtiy/9mgtFTyXsoZHSeiBfA/3GxTk5sw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4745 Subject: Re: [dpdk-dev] [PATCH] eal/windows: fix default thread priority X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: [dpdk-dev] [PATCH] eal/windows: fix default thread priority >=20 > The hard-coded thread priority for Windows threads in eal is > REALTIME_PRIORITY_CLASS/THREAD_PRIORITY_TIME_CRITICAL. >=20 > This results in issues with DPDK threads causing OS thread starvation and > eventually a bugcheck. >=20 > The fix reduce the thread priority to > NORMAL_PRIORITY_CLASS/THREAD_PRIORITY_NORMAL. >=20 > Bugzilla ID: 600 > Fixes: 53ffd9f080f ("eal/windows: add minimum viable code") > Cc: stable@dpdk.org >=20 > Reported-by: Odi Assli > Signed-off-by: Tal Shnaiderman > --- > lib/librte_eal/windows/eal_thread.c | 4 ++-- > lib/librte_eal/windows/include/pthread.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/librte_eal/windows/eal_thread.c > b/lib/librte_eal/windows/eal_thread.c > index 908e726d16..9c3f6d69fd 100644 > --- a/lib/librte_eal/windows/eal_thread.c > +++ b/lib/librte_eal/windows/eal_thread.c > @@ -134,8 +134,8 @@ eal_thread_create(pthread_t *thread) > if (!th) > return -1; >=20 > - SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS); > - SetThreadPriority(th, THREAD_PRIORITY_TIME_CRITICAL); > + SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); > + SetThreadPriority(th, THREAD_PRIORITY_NORMAL); >=20 > return 0; > } > diff --git a/lib/librte_eal/windows/include/pthread.h > b/lib/librte_eal/windows/include/pthread.h > index fb11a07ce6..9aeab1fa70 100644 > --- a/lib/librte_eal/windows/include/pthread.h > +++ b/lib/librte_eal/windows/include/pthread.h > @@ -137,8 +137,8 @@ pthread_create(void *threadid, const void > *threadattr, void *threadfunc, > hThread =3D CreateThread(NULL, 0, > (LPTHREAD_START_ROUTINE)threadfunc, > args, 0, (LPDWORD)threadid); > if (hThread) { > - SetPriorityClass(GetCurrentProcess(), > REALTIME_PRIORITY_CLASS); > - SetThreadPriority(hThread, > THREAD_PRIORITY_TIME_CRITICAL); > + SetPriorityClass(GetCurrentProcess(), > NORMAL_PRIORITY_CLASS); > + SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL); > } > return ((hThread !=3D NULL) ? 0 : E_FAIL); } > -- > 2.16.1.windows.4 Hi, Any comments on the patch or can it be Acked as was discussed in the commun= ity call?