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 D50ABA00C3; Tue, 1 Feb 2022 10:27:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E72E40691; Tue, 1 Feb 2022 10:27:03 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam08on2089.outbound.protection.outlook.com [40.107.100.89]) by mails.dpdk.org (Postfix) with ESMTP id 79F2340685 for ; Tue, 1 Feb 2022 08:52:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XsTCcezjSKyVfwP/J39M5xIEW74H679ee6UT6pZHsvrJo/KU0EcF2fwe+FTiwZ+FVjH2INJ4VZhUHoTOeNik7+z+x8Vsqrrm+K3ZeNCnxSpuCm1ngH/LPcs6Ecqoy6Pj/mPgjv3UiNMqVbKL75CXDLS443Tlx5qoaLo3jjzkOjSgWVtZhM0qfejqeRvyscGXIy08fDmDluNz6kwpk4iw8w/nrZNl10dhkOilmogDYpdDfihWY4vehx9gd2eQ7NqX5+KCR2SEYiVXmcZXXIgE0f/9tP1DfyL2FDw1AjEF2VCo4J4xk4+I5iW5KdZg546xhhneuqyHJw1Z/AkHc3SxiA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xHHh97TBmHAgh70O+lBsKEn33/KSuOr7HYRPJ6KEagM=; b=FtgrfNDSZwB+lVmje7CkKJ86b6yOgKdIDJUroZ435ITr885NTkNe/n2oNd2g79Ed+0k7unlimB1bl8vlNe/znpi4fDAQI/QuGKi53u4lJ3PpVJbWE+JqMCEaaQScvYWvxqDYYdGaZHnRQ8jWpH0noVBHb+ZdKmwk79wNZq+7REvQb3Cvekrv0H9bFSgxPQFN3k7firYgSqbPslxqG6r/OB0OqFia/PwzdtizSzY59LXBcefRnkxcafEuyY1jGdoX4MgBSiRTAuaPR22/CvXBCbsSxbexVcn1V4ez6VwqGvp66qj7/+CUcQSpWf5nYdJMUN9+hNWLrNy6n6KBP88Wbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=xHHh97TBmHAgh70O+lBsKEn33/KSuOr7HYRPJ6KEagM=; b=DJCdu+29f0oHdytGPoCjweZvuNVWjA41lgJAwWcM6Ra22CiVMr1RK9/QPPYv8IWO996WxBZIndkqtT91pOMDbAZyiaJlKVjXbXjEgKhhZEogM2kaqR5m1mXC128PqLGqL3OR1sNEPGcg5s4oEf2zxMFjd3rBaYJTiV9lq066SAjEev7GZT6BAlfyng4VWOwn4JAtrU20Grm3Xy7zaOVFxQ//I9F8keUdqolsD1dJ4Js2BaOqUyjJmH9pu81QvuvzQ8VWsYlf6w9QN93wgOxudGtLSDsmzb/19RHQLQ/0uAjvhP0rVE3YHiqTmz7puVhuvCad8Zij4KPH1StxOQey6Q== Received: from DM4PR12MB5341.namprd12.prod.outlook.com (2603:10b6:5:39e::18) by MW3PR12MB4361.namprd12.prod.outlook.com (2603:10b6:303:5a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.17; Tue, 1 Feb 2022 07:52:54 +0000 Received: from DM4PR12MB5341.namprd12.prod.outlook.com ([fe80::8cff:1b1e:dd67:e06d]) by DM4PR12MB5341.namprd12.prod.outlook.com ([fe80::8cff:1b1e:dd67:e06d%8]) with mapi id 15.20.4930.022; Tue, 1 Feb 2022 07:52:54 +0000 From: Idan Hackmon To: Tal Shnaiderman , Pallavi Kadam , "dev@dpdk.org" CC: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "ranjit.menon@intel.com" , "dmitry.kozliuk@gmail.com" , "Narcisa.Vasile@microsoft.com" , "qiao.liu@intel.com" Subject: RE: [PATCH] eal/windows: set pthread affinity Thread-Topic: [PATCH] eal/windows: set pthread affinity Thread-Index: AQHYDlicdpofEA0b2E6ld6Ni2Ih3xqx+TNOggAAXbhA= Date: Tue, 1 Feb 2022 07:52:54 +0000 Message-ID: References: <20220121001749.458-1-pallavi.kadam@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fc5242dc-ac5c-4558-73b0-08d9e557daf2 x-ms-traffictypediagnostic: MW3PR12MB4361:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ll0smcIs+pCwKINeqHgpLWhWPxx7Xg0j8DSU/XkKLU4wbZw6c/1+t7EB1Ez4nAk/oxDrNbKAUq/BQFcYE4geMN35NZ42TVBZzvpyUxbgJhn2w66MmaWk8uZhQdESWUQlA6uFTSf+p+4Y5cfgNqm3TsKsRZQ4QxgnOLJEmW4hIOtn4O+kSCogk8SO7MB8Xyh4zB4Uvtb2VBnIJXuCdglkW7ErXIsNTObEp2L7vCws3tEihv+9gYmhbEtxYIhuL9H6SHQ5fJ84iiuZ2CkMsh2VUPCt8pAYHMt42KWawAwivPtFwksBRMgaIy6aZ3Xqq9mReDgWHIl3/a4tvcOu1fztGmQ8vU/Hnne5qwulWHKMyVr6DZ1Er4YCxeletRbl2TVfomDcAQqyXDL3C2F1bPloG4Nxx/O/3o7iV0cF9RwmTwirwE+ppup1GHvgBYjJnPtsKxL321CwV356su+2zkFJ/VlmBJL021Hdcr6ygVV00K57wFgVGa5amuWuSkhCKhcoSOQJes8L7HN1Xe4zqugPM1wBmxcVD++6FXDgGbCJiat1j/rifquWVkikIGKMDH3QNkGwQIPOIjKc5HcQ7mlacRmmmMR8pIt4iKaTM5C/06M3vPLrbOfIoip3AChjyn+c9WIv8RI+BDSBKrnlIzOg1EjEp2ITkwCYUijKDeoM2SYtiDBRCc0OWzPHqvDF4ZUqLP3oyxMA1cIEltMJZ1irTA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5341.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(86362001)(76116006)(4326008)(122000001)(8676002)(508600001)(8936002)(66556008)(66476007)(66446008)(64756008)(66946007)(38100700002)(38070700005)(54906003)(110136005)(316002)(5660300002)(9686003)(55016003)(26005)(33656002)(186003)(2906002)(52536014)(6506007)(7696005)(71200400001)(20210929001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MKefH5b8IyQtz9KhQavBTWIqZbpwBgCgW5KHdbAxWujoi9PpuZeNNpiA+ucz?= =?us-ascii?Q?CbcUmEZpNd90DfZLQZVXklpHdc0GNDPOSvcT3pzrY5hPelntIpoflNXE28O/?= =?us-ascii?Q?/rEGmK6eJuwro8YePS3SxamhlS8MCIHIt/U78oqM4/Q8u77sUDBwJ7kXk7m/?= =?us-ascii?Q?Z7z3uzSkA8HmHuB7dMl41S1SJz3ZF5lHgDbCGjsZPQ95hU3wXeT40m7uirAX?= =?us-ascii?Q?ff66hMS05h571dSUEkCX6TobedOWDOGd0Vl3+ffSjIydEyursPOyVR83TS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TJKHsDrlC49SvL/gX/xN7TNHUOCPW?= =?us-ascii?Q?MMNAl5tyHXeFhTsVQdfrlfmswJzFmm/1C0h7UtCIClgyZxv9eTHcyAH83X7S?= =?us-ascii?Q?NQX0dWEaR9ntJ1FE+FH37qXgf5SO1JI9tzBJHmPOVKq6mWBscb4i9uF16XZk?= =?us-ascii?Q?0qZUxjrttWXWAAazK21GR2RSdcE+O2TCBdxnbEoCsgnRXBWuSVhKnEZfs2Lf?= =?us-ascii?Q?/u0tPdDd/fv0zxB9lGClJXV/QyJ2FASngedmT1FJFYwn6/Sbg3b3U5M4bJh4?= =?us-ascii?Q?6NCw9aoiGgye7yYrY36i5ZGQ770hDPrPSCTvH0jDFDyZJa9HPegak0UGP2Ni?= =?us-ascii?Q?W6McwTr3lR2LiClYLJ2zq5d2uGRhYmruQH/3r2KqmmNW0CQyTEawvFB+w7P8?= =?us-ascii?Q?QZvbaryUJqNdaLxsx8klbSBFkiMZTghNmHEDOk2HsohiOt0fEAb34HkB5eAn?= =?us-ascii?Q?gA=3D=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: DM4PR12MB5341.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc5242dc-ac5c-4558-73b0-08d9e557daf2 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2022 07:52:54.6666 (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: dXUbsto9nZcz8aR2dqckuVZEf2ncvMGH5Pk0fkPdlGQByhuDpT5jfBsuju27GSUgjrrXvhLdW5aOBb7/W5MB+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4361 X-Mailman-Approved-At: Tue, 01 Feb 2022 10:27:02 +0100 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 > Subject: RE: [PATCH] eal/windows: set pthread affinity >=20 > > Subject: [PATCH] eal/windows: set pthread affinity > > > > External email: Use caution opening links or attachments > > > > > > Sometimes OS tries to switch the core. So, bind the lcore thread to a > > fixed core. > > Implement affinity call on Windows similar to Linux. > > > > Signed-off-by: Qiao Liu > > Signed-off-by: Pallavi Kadam > > --- > > lib/eal/windows/eal.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c index > > 67db7f099a..ca3c41aaa7 100644 > > --- a/lib/eal/windows/eal.c > > +++ b/lib/eal/windows/eal.c > > @@ -422,6 +422,10 @@ rte_eal_init(int argc, char **argv) > > /* create a thread for each lcore */ > > if (eal_thread_create(&lcore_config[i].thread_id) !=3D = 0) > > rte_panic("Cannot create thread\n"); > > + ret =3D pthread_setaffinity_np(lcore_config[i].thread_i= d, > > + sizeof(rte_cpuset_t), &lcore_config[i].cpuset); > > + if (ret !=3D 0) > > + RTE_LOG(DEBUG, EAL, "Cannot set affinity\n"); > > } > > > > /* Initialize services so drivers can register services during > > probe. */ > > -- > > 2.31.1.windows.1 >=20 > Acked-by: Tal Shnaiderman Tested-by: Idan Hackmon