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 346DBA0C4E; Thu, 12 Aug 2021 14:43:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A91E54014D; Thu, 12 Aug 2021 14:43:04 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2068.outbound.protection.outlook.com [40.107.102.68]) by mails.dpdk.org (Postfix) with ESMTP id 4516740042 for ; Thu, 12 Aug 2021 14:43:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fFQ3gqB3LMgXCTGZ36FhrAaQPI1vgx3AY3gEtIqItyoOlDlE7kzdcRPZXIUbv1KqyNHAHi22TI60A+YbQDUutRIQRJm25kxj2lecRSFnH8UDd7PfERgNg8ecqgyIHHKTpd0d84IQdv7S7F3t8DvuXBDHZW2EbpYZ7eVJHSvbVyZMYytLb7kVdff+CIaiSHID7yPC0ootVUxiiAUm+5YRoKZKvuQwtn8o/VSeG8szlmmfUwJH4VVJ0Kun30bg/Mha6JyPWxTKxCIXhsrqzKUyczXn19OijtN2zwanxPdPUTgsK4blxyiF9IBFtbkqlvkEnug9CtjftyaIf0Pq90WV7g== 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=eBfPFqPiL2vCD3Apg2wA2wOypOQLWkXIsOII2ZuGOWc=; b=iUPhapnj76j2R2OW4wSYDA9i1Kwag4kzMG0eKnigZ9QFtxP5wZT+gPJvIRrdm5Z8QY1sxjSV+mTi7ZDcMTTBccPin8cSPX1f16pfYUbRrBMvqTj3CgsOwLYSJTGGFgPH6hYmF5CT95OM2o/ZfLkB68SoFU56q0hMp02YRAv8H6FaltyolvpV50KZjWndJF5lEjerV6QTrb7s1CtDLhHUn5nSSPO8FVfhuJiOR5zPGANLr3iJ/erAIymB1MtZnLkBwjeMSe/bccsn4YgIpdeOt3fvZCk7QTzkx3riYGK7ObBdfcZBW42e+6JI7XoLchZrlJi2D/79c31nAHYag1MLzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eBfPFqPiL2vCD3Apg2wA2wOypOQLWkXIsOII2ZuGOWc=; b=kYY/4V8Ttyyl+GsROhbreLaNjGXd/hy+I0J8IYqeECo44bX4IfCZD0OLneVgE48hhWzsk0eTgJdi4xewiPfFK4lLfOzzp6UP3vctCeTYK2Hv6XUHiwMymzqqsbyZ7AWpo0W95fs5d84VPGDPG1rB0bNCaY6ng/YxLdgIyQURn8tu7xKDiIow2cqf2Ty37LO1iPWA1xZKBwkpHthIyKcopS5o0icAkT8brjOklmMpBHZ5KPs6/+z+pQEU04zdAS7+n0DByVjp2LvPrwvhitE5AVG9VdNnjDHq9GFQq1al9l2d0yjww8ZplPs0Pm9dzBo+RaFZk4efH66b6yaUH0zC8g== Received: from CH0PR12MB5091.namprd12.prod.outlook.com (2603:10b6:610:be::10) by CH0PR12MB5249.namprd12.prod.outlook.com (2603:10b6:610:d0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.15; Thu, 12 Aug 2021 12:43:02 +0000 Received: from CH0PR12MB5091.namprd12.prod.outlook.com ([fe80::6445:7cde:c742:f320]) by CH0PR12MB5091.namprd12.prod.outlook.com ([fe80::6445:7cde:c742:f320%6]) with mapi id 15.20.4415.018; Thu, 12 Aug 2021 12:43:01 +0000 From: Dmitry Kozlyuk To: "dev@dpdk.org" CC: Matan Azrad , Olivier Matz , Andrew Rybchenko , Slava Ovsiienko , Thomas Monjalon Thread-Topic: [RFC] mempool: add non-IO flag Thread-Index: AdePcSunr6wWyXTgSqqVQfCASF60YQ== Date: Thu, 12 Aug 2021 12:43:01 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d0893b71-ae77-4367-8267-08d95d8eb8ef x-ms-traffictypediagnostic: CH0PR12MB5249: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aeQT5rRsYR2hNg/Se3gxOpzfw9T+JfS0X/HZIMJWmtKxyypbiwTtk+KfySgh8/sKMhkwMOq/sRELePMMakaI7n5M4GY7A1kDRWwU5cT4bV4gDrcAXZTKutQkkf3eosiggC2pskziUsCWUy2d1weux10fVhwUkrOsOQ364WlqV4/DeJY9J0780GpnvPVqTiUjRTAQ0CcqrIXG+q91aY29e9fZpKDsT/aBDqrTIjBQR3TF5Q6s2+DKnQT8RcEtlI3qozeHS/dKCQy5t5O5jrmAMKE/cYL7kH59uC+qzjrhP73KuFFv/MmuRjlrkfB+shrj4gW///oyl+46oX1qcrWQwTurbIWbvmeJySNbuFh615GXc4Sd8iQxxemVFJIbW1cvEhLNMrId9cWwvF3pE4Q2CPP4xXeVpSQftoxxUEm4dCZnSSvmd858JMDiGc6cL/JKyrC5/ZfN8W0+wutkVROCQ36yuuas/NhaMrGlz9E8fMSnsQFOMwdAIAzUyC3mFnxf9YXOnHyXnpXk2I2HTHMRzvgRwILZ7P8Ad/ImBvPJ3EtwqYgqv1knhJsltf2HLGq1M08cBJ6oGiFXP64HG4yOvU6CpfvXCSmQbrw1SewdPGqroWBPx5zZCYWbxra0/UvYngRatjta6z7bIukJfI+l0KLJ8yZM79TYIIdMmZ2tX8hlDaV1V2MhpnlTTmr3C3xm2vJMhCAaYxQ+t4j3JXoLWQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR12MB5091.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(52536014)(38100700002)(8936002)(107886003)(66946007)(2906002)(76116006)(66556008)(66476007)(66446008)(64756008)(7696005)(6916009)(5660300002)(54906003)(6506007)(33656002)(316002)(86362001)(71200400001)(508600001)(4326008)(186003)(55016002)(8676002)(26005)(9686003)(122000001)(38070700005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fXBASEY2PCzJmysN80Tc5wa1ui2rkFFVS8xitIHSCeLl6kHsKC4C9eHw0hTP?= =?us-ascii?Q?mYD5QnQM+NNaBRvpOQW477azSbwhZ+jY9B/o243you2aWWo6Edh/AOqAysUU?= =?us-ascii?Q?EiQf2hsrrmQwfwsykWvcAVah3H8f/hSxSrMtXvef5LsjKZ7vjI/vpMWtll5x?= =?us-ascii?Q?ogGI89wkoeRM5PyaHSHdPOTuqomoEF02USEvu3qby8YsHFg8GHK5K1L/n8PF?= =?us-ascii?Q?842G1RxNw/Fnj6xznHf5/tuhumsCc8+YL8cwDpsbZXgyu6TqEXQhvcnCQana?= =?us-ascii?Q?7dAHWKsh2CqCaSvfrmUcPwfBqUImgqugdhfckO4jZkj07dBdxH+ci0p4oLy8?= =?us-ascii?Q?Om35Ziq5wfhCk5/Wsu6/hlO6hh/Sq1+WgGPwXZZjJXOLvEe29V6QAMXyoWSU?= =?us-ascii?Q?Gql0F6QtCKtKs/iw4AIMZaXkKYMTmonj/IV2KL81fqz5SmQcMMGSPPfhdexB?= =?us-ascii?Q?umLT36eWLr3pOqQl777VtmUh9gR7OC5y6NDA41g5InYlMTWerqD+mTjx8GAR?= =?us-ascii?Q?5tOMkSQdp5SDkF0faO9S3CinS82Vz8jRdFH0ORzalFmHYrUirHSzJtGSzrHF?= =?us-ascii?Q?iIV0OJoHmz+5J58PJdg+CYXvSvz3SQRm769yuh9WeSBfDH0kQFm45qRbGvQp?= =?us-ascii?Q?rDsnUTzttL03xt/EZZdHBR99hemS+3rQy0fPMdPOMz2gUAVZl6UQSykVeiSU?= =?us-ascii?Q?qXd5rZAF0LNWAiZCu7bxvIau+Ix0DOWmmz80xLK18fUvbWu220F4qyKrN1Ad?= =?us-ascii?Q?CKpCTdVSwcbPwiXCWn0fZ8tPPHrzRpKVfytxX3onhyZGvz2p1D2/0gJeMEUC?= =?us-ascii?Q?+iOSrdfZ8dkKI2gUGFdDdLV51GfsxLTUrLmsFqf9cQgeHXPc2bN4CIihYlNo?= =?us-ascii?Q?n9dCsjy2i6dlu3HaS3Kz+Pd0ket52LdCbEpiZzUX7S3eTwTUeliQvWUOT7Hh?= =?us-ascii?Q?kNGDeozj0D6kG9oeIjEwRzygofJoh1Ynlw6FhWTt8AkWjXUS1PZPeKja0kfc?= =?us-ascii?Q?t8vyvSVNgkki6lkZB5EZP0iFuDHdLiVsRx8vCEM6IHj0s1eibt/6kGqgwsG9?= =?us-ascii?Q?FIR8LRR2yO/xNiRnwxrvFFdy3/+xYPYv/hTaAsEA9fzu96w+ci72391S4Jht?= =?us-ascii?Q?DEU7x6Uc5BgMOLgHIj2YjrSqn2NdvPqW9xV6HeU06h+7nZ0131nc5ccovM/l?= =?us-ascii?Q?4XcLiN8pHnviaAKIdAUPzwOMGAqtpHrEK9310i3GZ4nR0ulRdfzaCfX/F3D/?= =?us-ascii?Q?YcDWm10uB7x/jhTxBY4+WUYj52XZc/I72thRi31kBbIFXR//r7L053EuAEy7?= =?us-ascii?Q?9dg=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR12MB5091.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0893b71-ae77-4367-8267-08d95d8eb8ef X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2021 12:43:01.7884 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PgTHrOK2Vw27GXX9SFZ4yqO5FwZVjoRL9pfp45KFE99Qk1B4BF04azjobY/YhtKRv1jozXu6gx+GG+f+q+L0Kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5249 Subject: [dpdk-dev] [RFC] mempool: add non-IO flag 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" We propose to add a mempool flag MEMPOOL_F_NON_IO to mark pools of objects = that will not be used with device IO and their memory for DMA. This will allow saving IOMMU entries by not mapping the memory used by such pools. Immediate use case is MLX5 PMD. The hardware has its internal IOMMU where = PMD registers the memory. On the data path, PMD translates VA into a key consu= med by the device IOMMU. It is impractical for the PMD to register all allocat= ed memory because of increased lookup cost both in HW and SW. Most often mbuf memory comes from mempools, so if PMD tracked them, it could almost always = have mbuf memory registered before an mbuf hits the PMD. The new flag would prev= ent the PMD for registering memory that will never need it. Tracking the mempoo= ls and dealing with them in MLX5 PMD is the next step after the proposed chang= e. A possible use case is IOMMU management in EAL. Mempool could translate th= e new flag to a hint to the memory manager, which would use it to skip adding IOM= MU entries in some cases. It was considered to add MEMPOOL_F_IO with the opposite meaning. It would b= e automatically set for pktmbuf pools; user would be able to set it for other pools. However, current assumption is that all DPDK memory is DMA-able, it is controversial to have a flag asserting this fact.