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 9D1B5A00C4; Wed, 27 Jul 2022 23:43:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80B664021F; Wed, 27 Jul 2022 23:43:36 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50070.outbound.protection.outlook.com [40.107.5.70]) by mails.dpdk.org (Postfix) with ESMTP id B1A3240141 for ; Wed, 27 Jul 2022 23:43:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q2Ic1VEb5V49XkVXD8ejtgbXITx5JHZIRT3se0vgoqX/YUUsNW5AoZcdKFOSeh6S+6w0jwukPmr+SI0vp84OMRn9+pp5o89BH9QOZXTTn4SzQyaFknzZkfrLVoLW8jI2nIjLu0XQ+K1R9QNTdUp7VEtEunW8UU86Erpi/db2pF90oncAE8gwo7bHiYmeaYiNKoRnZy6tjPdI8O68mmZTnRSd5PoMzx2EFtSct9auVbVufM4YAUKYwLUtomciVFZiqTx/jrX0tNCCZXuIbu6x1Z0mLuja4IzSK02M8hP0GY7TKHpScNg1ifP+CRm5ig94Edu3X+kXsJzo4FoVtpIszA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hrLpfD68mp6L73YqeKWXAzL9WmXJzk2dQ3bpbd4tv9Q=; b=cYKh9OjtwZMU7gep3EJPH0D1ylsvv5WzJ2j/L7Kx/Hr3JSqy4AvBRV0F8FPp+OfsQMo6Ff0a5iqAfpIEYQn6KNQskdO3tq+Pcl/8y8f5BuOcdLi1/UMfw7HhdgxEhtmAOBJ617VcXlAvPFhoQhSDrdp5W5ZG3tX8WMi1TG+SpKDrz7NRwRhtYNbCAaTcA/cHulbJeJdrt1RCBBJmbOf21uJOt4e7q7p/k1CptwYBJ95vw6nZ3a3ukTYPlf3iaZheROOhDF9V07zLI/mnBOMByI/YEMMHPZKegGWQO4ar7Q73rpqDek61kpzM3ZgxC8aycm0luerZIrRw1RIRnGsP2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=xsightlabs.com; dmarc=pass action=none header.from=xsightlabs.com; dkim=pass header.d=xsightlabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xsightlabs.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hrLpfD68mp6L73YqeKWXAzL9WmXJzk2dQ3bpbd4tv9Q=; b=O5bY9HideHKwYwgrbVPDm60qJqGP68+vhK8MPHmx72/qKpLJ4OZBKwgfnY3IwYtpdrBWGeZCwwOB3rRps0SkfVtQdLId3HDuP6JkvMGTjA06yRlbXbZRjba8WyYEqJR73KAXBbEUh6GC8a7CpLfnf5uL21tAlf0sE8ufDQzcpzc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=xsightlabs.com; Received: from DB9P193MB1482.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:2a6::7) by DB8P193MB0760.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:155::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.6; Wed, 27 Jul 2022 21:43:33 +0000 Received: from DB9P193MB1482.EURP193.PROD.OUTLOOK.COM ([fe80::d09a:72e6:a61d:ce90]) by DB9P193MB1482.EURP193.PROD.OUTLOOK.COM ([fe80::d09a:72e6:a61d:ce90%7]) with mapi id 15.20.5458.025; Wed, 27 Jul 2022 21:43:33 +0000 Message-ID: Date: Wed, 27 Jul 2022 17:43:28 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RFC] EAL: legacy memory fixed address translations To: Dmitry Kozlyuk Cc: "dev@dpdk.org" References: <256b5409-ddaf-d7cc-00c1-273ca76dbf71@xsightlabs.com> <6aaa04d8-2ac5-ced6-ec25-d42bc52a3e2f@xsightlabs.com> <20220726225910.26159820@sovereign> <20220727233644.21f0b2a3@sovereign> From: Don Wallwork In-Reply-To: <20220727233644.21f0b2a3@sovereign> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: ZR0P278CA0144.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::23) To DB9P193MB1482.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:2a6::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: be660d7d-aaae-4ccd-9ade-08da70190da0 X-MS-TrafficTypeDiagnostic: DB8P193MB0760:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N9ZH4zY8wqurplJ6FcToXdMgxxD0TMy5TG14jJQtL5sPLInOHnG71vg3hRCZsIBgFnmkd+z6ntCOpYBQamoNasulmR/Zsu+db27ogXp9fixilAJI7cduqSQzRTkzpOX/DEAQ3UEMw97aEg1LACZziuzxSU56GVYhJdsLevGkMm4E1744/tJRc5+5AgLw67FXM3feShm/FNaMQevKJ0e/dS716HQjRYWyXq4iF+AxzPHW6/oTyp52Yf1TM6qROpUrLWFp72go1wFmv7+A4h8u/NCRXZ9aJx2sLC3hwi2CieqBWnMGB+CKwGBV+RsmmLer3jJ6nQlpcpiUdcE+jQu1ARpCjr7L4Vd54mN1VzXf5uk09/27KZbtqrybdZRjaTbH5SnJ1k71bTSopJMKlAc1jOVLDsNDsT3WUzy/wf8aPPiExDwhErY6gBylVP+h7XFf8sd8U9hkApZAAZXHoRpoWBFQRoIX08WrbHFPJcR6y+oUYDaoHjmPLNWo86rchuCfIOlLEq7eUB7v/SGmfUl3F4ysVAsDbvuvffUUBsCFLrdxUpe8fsl/3oXlElyD0PXV17BSZuRkN36x+h3Qp7YCjQfiDpK367RDYCLar6QG+N4t37ZvI43CoBAobaZfsyMdR5bkKdaB7rjWyGXcIFQJ/K+X6gE1jKf3DsBxIsM2vm2E4XK15e+Mmg3XHgEEAm+0lSeQoIsC97sx6qZREAAMmllgtgg/nQ4p+2Z6TYwuEwQ0aZ/jdi6IEPobxhyOfcICct8n8fqXtj0dEJciOWDd7dJSrv4EhePXGwSuvqmdFtoWSBneZ5Zt2N8dlD4zyhYr2Ml2TveoOBqrTkY/PyzcIwex+Ve1pQ0LmWdAXtiKfas= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9P193MB1482.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230016)(4636009)(39850400004)(366004)(346002)(376002)(136003)(396003)(5660300002)(8936002)(66556008)(66946007)(8676002)(4326008)(66476007)(2906002)(83380400001)(36756003)(31696002)(86362001)(38100700002)(38350700002)(316002)(6486002)(6916009)(2616005)(26005)(6512007)(186003)(41300700001)(478600001)(6506007)(52116002)(53546011)(6666004)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eUlmUDluWWs2WlhDUXh0c3JtbGdPSDNoZ2VnQWhtU2FBdjMvNFZJSDJWS1Ev?= =?utf-8?B?YkdnTTRLUWRGRXBaS2NDbmt4VDhsdjVNVnBlTEROSlpHdTgvdDg1Q1lGa1Jz?= =?utf-8?B?Sk1Md1FyOU9SMHBwb3N0TWxsbHFBNXFlZGFGRVR2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SEpYUi9vYkZwOHhDYUpMa2E2T011dld3?= =?utf-8?B?U1ZFVVp0dU91YjF5Uy9aRERWVFhlNXFxQ2p1OWlmSFRUd0pCNktGNzAxeDBk?= =?utf-8?B?YTRLZjQyM3IxOVBIK0pJcDgrZFJxODNlMEllNm1lTENnOE1PZkpaRlB0OCtj?= =?utf-8?Q?NXpSS9M7+V7DRkC1DYc/wYZcC?= X-OriginatorOrg: xsightlabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: be660d7d-aaae-4ccd-9ade-08da70190da0 X-MS-Exchange-CrossTenant-AuthSource: DB9P193MB1482.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2022 21:43:33.3343 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 646a3e34-83ea-4273-9177-ab01923abaa9 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SEBxggNW3bv/u0als9O7/TsYauXMb4OSXgwDs4FdiuuruTAxLE6At+bIKmHxP6GsqapQwE0ui6EkKY0Yuy89oQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P193MB0760 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 On 7/27/2022 4:36 PM, Dmitry Kozlyuk wrote: > I now understand more about_why_ you want this feature > but became less confident_what_ do you're proposing specifically. Let me try to give a trivial example of how it would work to make sure we're on the same page and then we can get back to details.. Say you have a system with 4 huge pages that are 1G each and the physical addresses are 10, 11, 17 and 22G.  If we map 13G of virtual address space, that will be enough to cover all of the huge page physical addresses. If the VA region starts at 1G, all of the hugepage PAs can be mapped into that region as shown below under Proposed heading.  For comparison, existing mapping that would be done in legacy mode is shown under the Current heading. Proposed      Current (Legacy)  VA | PA         VA | PA ----+----       ----+----  1G | 10G        1G | 10G  2G | 11G        2G | 11G  3G |  -         3G |  -  4G |  -         4G | 17G  5G |  -         5G |  -  6G |  -         6G | 22G  7G |  -  8G | 17G  9G |  - 10G |  - 11G |  - 12G |  - 13G | 22G So in this example, we have a fixed offset of 9G to translate between VA to PA or vice versa.This works whether the huge pages happen to be allocated statically (legacy mode) or dynamically. The unused VA address space from 3G-7G and 9G-12G can be unmapped in just two unmap calls. This is a very nice property in that it makes address translations trivial without requiring costly searches. This property also makes debugging easier.