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 CFB10A0C4D; Tue, 24 Aug 2021 15:51:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 961F9406A3; Tue, 24 Aug 2021 15:51:03 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id CDC0140687 for ; Tue, 24 Aug 2021 15:51:01 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10085"; a="239462727" X-IronPort-AV: E=Sophos;i="5.84,347,1620716400"; d="scan'208";a="239462727" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2021 06:50:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,347,1620716400"; d="scan'208";a="597587988" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga001.fm.intel.com with ESMTP; 24 Aug 2021 06:50:37 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2242.10; Tue, 24 Aug 2021 06:50:37 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Tue, 24 Aug 2021 06:50:36 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Tue, 24 Aug 2021 06:50:36 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Tue, 24 Aug 2021 06:50:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AW4LPcaG52M25lxxQ/AHLWWHRlT9hz+p8dVSrZgoC6W4w4FNgV4tS2vcsnNk5Qz2zJZoxNjUkUXTlbJrxInJx36TRObkWYRUoZesuRn0rfopcRTs++1xvFuQbx+Jp4SM/HRkAXVZeCkzxXHN6ge3wnTZ0E6x72iJuTM9qSjE29ugkzredWw3Long1v6YuBzHqJ/jAhLJf3g579v7RCN2ezObczMCLaDFDlunqY20P13oMg5t+A7CRS9LXmonuBQkWNhbyljs9rxopjEDCehhP1/JKhVVtPvXBP5641OfTxCGW3eprrBMD8zWLpS5bfJ0SY4orcvka7Fb2kpJry06fw== 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=mZLg2d0A41g7d5s8BKObboTOqNYc6Hcx/TJUWEZHNlU=; b=HLeWxgel387czd5zXdVkmFL/86RoZ59Hg5L3dZ1zL2kkmH+MOcdOhjjOhXzyyTbqg2BlYEuni9x1dfnl6l0okKVHCW3dK9/d8aUczqjtMpAi5Rc+MnKiRZrvd6MjwDndP7WG9k/RUmZYgKWjCWfikyXAh/wu5ttlF5r3tcbPHfKPiY5sf2cUpUNHS1A2T5HTo8aUI/6K6KUzYQGiHOz30AnpVjGSnDeU7h4y3U1bV1lDhIst1J0rwge3G8qgLTMcamxG6vyNYMLIvU7Y7cGOmUK6NbqC7NgSCvM/4kV9roTuICORskAhHerlhWTM0EzfoRQT57n4B0XvaEAOj3PtRg== 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=mZLg2d0A41g7d5s8BKObboTOqNYc6Hcx/TJUWEZHNlU=; b=xTpJx+KNIQDpwh6z2QgIk29v0li522ZVBJ1S7GSt8tJc400Lci7u8miiCoz/LUyzE/c5ixhnnRqCJYperI+kSpkny7xOqYNbXcbAO6VspCeY27abmmQlusEe3YFyJffmwQgVVDroxWM46LMK6onw/KHeWlvVCOIIRSXJFxLeVzE= Received: from SA2PR11MB5196.namprd11.prod.outlook.com (2603:10b6:806:119::18) by SA2PR11MB4922.namprd11.prod.outlook.com (2603:10b6:806:111::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Tue, 24 Aug 2021 13:50:35 +0000 Received: from SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::d9a8:fc8a:e83a:cb23]) by SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::d9a8:fc8a:e83a:cb23%8]) with mapi id 15.20.4436.024; Tue, 24 Aug 2021 13:50:35 +0000 From: "Carrillo, Erik G" To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" CC: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC 12/15] eventdev: move timer adapters memory to hugepage Thread-Index: AQHXmFbVdD/pXwtgzECVGhx1VczA8KuCrPYQ Date: Tue, 24 Aug 2021 13:50:35 +0000 Message-ID: References: <20210823194020.1229-1-pbhagavatula@marvell.com> <20210823194020.1229-12-pbhagavatula@marvell.com> In-Reply-To: <20210823194020.1229-12-pbhagavatula@marvell.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: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 335edace-3c08-4558-0cd2-08d9670625ec x-ms-traffictypediagnostic: SA2PR11MB4922: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1201; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TT9fvacFRdo4QJFJOuaQKx0cIl0zDM3oWAhUlyEanmknb2A1RlnDKJa5Be2wxtCKmI/8TjcwY9gRMT/ZvCsvOhWt4UuqzV0+dMoqHk5NzFNVuzX5AYk6RUUBVfCD6bB5Cl1VbsWStHWDSy4bsQBQQFgKH6lL8iq5HNaiq0whQ88I5fP0dQUzmxI0puXyglU9UXYEnwxuTfFaRUA9dABTIAJE3QgbQK4Yapae0gXn+OHC2/yVnuifJTTQJVLSjVTNRDRYP0MyqG0o2D21FoAkrpwcUDWAy635na1lgOPDQy+WqnYt/fRzQAJSv2XAq7adm+8UtjnHE/Vat8Cw8hQpMBWGT1Cl4kbylSrPxPWKdGsE88tZLPDgdarXLS3+935fR6mknZx8Gxh3r2o2TG+Mz8V3XfC2r2nzIGn33ii6jbf2IvV2Z/dhIkLlMfrJt/WIZMxNjjVgIWvSmnUFUN/mNe37+lAT2gZJ413cCQnfkVnLCDBJ1bRnrZOHh1NG8cGTA/5GG1QzMR8D+WAjogUwG/+0keMdiu33iQrPaSQ9coxlfO+gNJec1XjpOdkbXJbprUbtvczcNwpbqf4wSTA5WIkjal+DnV7M+3Y1/D+PUFEAspVgcm6YX4eec3SR6N3s3NyktMG+FnExnw2zB/bYnn+Q+CGnpqHRqNINtzrObyGNX45zIwTKhkpCXZuiPrkxH0sdvVyYVLXQ/1LmL4ROlw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR11MB5196.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(376002)(396003)(366004)(346002)(71200400001)(186003)(5660300002)(38070700005)(38100700002)(122000001)(33656002)(55016002)(316002)(53546011)(9686003)(6506007)(7696005)(8936002)(26005)(8676002)(2906002)(110136005)(66476007)(66946007)(76116006)(66446008)(66556008)(64756008)(86362001)(54906003)(83380400001)(4326008)(52536014)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?iErXwiC24KNlwkoUGK4PqFcs6lvqfIkFwpwUhj2xbpBXqj5J8TCb2e5pMZPz?= =?us-ascii?Q?pzIEzBLMcCdSPa2lroei22UONJfAPiYPUrP1xjab/GBGX9Y5klTwy66zaNDx?= =?us-ascii?Q?X1q6DjRZ9BnKCqrEPanwYAkCMn6VxcBpwzfLJkOK9t+1kde3/pxTpdeIlMZF?= =?us-ascii?Q?aqkNpuHmf1mxBEnJE0f2mH2evLIZ/W72t6B+lEawkpKfgWjQqs/dqPHIQhNa?= =?us-ascii?Q?tnEP7qyz4fm309UfhPv9yt4RdwhZTxCnep4tLFNaxuVIa2rydvFEJBz2HlYR?= =?us-ascii?Q?j/KuvvDMKzUvxCBYPODSb/CXAxWTFUhNyJ+dNJl1CpMUk9Bo01hfHvPmExfK?= =?us-ascii?Q?DGWkJV0Ggzdf4SJbLCACRdybEsUl7JeMUQlLZVakVkoCsmrNn1z04pUE4xsc?= =?us-ascii?Q?CG8odR4Uim36qmGOHxrXztx2oqhpHQ1hfGieSwe3OVETipnqsmzNSrft6hTl?= =?us-ascii?Q?ipwKUFSamSqpViT0EKcPAqqocM+jYzGiTA7qetj47lwvjwO1q7/dTY7I4iNo?= =?us-ascii?Q?izMExCX4kdTvptE5klA8wKvMm33um5Y5ZKipH71apazeNsnaZHxrXs0X7kLU?= =?us-ascii?Q?5U8Um78gKNo2rBwyZNA3SVbLjR2YvQT614g5KIDf056zr4emoQtN96BDCAzd?= =?us-ascii?Q?woFEJMnHyM7qBCtpqyvw6dtQqVFDQwW4P/64xghbamLk+9zmxW0coOW6YHxW?= =?us-ascii?Q?Z3up93sIwlO1hOGSUEbfn7wRWWOC/+/1oWqdnIsENPUgUjtNtcMNgIGuuYhM?= =?us-ascii?Q?rP2pdUAUiS4irjXLurDNfa7mF2yKdiYw91xlOi3J0rYURBsNhp8NkRdqlXBi?= =?us-ascii?Q?iXdbpxrMfJ/U511N9bQ4KtlD+auEFVDb6nLB7eGpcDODzFapXK0VEfll2Nec?= =?us-ascii?Q?6wRuEWxZAFWndXpBJ3EFkA1g65s1KbEUd3G261TUMgDMo2JQ9wRGkqBBuHaL?= =?us-ascii?Q?O5M5ifCJci8zBtIdn7GHr0VEUX4LjEsBVHpRHtQBSn/VZ8/C+k/wSchj+Mvn?= =?us-ascii?Q?wyCOSUaTLmhLLpLFN4koXTdchG9O204ZY69oT6GIB+goPASoU1Ej8LCkRJFh?= =?us-ascii?Q?fds3O31cdCdlZJVp3pX/F6toRmLCD1du/IVeorXjmqxZfcqR4AKrV+odSXVP?= =?us-ascii?Q?s2okP++1OowGUCJdztiuccrMWAKeZbhyruKd3oxtfz0DqHjSdiPy/xW4A2uT?= =?us-ascii?Q?jahvkDYR/khJ/aDgvdnWkv2Sc2X5TXkbhmb29oBwMGXgU51iHDhVDgQX1pM7?= =?us-ascii?Q?yyr21mcr8Rjf3JaSEWGnxtVVHrVKRDOhjaOoHAnv6CkYO8UA649SPVqWcmnZ?= =?us-ascii?Q?+SQ6HTg65GuhEcc96cWOEpRd?= 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: SA2PR11MB5196.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 335edace-3c08-4558-0cd2-08d9670625ec X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Aug 2021 13:50:35.1953 (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: 7mH9Bw4hw56KOzL2XZ8ZRirbcHtjdnmVij4HaWcKMDpgmEkYOimS4l9e/kJMfU+V/YYzkYLNHU4U5e9cPFDrW6tehyHRBW7SnymS9A4YL8M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4922 X-OriginatorOrg: intel.com 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 >=20 > From: Pavan Nikhilesh >=20 > 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. >=20 Is the motivation for this change performance or space improvement? Can we= add something to the commit message to say? Thanks, Erik > Signed-off-by: Pavan Nikhilesh > --- > lib/eventdev/rte_event_timer_adapter.c | 24 > +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) >=20 > 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); >=20 > -static struct rte_event_timer_adapter > adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX]; > +static struct rte_event_timer_adapter *adapters; >=20 > static const struct event_timer_adapter_ops swtim_ops; >=20 > @@ -138,6 +138,17 @@ rte_event_timer_adapter_create_ext( > int n, ret; > struct rte_eventdev *dev; >=20 > + 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; >=20 > + 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 > */ >=20 > -- > 2.17.1