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 07D5CA0536; Thu, 23 Jan 2020 18:42:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A065B2956; Thu, 23 Jan 2020 18:42:16 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id B43353B5; Thu, 23 Jan 2020 18:42:14 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00NHat9G014688; Thu, 23 Jan 2020 09:42:14 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=Ej7CWtIBIEAnMZR3pGDWrkNxkepdqC3G6PlyL+YeCrg=; b=h5CjzgZA3GT+ypPcQtHCW9Pchf3N8IbAVXe547U1vk7BnQ+j90x6RylYcJk6q1TYS4Je pBNcD6KKL38rHtJLPHcFrIsFajH7Nrd32ATPmkxpt/r5AF0jZ2Fe9ytIickIO2DI1/xQ QNEHAyMM5sxyL+L7/ssbLT2Vy0xiRdTHsLvRhGjtxDiA+tQvAk74QuixWexgYgKThPJ6 hD8v39UUP1tKef76a2W25m1tsLMBYczydtzNHGGpMfaBX5RyK1ci3yF3c+UgWOOBpiNd t6L51+5rI8B8/HkE1ijdf23Tf+k1S+X/8CYDO+lknsA289XfQUFa0hfgXMShC3u9i5qS 7g== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2xm2dtcv70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 23 Jan 2020 09:42:13 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 23 Jan 2020 09:42:10 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 23 Jan 2020 09:42:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JEjoNZWtPnGQ0MyklQs6ZvUwRxQS6JfB89nnaQTSQpY7/LlpuW7F5+c8k2mq5n8IatSSjaw9KCnJVoEyiVuzebqzMATau7aZ7tgBgvoCUUba2caXFmjbliXON5XAujqp/fQx7tYDoDOl9O457j5N9uNA6qSWPwA1irdo4lPNLI1bzc9Bulk9ijtQYrL9sSYjnKKZzRjRScZOciKtKaqX17fIBtHDL/cGgsmw+IDVc8TFqijW5nCJdLcQ600jo1E0IOzKlVxwP4qp0CSlj4BupUUmLWLQ8pj6VHHvzVUX7eFzzKpElUoviOotSmBjsl4Z9xxUa66FXHLaaXGrtZlsuA== 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=Ej7CWtIBIEAnMZR3pGDWrkNxkepdqC3G6PlyL+YeCrg=; b=W+1GtzxYa19b/FQJyF0c6GYIs3qbQXE20XfJ47L7fRW+WBz72C1ix2rdhP0mq66PqV9uyT5WSS3AFTX27U/L/7KRLQlK7/bgIEK8is92A0uBC9bsAOq5H5EDS1TGbu17NipjB0CdMtAL3nPwFzJGj+1MI2KJ/drG+yB6QcqoyhuuP+JzkVYeVZmaQXLjC7vN2PXAZ4zo5wbVEj4N2juzFtNseTdxGNW+y2OUfhk3xxOh7rF+2zl+mHj0FjzYx2bAD50fifAAvxR50Dh5bIXivs1iz/R9FI/3MLObphnUvRqv2+R9HHiwlS5ZIHV462M6s8eyARUdhNFOa8Snh5ac+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ej7CWtIBIEAnMZR3pGDWrkNxkepdqC3G6PlyL+YeCrg=; b=JdoeJOPfexzJ5D+E481EEFTB9QIJn6M7LymkUBNsNZpsZEutelavFblofds6P9fJ8vQLwSp2SFIT91ydfJQL0udQfSwXOH3DBlnSkX7PEfEuufym3OwipgY1dpZjbWTS+IlPb1i05Kme8X0C0MZaeOkcQrURKqjO5PKhpyzjP4Q= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (20.179.20.19) by MN2PR18MB2831.namprd18.prod.outlook.com (20.179.21.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.21; Thu, 23 Jan 2020 17:42:09 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::6de0:6ead:9fc:5beb]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::6de0:6ead:9fc:5beb%3]) with mapi id 15.20.2644.028; Thu, 23 Jan 2020 17:42:09 +0000 Received: from outlook.office365.com (115.113.156.2) by BM1PR01CA0158.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20 via Frontend Transport; Thu, 23 Jan 2020 17:42:07 +0000 From: Harman Kalra To: "Wang, Xiao W" CC: "Hunt, David" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [EXT] RE: [dpdk-dev] [PATCH 2/2] l3fwd-power: fix interrupt disable Thread-Index: AQHVz6QkOqWwHDQUfEysjS++jyKrYaf3DQqA//+1NgCAAcdAAA== Date: Thu, 23 Jan 2020 17:42:08 +0000 Message-ID: <20200123174149.GA11834@outlook.office365.com> References: <20200121030657.39048-1-xiao.w.wang@intel.com> <20200121030657.39048-3-xiao.w.wang@intel.com> <20200122133004.GA45794@outlook.office365.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0158.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::28) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cd3a9e80-fd8c-4e7c-d1c9-08d7a02b91e7 x-ms-traffictypediagnostic: MN2PR18MB2831: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 029174C036 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(396003)(136003)(39860400002)(366004)(189003)(199004)(55236004)(26005)(186003)(16526019)(6506007)(53546011)(6916009)(7696005)(33656002)(52116002)(81166006)(956004)(8676002)(81156014)(8936002)(9686003)(86362001)(2906002)(71200400001)(1076003)(64756008)(66946007)(66556008)(54906003)(478600001)(316002)(5660300002)(4326008)(55016002)(66446008)(66476007)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2831; H:MN2PR18MB2848.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: a0WFWnSbqUYKI0g5bFwo2aGGNbfWlhQunrPoMu2elQ7jUvPWBbUAbTkr1w53kAouISvzkU9zcKaWdvDc0tnXCD3Ab44K8KboMqZVVmtNTOBlL7jn8bhLqBPTxZOJ6w5XHv1P8d9F4UF5egfBza7QHFP7vQ22tvMvs36mJvtVkX8wmPYfQ2XoDbCkAVg6dUJ4wj7oBdqE4D4e95nZTrK12OsbWHSN4zdfRKW5wdEjvkUGxaDZnUlWBDxMKIRKlGLc56N5M5YkfIdmlqmpSLk2ibtpjLJ/pVq/+6k2iLrUcudduQ3VoRYHUpefKRGt/bQXvcwZfFVUN4DJ+bkFuvyJISbb6gk5lNsnpcQlUmEiwUIAQCj6qZH6K7BDg0Nc1Xn77upsVsXZMdsrJtJsQ/ahg+2YV8JBBPc3CEtL5mEcqyRI0cdoDFeysVn1jUrqadh14sgeox/woVzi9IxGstVyF8UilffoZVPs8JMFZ3ZIH+s= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: cd3a9e80-fd8c-4e7c-d1c9-08d7a02b91e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2020 17:42:08.9890 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: gCTBkT55BW97izd5Isi2U43ICJd8RRsNF0L7OVdfidT63k6fc9DHO0m6Shio8HF3YSkr7nQyy3WA32ww8GljtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2831 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-23_10:2020-01-23, 2020-01-23 signatures=0 Subject: Re: [dpdk-dev] [EXT] RE: [PATCH 2/2] l3fwd-power: fix interrupt disable 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" On Wed, Jan 22, 2020 at 02:32:26PM +0000, Wang, Xiao W wrote: > External Email >=20 > ---------------------------------------------------------------------- > Hi Kalra, >=20 > This patch is more about bug fix on user interrupt, no powering saving tu= ning. > The target scenario is, a worker core is dealing with 2 Rx queues, and it= go sleep due to no traffic for some time, > and then the first queue has new traffic arrived, and wakes up this core,= so this worker core is busy polling again. > The issue is that even though the core comes to polling state, the second= queue will still send interrupt (if packet flushes in) to host.. This is w= hat the core doesn't need, and unnecessary MSIX messages can cause throughp= ut to degrade. >=20 > Best Regards, > Xiao >=20 Hi Xiao Thanks for the explaination, I tested the scenario as explained by you with and without your patch. I do see a huge difference in no of interrupts sent by other queues and it is worth avoiding these interrupts as they have no significance.=20 Thanks Harman Tested-by: Harman Kalra > > -----Original Message----- > > From: Harman Kalra > > Sent: Wednesday, January 22, 2020 9:30 PM > > To: Wang, Xiao W > > Cc: Hunt, David ; dev@dpdk.org; stable@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 2/2] l3fwd-power: fix interrupt disable > >=20 > > On Mon, Jan 20, 2020 at 10:06:57PM -0500, Xiao Wang wrote: > > > Since all related queues' interrupts are turned on before epoll, we n= eed > > > to turn off all the interrupts after wakeup. This patch fixes the iss= ue > > > of only turning off the interrupted queues. > > > > > > Fixes: b736d64787fc ("examples/l3fwd-power: disable Rx interrupt when > > waking up") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Xiao Wang > > > --- > > > examples/l3fwd-power/main.c | 13 +++++++------ > > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > > > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.= c > > > index ffcc7ecf4..e9b2cb5b3 100644 > > > --- a/examples/l3fwd-power/main.c > > > +++ b/examples/l3fwd-power/main.c > > > @@ -880,9 +880,6 @@ sleep_until_rx_interrupt(int num) > > > port_id =3D ((uintptr_t)data) >> CHAR_BIT; > > > queue_id =3D ((uintptr_t)data) & > > > RTE_LEN2MASK(CHAR_BIT, uint8_t); > > > - rte_spinlock_lock(&(locks[port_id])); > > > - rte_eth_dev_rx_intr_disable(port_id, queue_id); > > > - rte_spinlock_unlock(&(locks[port_id])); > > > RTE_LOG(INFO, L3FWD_POWER, > > > "lcore %u is waked up from rx interrupt on" > > > " port %d queue %d\n", > > > @@ -892,7 +889,7 @@ sleep_until_rx_interrupt(int num) > > > return 0; > > > } > > > > > > -static void turn_on_intr(struct lcore_conf *qconf) > > > +static void turn_on_off_intr(struct lcore_conf *qconf, bool on) > > > { > > > int i; > > > struct lcore_rx_queue *rx_queue; > > > @@ -905,7 +902,10 @@ static void turn_on_intr(struct lcore_conf *qcon= f) > > > queue_id =3D rx_queue->queue_id; > > > > > > rte_spinlock_lock(&(locks[port_id])); > > > - rte_eth_dev_rx_intr_enable(port_id, queue_id); > > > + if (on) > > > + rte_eth_dev_rx_intr_enable(port_id, queue_id); > > > + else > > > + rte_eth_dev_rx_intr_disable(port_id, queue_id); > >=20 > > Hi Wang > >=20 > > I tested this patch on octeontx2 platform and have some queries > > regarding the same: > > Difference what I observed with this patch is, you are disabling > > interrupts for all the queues handled by the core which woke up but > > what is the advantage of doing so? > > I dont see any difference wrt octeontx2, with and without this patch in > > term of power saving. Can you please explain what I am missing. > >=20 > > Thanks > > Harman > >=20 > > > rte_spinlock_unlock(&(locks[port_id])); > > > } > > > } > > > @@ -1340,9 +1340,10 @@ main_loop(__attribute__((unused)) void > > *dummy) > > > else { > > > /* suspend until rx interrupt triggers */ > > > if (intr_en) { > > > - turn_on_intr(qconf); > > > + turn_on_off_intr(qconf, 1); > > > sleep_until_rx_interrupt( > > > qconf->n_rx_queue); > > > + turn_on_off_intr(qconf, 0); > > > /** > > > * start receiving packets immediately > > > */ > > > -- > > > 2.15.1 > > >