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 0132BA04BB; Fri, 25 Sep 2020 04:19:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 689791DFF1; Fri, 25 Sep 2020 04:19:31 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2103.outbound.protection.outlook.com [40.107.243.103]) by dpdk.org (Postfix) with ESMTP id B0B901DFEC for ; Fri, 25 Sep 2020 04:19:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YcBe43YcNxqMO37WrySBBwgynbSRCEAHVVyy2xwWsytcnNKojH6zEaTXBdHeX7Dc9om1GT2uYeex2rvdyCimOeSjwBmEYnVsV9kTQvw8GJqHp/GN6r5hI7KtpBfA571gBRXU3WZ40Pn7A1FHlj+10ZA+GIfAC7SqY2fqfGvFuqXvxwN9x68Uhdj1/aP7NE2wkortPArb5AqiQYGZlTxQyDMkePzTWKO+czQN9W45V8ydw+OIFnFdVsTDlyL4IBXMX+2XC0ts9blf9WatyBZ6p4ozDCNbZMKvEykld1NPdlV5gXVvNQDbVX1fpCqXv2utRaVjT5FHdd0S4u4yQjZhkg== 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=tpVV1bGUvElexVmvAY6450mDmtRUZqmOvyIfuAXIRR0=; b=gtUwhwCrHsf+RP8BhdnXh3RliXs7YbOJ9FT/ND8TFaWu5LQUxjfi8zJtJhJu8RH7Bj09Tn7ww6evHcfK3VPUr3TGX1SXvfAP6dsfbIiikaZDp8actArLBJ8z7IY1HHerm8jhHrzdoAn6hTxtSVgj6/2bmik+BvQ9gpeqNKGv8HBqxw1MSAbwaAgcuqRn32U+bpg052u/D3jmDEXYV3Hw80GO3CC1ikNx0cXmPhmyXpjfTPweW7CV429hWlZVMXrykztVU+9gmG/Z8+nFwGAFSR3/jEM8Bt28qPPeuciPNt/OKoj2O3OvzEcRlgyLJ5MkwifLFstuU3wuApyNCyY/bA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tpVV1bGUvElexVmvAY6450mDmtRUZqmOvyIfuAXIRR0=; b=DwJddLxMMj0AGDcZo1+O38S7i+SHdfxYjVVuWcjFD0HpbHJgOv0pE09mWoHGO9oSWnUe5d6dfZPpJm/Ddq7ck59h/gyrnPywQmucNSpoC2yFgn7wgCRsmZM92kpHpfz27cYbmOpVRDA+bfOPv8hhhXTl+qMX5W216R4e8+Utqf0= Received: from BY5PR21MB1380.namprd21.prod.outlook.com (2603:10b6:a03:23b::19) by BYAPR21MB1302.namprd21.prod.outlook.com (2603:10b6:a03:10b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.12; Fri, 25 Sep 2020 02:19:25 +0000 Received: from BY5PR21MB1380.namprd21.prod.outlook.com ([fe80::8836:b7ce:beb3:91ae]) by BY5PR21MB1380.namprd21.prod.outlook.com ([fe80::8836:b7ce:beb3:91ae%4]) with mapi id 15.20.3433.007; Fri, 25 Sep 2020 02:19:25 +0000 From: Khoa To To: Dmitry Kozlyuk CC: "dev@dpdk.org" , Narcisa Ana Maria Vasile , "Dmitry Malloy (MESHCHANINOV)" , Pallavi Kadam Thread-Topic: [EXTERNAL] [dpdk-dev] [PATCH 2/2] eal/windows: implement alarm API Thread-Index: AQHWh9Gm5/SuSJDZDU2M36+ME6jDN6lzdBGwgATyZwCAAEP9UA== Date: Fri, 25 Sep 2020 02:19:24 +0000 Message-ID: References: <20200911002207.31813-1-dmitry.kozliuk@gmail.com> <20200911002207.31813-3-dmitry.kozliuk@gmail.com> <20200925003834.2266e7a2@sovereign> In-Reply-To: <20200925003834.2266e7a2@sovereign> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=9d61f908-2ad0-4ea4-bc75-ef5ab35902ce; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-09-25T01:41:56Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [67.170.72.207] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 4b7ecd46-ac69-422e-8ca5-08d860f96c2f x-ms-traffictypediagnostic: BYAPR21MB1302: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0EqUWNcMUuY9ySBAGxLO7Qu4dtAyZhF/77519IwyDO3VFdUGfax0inJU/zrEHpBBp3+yy4zcXubLq1XumLS9A3QisekDy4IEZONXrq3Y39/AiunFfn/o8NiSIUTHIFGI4V2jKjr7wEZiskzDsIgkwGzd6EOghe/1cvJ5/bAi2+Cg/P93Kla5Cps/eqSvgLaGtvfxG8ThErnLTvukmP6/utMvb6H3V+GqgZJRf32Ioh7H4xuRfXxkRx1g3xx7n5tsqajoo8jo+XOQLnoYc0PJNljchAgOPynbYtQTonGE6RDG/tbgllYSdNtJdpeAU5E5m7QyMyu99N2mAZPRS/TYdQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR21MB1380.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(376002)(346002)(39860400002)(136003)(52536014)(8676002)(82960400001)(8990500004)(82950400001)(186003)(4326008)(33656002)(83380400001)(8936002)(10290500003)(6916009)(26005)(2906002)(86362001)(5660300002)(6506007)(76116006)(53546011)(66556008)(9686003)(66946007)(66476007)(71200400001)(55016002)(54906003)(64756008)(316002)(7696005)(66446008)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: tmVsgisZ/Ddjxe7WgKAfn3nRAy/noK5nwdWKMnZQwT4cT2yXCRbia2l9rlqooa9avy3aaa5DCMWqdt/5MqcvghfXSPynEiQE6aXmJ0eK9H8k3LrjRHAHsxUjm7n5GC+DSCmF58eQyiIwl32/0bSdXq0IIj2YbbCsxvbQRVDAfyvtY+Y5sjWlJvcgS83YPehbrk0+bCtgkqSIIhrTJ/G5FW5rAjL50w+u6qrDYceNlov1BulfCEfHmktDabO8CdmIEZZFzdpfF0/4ZpkWUfGBLqVqs1Q9lBzugIp3bB/ZHHIfYknLHp/2iu6WeeQNcSNcY8r9oPxwWbBh4HNRLinNd3o59eadTKicoQskTupMBeJznlN4rdWIsJKcySlBEDuFCmDcQCGJ2If6MWeSgnhj2nh5UoMahdPZQlRmZISnzuM2L+Iz5GzIQsgudJZWzx+BJ7SLP4t4Jtm3dWeECHYa0tuP8ap4s96BBKvYXRbJLmiVUxPD3kUvZy0xYf9jCKXN+mnOiirABHSCusrbRe9axywZLGWupD8Ttbg3yj3HlqvobTkMb4C1vSL75HWHENL5Yzz5YZcXncmqPs3qgN1KeXF7DRZ3m30PT5k3WH1/5iDS0+ZoxKamXjqcKMYAyx1zetEGdSl/qdH7q0a3HiBLew== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR21MB1380.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b7ecd46-ac69-422e-8ca5-08d860f96c2f X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Sep 2020 02:19:24.8644 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CinTGE+eQrV5o+KlzgX9YAlSbTL2svA22Z2gNIeMvifgkGQ36GEiKm5dEqicpL2gcMgiWlzpTbtxRkdKMGQe7IR6o9TBYgvwSsoxaysZIeM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR21MB1302 Subject: Re: [dpdk-dev] [EXTERNAL] [PATCH 2/2] eal/windows: implement alarm API 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" > -----Original Message----- > From: Dmitry Kozlyuk > Sent: Thursday, September 24, 2020 2:39 PM > To: Khoa To > Cc: dev@dpdk.org; Narcisa Ana Maria Vasile > ; Dmitry Malloy (MESHCHANINOV) > ; Pallavi Kadam > Subject: Re: [EXTERNAL] [dpdk-dev] [PATCH 2/2] eal/windows: implement > alarm API >=20 > Hi Khoa, >=20 > Disclaimer: my experience with interrupts and alarms is limited. >=20 > > Since all alarm callbacks are scheduled on the interrupt thread, looks = like > this implementation of rte_eal_alarm_set() would create a head-of-line > blocking issue, as the callbacks are serialized one after the other. > > Is that correct? If so, while this does not violate the API contract, = it seems > undesirable. >=20 > Yes, the issues is valid, however, probably irrelevant. In DPDK, alarms > are considered on par with interrupts. Much like kernel ISRs, DPDK interr= upt > callbacks are supposed to be short. When they need to do more work, there > are > facilities to schedule deferred work (again, somewhat like NT kernel DPC)= : > rte_ctrl_thread_create(). Thank you for clarification on the usage model. > > I'm wondering why in both Linux and this Windows implementation, we > don't spawn a new thread to service each alarm independently. >=20 > These threads would need cores to be scheduled on. If we set affinity to = the > primary lcore, head-of-line issue is back. If we leave that to the OS, th= ey > may land on data-plane cores with a context switch. >=20 > > And, regardless of the Linux implementation, should we consider another > implementation that avoids the head-of-line blocking issue? >=20 > I don't think so. Looking at PMD code, timers are mostly used during > initialization or reconfiguration. Sounds good. The implementation looks good.=20 I'll take another pass at the code for any additional feedbacks.