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 7F355A0C56; Wed, 1 Sep 2021 08:30:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CF7F4013F; Wed, 1 Sep 2021 08:30:07 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1651540041 for ; Wed, 1 Sep 2021 08:30:05 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1811wXRt015262; Tue, 31 Aug 2021 23:30:04 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2104.outbound.protection.outlook.com [104.47.58.104]) by mx0b-0016f401.pphosted.com with ESMTP id 3at0ax8vgs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Aug 2021 23:30:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iL7dVwgHbw3Tb38SZRQv6YeTJEaW+H8WURUQkykUuBeXdpIYHbrFV6PRIYtHgAygjlzL+G2Kd7ExVxysLdrnFLFf+I3ZPbG/bKP3vbiu2Mmde2pURImjr5QwK0kyKo/ZWXNGJbYZbw9u/OonqZffzZveFeirnhwrULWSSgr2BYdEn34lcJOA+Eb4+22ARIt09GY9OYcpbNUaWZwk5lbDljOrUNzHiMS8ETyCZyB+jaJroXzopvXtjIUXtm39eXV18E4/F+Ka7zoUDgpqvioh42V1e2zwAit9/CVsnKZycGxbq4ObNdtLsGl9seWOCR8cthmxaZURF2UXnJsoXhk9Aw== 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; bh=mPbIstJfuamEEQlWTc3S7/NQK1Dnrd5WNG1IUCWFBOM=; b=PpsCv3dgpdlVCqbRy1AU3akEt75sPzq3djqVniNncHU+mYzxmF2CyaLyM8cNxuqosqgtSQ6yURLpp9Pku6gdTrTkCori3jkX5TeWDLB3ADqV1eBHBqYn3C/fXwq7YwlZenzDQpYRVWZodnfffQq7VVFQ4SSXncc8sitV6+K0+gXI7LpB2wOzSIU+Mzvp3E+t+3e9uEOLpnjmz2iOBWloFqUftr/I7LpYlTtF8HxD9IOPtHcRlLtcHohOGCgSi/vcfuBnVC6x2vBV1V/YpvhcDenLuy8c5HXlnS1gSaWs7LwHys3KhvBCNDTejvI+zk+HFm7TX3Y0MphpqdQ82jMz9w== 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=mPbIstJfuamEEQlWTc3S7/NQK1Dnrd5WNG1IUCWFBOM=; b=WV8syeH/IrU6/FJlVXFghF2XUlQ1HdU1wqJX8BNiv9ZoxdQG/Xw/ekcas0D5PI2osqOTaiE9lPf8eGEli1mQzJe6yD/52zKSLF+bHCnSNVKVhs8qa/+bztT7uTPD1z5VORoCR2h79Fs1GT3L1MzsBKMRsfV2KR69PkJLziibDws= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by PH0PR18MB3894.namprd18.prod.outlook.com (2603:10b6:510:20::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17; Wed, 1 Sep 2021 06:30:01 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::94d1:2b0c:115f:5a75]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::94d1:2b0c:115f:5a75%6]) with mapi id 15.20.4457.024; Wed, 1 Sep 2021 06:30:01 +0000 From: Pavan Nikhilesh Bhagavatula To: "Carrillo, Erik G" , Jerin Jacob Kollanukkaran CC: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC 12/15] eventdev: move timer adapters memory to hugepage Thread-Index: AQHXmFbahMjCElktuUO59kZTnsSiBquCrViAgAwWKlA= Date: Wed, 1 Sep 2021 06:30:01 +0000 Message-ID: References: <20210823194020.1229-1-pbhagavatula@marvell.com> <20210823194020.1229-12-pbhagavatula@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b762a29d-027e-45ef-4fa9-08d96d11edae x-ms-traffictypediagnostic: PH0PR18MB3894: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2887; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ulq6NrezYBo8szVBMRU2sS7vDc4ebSvbi+WdE2rvH3PNvjuvpdlzcGFnk2KlHkEcDuYUdNY0i1fjXNZ0rJfoqEmLSawACkYNlJNQQL/S3AUjmn5fjZejOw0NbgubjngPQalKHjqxM4VLRsyGFSJlpFXvjoRDKJv5Khzv14Jh3y8t0lNgq1/NEN78SiAqqPe2eGEnsXNekCDLAgMKtSWakh+6YYAcvGudhUUp/QwpWsvJ2a1+XbUcIZbOUvSpWRe/WXGGM8Xw+uauNfxnb0Mksj+l3PvyjRLdOBWoFLBKoP1P4Z1ouc9+UXjEWMa1sCSCU+rMFWN1jpABunfHEqDEKJML/KFz4FqTiZ/lBhjTEfH04lxgRzyxMnFbPoupe9j6DbrG28Xw8jOwWn+xZJQvAo/ajkaN4nb3spfmIKU0MNmZQpLpI7Wyi3u7mjZCkRMEufn+WTBXhZpAAyYPtADeUXcAXoU9B62DssC/rDdK9dmUO/YDGFbg1rbisI082oCKgP4o92GEA6Fq7xLcpIXWiF/QqgHoI8AgDlIDvEfFBKoPAASmdDdIzIFVkw1tt4gEhlRfE9yP5Oyr0gCF3Piujla/MzzOFj6pOrKA3okBMNjWzn6waYD/lrsPOs6Mmkhw785vvWgbaJiVirvb9iW2cmNDmTOOM44AoGfOZlzkNMly2ScDBZ+PQb03FVEmKuRGDAeVkUf4cf3t7aWcd9Ko+Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(136003)(346002)(396003)(39860400002)(5660300002)(86362001)(83380400001)(52536014)(55016002)(38070700005)(316002)(8936002)(2906002)(54906003)(7696005)(8676002)(122000001)(38100700002)(66446008)(66476007)(6506007)(64756008)(66556008)(4326008)(66946007)(6636002)(71200400001)(9686003)(478600001)(186003)(76116006)(53546011)(110136005)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/uDJem24cZVQ+qzh+z12o3yOXmvLA/vyltPVs91ObbhPNHdt5Mh8BY7oPTY9?= =?us-ascii?Q?oxq4gwxYGq3loQwpUVQO8B43slgNRdyKiU31i2GH6EYEU8a3VHBPGtMHiT9z?= =?us-ascii?Q?DrUZ8/IcbDW+qgOQCpaXOpvPyMl8kYg6seZtmNTPbRkhKi6EEKw3YUD8m+B+?= =?us-ascii?Q?QpQEgLSTyrNEc8t/Q5IVL1znVbtb69BGrs8SiDUbFRaWJM2VW/+HobAunTTE?= =?us-ascii?Q?4rB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vBCBS118ZX+xezHHVbQ?= =?us-ascii?Q?VTYCUDKW0D6sf+a2coWrdHJTeMQZN3Ha63GJslMFbvUcWELrEJq/pHvN0YL2?= =?us-ascii?Q?JC6mtwyIyhPrhbYJhyA+bX7ksAI1WD/wc+hIkGVGp1t7+sAiAlK89YScOQ9E?= =?us-ascii?Q?SoZMZveFTPEbkLoK3YxX0eloyNA9du2i+ihZZAaZ2+wNTbf4zBQt9sx+cW1d?= =?us-ascii?Q?LSQpo+JhJAVw360ucV7x4Blx8WeIHZLiEb4raTBcDtbiEJanyKj5VRkDIa58?= =?us-ascii?Q?91VQVfVczwYalnOBCl+QPgOqN+Lz?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b762a29d-027e-45ef-4fa9-08d96d11edae X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2021 06:30:01.7657 (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: lQ28Hb+TntuW9brP5xNIMNre6tO55+PCCPt3RhK//z6cPC5GIp1JgLhe1u1GnxZbQZbJI/p0S3ajX+VxGH+/Vo2OaMg3bPmSNnTTns0r7EU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB3894 X-Proofpoint-GUID: jMQZ5PMHYWAtQaKu6Wc1fuGhD4rOBJl6 X-Proofpoint-ORIG-GUID: jMQZ5PMHYWAtQaKu6Wc1fuGhD4rOBJl6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-01_02,2021-08-31_01,2020-04-07_01 Subject: Re: [dpdk-dev] [RFC 12/15] eventdev: move timer adapters memory to hugepage 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" >Hi Pavan, > >> -----Original Message----- >> From: pbhagavatula@marvell.com >> Sent: Monday, August 23, 2021 2:40 PM >> To: jerinj@marvell.com; Carrillo, Erik G >> Cc: Ananyev, Konstantin ; >dev@dpdk.org; >> Pavan Nikhilesh >> Subject: [dpdk-dev] [RFC 12/15] eventdev: move timer adapters >memory to >> hugepage >> >> From: Pavan Nikhilesh >> >> Move memory used by timer adapters to hugepage. >> Allocate memory on the first adapter create or lookup to address both >> primary and secondary process usecases. >> > >Is the motivation for this change performance or space improvement? >Can we add something to the commit message to say? This was supposed to be a perf improvement change, I will be dropping this= =20 for event device as it causes an additional load for getting the base addre= ss. For timer adapter I think we can make this change as we return the pointer to the adapter directly, so no additional lookup cost. I will update the commit message in the next version. > >Thanks, >Erik Thanks, Pavan. > >> Signed-off-by: Pavan Nikhilesh >> --- >> lib/eventdev/rte_event_timer_adapter.c | 24 >> +++++++++++++++++++++++- >> 1 file changed, 23 insertions(+), 1 deletion(-) >> >> diff --git a/lib/eventdev/rte_event_timer_adapter.c >> b/lib/eventdev/rte_event_timer_adapter.c >> index ae55407042..c4dc7a5fd4 100644 >> --- a/lib/eventdev/rte_event_timer_adapter.c >> +++ b/lib/eventdev/rte_event_timer_adapter.c >> @@ -33,7 +33,7 @@ RTE_LOG_REGISTER_SUFFIX(evtim_logtype, >> adapter.timer, NOTICE); >> RTE_LOG_REGISTER_SUFFIX(evtim_buffer_logtype, adapter.timer, >NOTICE); >> RTE_LOG_REGISTER_SUFFIX(evtim_svc_logtype, adapter.timer.svc, >> NOTICE); >> >> -static struct rte_event_timer_adapter >> adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX]; >> +static struct rte_event_timer_adapter *adapters; >> >> static const struct event_timer_adapter_ops swtim_ops; >> >> @@ -138,6 +138,17 @@ rte_event_timer_adapter_create_ext( >> int n, ret; >> struct rte_eventdev *dev; >> >> + if (adapters =3D=3D NULL) { >> + adapters =3D rte_zmalloc("Eventdev", >> + sizeof(struct >rte_event_timer_adapter) * >> + >> RTE_EVENT_TIMER_ADAPTER_NUM_MAX, >> + RTE_CACHE_LINE_SIZE); >> + if (adapters =3D=3D NULL) { >> + rte_errno =3D ENOMEM; >> + return NULL; >> + } >> + } >> + >> if (conf =3D=3D NULL) { >> rte_errno =3D EINVAL; >> return NULL; >> @@ -312,6 +323,17 @@ rte_event_timer_adapter_lookup(uint16_t >> adapter_id) >> int ret; >> struct rte_eventdev *dev; >> >> + if (adapters =3D=3D NULL) { >> + adapters =3D rte_zmalloc("Eventdev", >> + sizeof(struct >rte_event_timer_adapter) * >> + >> RTE_EVENT_TIMER_ADAPTER_NUM_MAX, >> + RTE_CACHE_LINE_SIZE); >> + if (adapters =3D=3D NULL) { >> + rte_errno =3D ENOMEM; >> + return NULL; >> + } >> + } >> + >> if (adapters[adapter_id].allocated) >> return &adapters[adapter_id]; /* Adapter is already >loaded >> */ >> >> -- >> 2.17.1