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 00685A04DD; Wed, 28 Oct 2020 17:54:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4EE305A51; Wed, 28 Oct 2020 17:54:57 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 042D15958 for ; Wed, 28 Oct 2020 17:54:54 +0100 (CET) IronPort-SDR: WvZjJ6ZdTuJA6cG6jDvwa+DznsDo+wpmWGPFPJ9QqZ0EIUBTvwsA6ZKYybu2NYevVW0ok4zpR8 tt4Ix5IEUGWg== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="156068161" X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="156068161" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 09:54:52 -0700 IronPort-SDR: ffZwTCnM2ff/KCvb8W1q+vQUOQWT/YFfir7jVL9Y1ZXYe7n8aqZqBEiKR3K2uiB4/LxnRwwV+J B80chWNpLiew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="526398266" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga005.fm.intel.com with ESMTP; 28 Oct 2020 09:54:51 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 28 Oct 2020 09:54:51 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 28 Oct 2020 09:54:51 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.106) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 28 Oct 2020 09:54:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IHrYovdYb806HHde4m2jjrUF5zP67v00wTdcrQmFH37ySW58TTMEtjqc6q//tKeerqQSJUKjnSSVqDmA47udTaYdSBIvBN5SwWq5YqwTQQWj3Ybt9AA6S6vjXJEKAedca474+nZVemyoTfDYp3KABtqCpoxFeo/ZuVysefJVi3eqhelAbn3p+ypm/qATd8XBm86XCKxbW9DACBHwgSZ0vguYmIJn1YZNlhX3f4riOWUILOeUrpmz8S8mUXveWydMb/ZVnkwZPPLTa9oz0s3f9pQoE0sqpvQEONGINYdUVf/vS6kJ7UyY0GWnYMzbX0aSmigVCy9bMPmnY7OrUc5Aag== 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=DsUkOH5JHO8vtj1KyIkEZ1+Xf8O78Dde1kIZ/yShs0s=; b=WC4JSzoOkuYNmFsjAhibU0FGOyYAIFV6kd8aMTTZRRE9VbM7HOnJAcK7k3WO12Kt6cxI8UdI1wLkGW6TVp1eDRr+RrF7DUMMmRDoHWylsSzQZSmF4qV4MFUsjiJOdrBzNF49ewdaAlWp2Dp8ufH9qACkrmWRLbXtQz6vikykitfuebI9Uia/vlD0xBqG+WO0fcR18mA2ezmpm2wCYpsehvXRkeN8J1ndPMDu87AaD4Hj5DaMqjc0SOwI1Um6a+y+wu5aYQc6ozE/3Hzx3pIOmTOICP9sd1WzsxT9ZCFShZzEE8rQX9FCrZ7s/5MZnb/RdT+HXRPn6+I+Mo/AM65B1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DsUkOH5JHO8vtj1KyIkEZ1+Xf8O78Dde1kIZ/yShs0s=; b=y5Fpp8rluYN8KI3A5DEcadXiu1gj+lw36IArbnyqe+SeRtiR8xrqES7XUd0dlpZGGxSx4Rd3AKKFpET3QFyYyuaVlL38HAQsnww7AHpqejyAcgGycu8e5sTKpZB+aswFUJMlbUP9LE/CXQkvHdOiyHUzN+h8R6YPe4HZpkdAQMo= Received: from SN6PR11MB3103.namprd11.prod.outlook.com (2603:10b6:805:d7::13) by SN6PR11MB2829.namprd11.prod.outlook.com (2603:10b6:805:62::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.25; Wed, 28 Oct 2020 16:54:41 +0000 Received: from SN6PR11MB3103.namprd11.prod.outlook.com ([fe80::41fb:70e6:6102:a616]) by SN6PR11MB3103.namprd11.prod.outlook.com ([fe80::41fb:70e6:6102:a616%7]) with mapi id 15.20.3477.028; Wed, 28 Oct 2020 16:54:41 +0000 From: "McDaniel, Timothy" To: "Ma, Liang J" , Jerin Jacob CC: "Ananyev, Konstantin" , Thomas Monjalon , dpdk-dev , "Ruifeng Wang (Arm Technology China)" , "Wang, Haiyue" , "Richardson, Bruce" , "Hunt, David" , Neil Horman , "Eads, Gage" , Marcin Wojtas , Guy Tzalik , Ajit Khaparde , "Harman Kalra" , John Daley , "Wei Hu (Xavier" , Ziyang Xuan , "matan@nvidia.com" , Yong Wang , "david.marchand@redhat.com" Thread-Topic: [PATCH v10 0/9] Add PMD power mgmt Thread-Index: AQHWrHHICQVHLzlH3kC1dmLE2858iKmrnCUAgAFpQ4CAAAQNgIAACQoAgAAJ0QCAAATogIAABV+AgAABkgCAAALOAIAAAkKAgAAN9oCAAABWAA== Date: Wed, 28 Oct 2020 16:54:41 +0000 Message-ID: References: <1603494392-7181-1-git-send-email-liang.j.ma@intel.com> <20201028133507.GC29706@sivswdev09.ir.intel.com> <2373759.1G5EZAqFcn@thomas> <20201028164735.GG29706@sivswdev09.ir.intel.com> In-Reply-To: <20201028164735.GG29706@sivswdev09.ir.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [162.251.9.49] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 57e9c1b8-f8c4-4ebe-c758-08d87b622a2d x-ms-traffictypediagnostic: SN6PR11MB2829: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr 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: qe4xGpPNGhY/raTTm2g5eDB7oizhod2t4n8wV38tFDyMzzlWYcA/tXfELdN2btOfypINCkk98JOv0tRh64UsDq8wRZUQ5sgkYIWMpXjF9cADDQkgDg2cC9VU4IRhBRdWMmOzKMtoYXcs99GXeAYPK7uhH1Nvx1KJtAVlK/Xh+jAJrtRNlNETs20N0avTr9zhNsqu6aBt10C7bInyewUnil3qr3KGH4AT/RTlTGR81pvhFSo867iHEsAFflnF3pljRHm6QZVgMAiLD/KoXMzwSI/IGQT+GnuHX2LSYDhuEXSpoHS2bU2l0Kd0SWvo2w0bH/02xEJKOGy04ru9alXVGA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3103.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(366004)(376002)(136003)(396003)(83380400001)(86362001)(4326008)(33656002)(66446008)(8676002)(66556008)(2906002)(71200400001)(5660300002)(64756008)(186003)(76116006)(316002)(9686003)(54906003)(478600001)(53546011)(8936002)(7696005)(26005)(66946007)(110136005)(55016002)(66476007)(6506007)(52536014)(7416002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: feIBqKa9BFmCtFMIywNh66aFi/nmNCe7r3SqntI90unZviqvuTmO3g4uApHMmqnDBmrcuYJz9RFm5y2Qzk7MI9gB2gvynsmkt5aAYOIe3fdBzwYihsCFLpNcf5Bd5QPETee0Um5kNMbVPyK0dMY8tm6+oiiSkGQ86iXNI+WzAPSdo0DxDfXNBDoWyEJMLychv5KHN2PCFWBbAn/ly57m/TUFvN14TMCoNP2Bd3T76s5RJSrFylbudikGefevMyg20iTWd6tLSmRR+dsOm/MOATA/v+E1S3sFObGD2e+bc+ic3XEhwJts3FD3vz7PfvkFYACnSW8V32l9+xuAb/csE7Ehkv1KwyPDHcpnn4mBLJ7cjFMoSzGWKVvv8y18fFiIY4F37Bowpw7kK3gScKHHM75+CuIrYlN7w5KUQA4ptwnxdj4moKIlf/FMtddwO2uQWUVsNXq9iIARWZyH16VaCtVppB64dDQWoJPMLUuSYM/H2xEarA/L6D07YXzsWG4hmoSZe/7q45e+X+I0gGJxIUQ5E3m6ofEnH3FgyLaIs/L0Yy040JraItCkqNKtTwAX3hUVWKJUJDy1scMOREpuO3p4myRrrS8UZ/xxPgiV6yzfjGKMxWpkE8ddkBGy7fjCjx8Z/hWdEHZUi2cay7+ysA== 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: SN6PR11MB3103.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57e9c1b8-f8c4-4ebe-c758-08d87b622a2d X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2020 16:54:41.5071 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hddHW/I7sLkm332h/T5i7hCTJgTXZqp7afFEB9KifQoZ7xxUlEYyLtw1NI8FVoDmJInfTUqW0S7EOEGXFXlUCY4932uFmOA+eiuxFrTgyCQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2829 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v10 0/9] Add PMD power mgmt 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: Ma, Liang J > Sent: Wednesday, October 28, 2020 11:48 AM > To: Jerin Jacob > Cc: Ananyev, Konstantin ; Thomas Monjalon > ; dpdk-dev ; Ruifeng Wang (Arm > Technology China) ; Wang, Haiyue > ; Richardson, Bruce ; > Hunt, David ; Neil Horman ; > McDaniel, Timothy ; Eads, Gage > ; Marcin Wojtas ; Guy Tzalik > ; Ajit Khaparde ; > Harman Kalra ; John Daley ; Wei > Hu (Xavier ; Ziyang Xuan > ; matan@nvidia.com; Yong Wang > ; david.marchand@redhat.com > Subject: Re: [PATCH v10 0/9] Add PMD power mgmt >=20 > On 28 Oct 21:27, Jerin Jacob wrote: > > On Wed, Oct 28, 2020 at 9:19 PM Ananyev, Konstantin > > wrote: > > > > > > > > 28/10/2020 14:49, Jerin Jacob: > > > > > > > > > On Wed, Oct 28, 2020 at 7:05 PM Liang, Ma > wrote: > > > > > > > > > > > > > > > > > > > > Hi Thomas, > > > > > > > > > > I think I addressed all of the questions in relation = to V9. I don't > think I can solve the issue of a generic API on my own. From the > > > > > > > > Community Call last week Jerin also said that a generic was > investigated but that a single solution wasn't feasible. > > > > > > > > > > > > > > > > > > I think, From the architecture point of view, the specifi= c > > > > > > > > > functionally of UMONITOR may not be abstracted. > > > > > > > > > But from the ethdev callback point of view, Can it be abs= tracted in > > > > > > > > > such a way that packet notification available through > > > > > > > > > checking interrupt status register or ring descriptor loc= ation, etc > by > > > > > > > > > the driver. Use that callback as a notification mechanism= rather > > > > > > > > > than defining a memory-based scheme that UMONITOR expects= ? > or similar > > > > > > > > > thoughts on abstraction. > > > > > > > > > > > > > > I think there is probably some sort of misunderstanding. > > > > > > > This API is not about providing acync notification when next = packet > arrives. > > > > > > > This is about to putting core to sleep till some event (or ti= meout) > happens. > > > > > > > From my perspective the closest analogy: cond_timedwait(). > > > > > > > So we need PMD to tell us what will be the address of the con= dition > variable > > > > > > > we should sleep on. > > > > > > > > > > > > > > > I agree with Jerin. > > > > > > > > The ethdev API is the blocking problem. > > > > > > > > First problem: it is not well explained in doxygen. > > > > > > > > Second problem: it is probably not generic enough (if we un= derstand > it well) > > > > > > > > > > > > > > It is an address to sleep(/wakeup) on, plus expected value. > > > > > > > Honestly, I can't think-up of anything even more generic then= that. > > > > > > > If you guys have something particular in mind - please share. > > > > > > > > > > > > Current PMD callback: > > > > > > typedef int (*eth_get_wake_addr_t)(void *rxq, volatile void > > > > > > **tail_desc_addr, + uint64_t *expected, uint64_t *mask, uint8_t > > > > > > *data_sz); > > > > > > > > > > > > Can we make it as > > > > > > typedef void (*core_sleep_t)(void *rxq) > > > > > > > > > > > > if we do such abstraction and "move the polling on memory by > HW/CPU" > > > > > > to the driver using a helper function then > > > > > > I can think of abstracting in some way in all PMDs. > > > > > > > > > > Ok I see, thanks for explanation. > > > > > From my perspective main disadvantage of such approach - > > > > > it can't be extended easily. > > > > > If/when will have an ability for core to sleep/wake-up on multipl= e events > > > > > (multiple addresses) will have to either rework that API again. > > > > > > > > I think, we can enumerate the policies and pass the associated > > > > structures as input to the driver. > > > > > > What I am trying to say: with that API we will not be able to wait > > > for events from multiple devices (HW queues). > > > I.E. something like that: > > > > > > get_wake_addr(port=3DX, ..., &addr[0], ...); > > > get_wake_addr(port=3DY,..., &addr[1],...); > > > wait_on_multi(addr, 2); > > > > > > wouldn't be possible. > > > > I see. But the current implementation dictates the only queue bound to > > a core. Right? > Current implementation only support 1:1 queue/core mapping is because of > the limitation of umwait/umonitor which can not work with multiple addres= s > range. However, for other scheme like PASUE/Freq Scale have no such > limitation. > The proposed API itself doesn't limit the 1:1 queue/core mapping. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Note: core_sleep_t can take some more arguments such as > enumerated > > > > > > policy if something more needs to be pushed to the driver. > > > > > > > > > > > > Thoughts? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This API is experimental and other vendor support can b= e added > as needed. If there are any other open issue let me know? > > > > > > > > > > > > > > > > Being experimental is not an excuse to throw something > > > > > > > > which is not satisfying. > > > > > > > > > > > > > > > > > > > > > > > It would be nice if the low level definition of the UMWAIT and UMONOTOR ins= tructions were split out into their own inline function or macro so that any PMD could use the intri= nsic without being tied to ethdev or any of the other logic associated with this patch set. This would be simil= ar to rte_wmb, and so on