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 224CF428E3; Fri, 7 Apr 2023 08:13:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A215940DDB; Fri, 7 Apr 2023 08:13:35 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2072.outbound.protection.outlook.com [40.107.100.72]) by mails.dpdk.org (Postfix) with ESMTP id A8A4940041 for ; Fri, 7 Apr 2023 08:13:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NxgF53i3c7VTAYA4SC6n2JHSPtV/OQq8JSHMizTjz/nnmcXqGc3NQzZ1+TpeFJgrflkTQ5KO9Cw3NmhKmNQXYWhZeLH4joBF0dH3VgL24QgS9/dldjg+TFKVl313086pcKEBMENhA7XgEQldsUiIurC0ESGMxcLOpV86QfHU1j7ZC+Xfj6vVd08+0uTvOVRthJthS7dANKRDzt7EFS20VXimcGY/nZKC+wtU9Pf9QPAb0YL8+4pC4R+bFQ7KkRaL7GQ76hn+L8NKyanhDaPSnGwhDJrq85bYDmtIiViWKWlXjOrIc/4KwSu2oyeXxYJXKXnBQmOESngHcC9EhB3lEw== 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=JAaNvYcE4RH3S0Lm8vDHt7w01VQbqLvSFSN3dlzf12k=; b=H9ipefnLIPijNV3bWmrWYTMXHUotaHkE7BiFjdpV/igKJWRQ9+ML+H3JaDB7roouaZufrFJav1BTt0Z+7/ggxW8vi+9EM7F58rrYFuYscka/HQEz7WB59elu/YTAWFxgcXkRv9EXP2r6cF1wRMpBlOK5jJO7RgiW2XsbsToTqOmGez8Uxz3RL07eZ1O+xMlXTbhwaTLfO4zRMLsDaOlu2suTACN64jl7l+rg7STsGhz0JVMsRwFShlJGAFP37wsBrgmvg8GvnlqakF7AYwtYO19aibcFQ7MR8Xf47LUP9xVlf8TaOldc+Yq/zY/TTlHUEgPcDgGns8H3tFMxkYy/Ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JAaNvYcE4RH3S0Lm8vDHt7w01VQbqLvSFSN3dlzf12k=; b=gqB0mt/uklEuc+ihW0Acs1lx2+oxG5axfoNrDuMXcwM4HqQEI3q4fWDx2Hgls8Qkfe3mV1MNQvleyzUyJBZ8PIIknQ/J5MPaDkFUPW3nPXbp8SeSlo1E/U4N4sfIEU1cWMv/QrjAOtBf8CBhuYDjUW41Pq49PEscuwAcKXfPdjY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB3082.namprd12.prod.outlook.com (2603:10b6:5:11b::12) by SJ2PR12MB8136.namprd12.prod.outlook.com (2603:10b6:a03:4f8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Fri, 7 Apr 2023 06:13:31 +0000 Received: from DM6PR12MB3082.namprd12.prod.outlook.com ([fe80::72ca:e9ef:88e5:26d0]) by DM6PR12MB3082.namprd12.prod.outlook.com ([fe80::72ca:e9ef:88e5:26d0%4]) with mapi id 15.20.6277.031; Fri, 7 Apr 2023 06:13:31 +0000 Message-ID: <0fa0e21a-3c41-6a51-4b9e-3421b63c0369@amd.com> Date: Fri, 7 Apr 2023 11:43:18 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v2] vfio: do not coalesce DMA mappings Content-Language: en-US To: "Burakov, Anatoly" , David Marchand Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" , "Agarwal, Nikhil" References: <20221230095853.1323616-1-nipun.gupta@amd.com> <20230104051936.2456411-1-nipun.gupta@amd.com> <0d356823-b198-ebd1-7a28-b678ae9edaf9@intel.com> From: Nipun Gupta In-Reply-To: <0d356823-b198-ebd1-7a28-b678ae9edaf9@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BMXPR01CA0083.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::23) To DM6PR12MB3082.namprd12.prod.outlook.com (2603:10b6:5:11b::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB3082:EE_|SJ2PR12MB8136:EE_ X-MS-Office365-Filtering-Correlation-Id: 14daf269-a9ac-4f3b-6673-08db372f3596 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: knNmXo11VAO/D/IRIjVd59BErrs7LPXBN0hHPZP7bKWSh8hOXSivMZNdXb3L8OfVvKmBey5uGoj4wGLLdf75URzJ5/KQ82KA1uPCLkkUH+IqV5CZkuVVwWkyXM6Wdh2n3137CDtCch+P1TztsItLJmDuvSETNzqpWougqOSg51+e19+sjrR6m85XG2/XZ/DiBfvAUCrUL2oG4O+hHIrHsBNjxP5iyF7DLzbTho7q2dJfNij6RrMUJ3rcn9fDNpxzubsvXlC/SwgOubyxfVqGsj8FToNYxmIDGI2EBJmyKCe9RRHWUhMA59VnlR3TRpOvhx5tePqmQDuX0VRXaSgA1eH4C6eilV25JKixLg2JfibZRwruRO/eDjuKjlksnecqdhVER5D+PXGv5TJkZzM6k/AoaVGaumBNlNPz9pyBgTO9MV4P/BiG98DVBUnfbM7UDyEsn0sx1LERP30/zLHQ3Zm+yOs8W5xzE3Eazwu9BDNzQ23u6pmHmQhaBhlyarTpMMEMtY91QRAsGZLbM6GFKiSNIo7ZtNS237KghGETlXxRyrybfYNCq00liTi9zfRyfxgg/EDR0DQHOF6ltNUWFKb6OYrSJ//4PlFJBgrZxGOpABMQkYKVmP2P7Vqy+rJa6TD7TlVNcHT7sjUKz6szUA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3082.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(451199021)(2616005)(86362001)(31696002)(36756003)(2906002)(31686004)(8936002)(83380400001)(186003)(53546011)(6512007)(6666004)(6486002)(6506007)(26005)(66556008)(8676002)(66476007)(478600001)(4326008)(54906003)(66946007)(41300700001)(44832011)(38100700002)(5660300002)(316002)(110136005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Sk1ZOVJaWE8xK2Q4LzEwWjVNT0ZFNnUrQ2FBSXZJR2F0ZEQ4aFJuY2p3UWcx?= =?utf-8?B?YXFDK1k3T1BBajVqbW9GR0JlamFielJQZEN6ekV2M0lUaERLNWFuTEI1UUpC?= =?utf-8?B?MkFXV3dLZEpEWTEwZ3hST2F2dUFjTU5EcHpHamt2NHRCNU4yNlNreXBac2Zp?= =?utf-8?B?eVNIZVFHSnlRMmVSZEJkL250dkdLektmOTFYYmJLc3RsbndtMVhtc2lXNjVH?= =?utf-8?B?TkJRN2pINUNHR0ZqcXFmRk5aVy9UVm1LV2trd0hGWTN4aVZ6RGY1bFczcFNz?= =?utf-8?B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pVL0p5T2Myc2FsaHgrd0p1bGpHK2dGdEdwU2htY3cv?= =?utf-8?Q?hrTLbMa02s46tq2oGTOakfHzU?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14daf269-a9ac-4f3b-6673-08db372f3596 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3082.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2023 06:13:30.9133 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /5iaZ82p7kTSC7X80n0yL6SW9eBg7KW2XroDURgA6/XqaWt6ZUmq7BpmNFrhNfVr X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8136 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 4/4/2023 8:43 PM, Burakov, Anatoly wrote: > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. > > > On 2/7/2023 8:56 AM, Gupta, Nipun wrote: >> [AMD Official Use Only - General] >> >> Hi David, >> >> I agree that change is not straightforward to review, but it should >> not cause any functional issue as we are still creating all the memory >> mappings, but one by one for each segment. >> For hot plug case this causes issue as mentioned, that VFIO does not >> allow unmap of the individual segments in case mapping was created of >> a single coalesced segment. >> >> But yes, I am not sure why this code was added, which Anatoly may have >> more understanding on. > > The motivation behind this code was that Linux allows limited amount of > page mappings, so we were trying to save on those. However, since then > there have been a few changes related to partial unmaps that may make it > so that this code is not only no longer necessary, but is in fact > actively harmful. I agree that this at least warrants a second look. > >> >> Anatoly, >> >> Can you please provide your feedback on this change? > > The patch probably shouldn't include the mailmap changes :) I see in "git log" that all the mailmap changes are with the patch submitted, probably as it shows checkpatch warning, so it seems this should be fine? Thanks, Nipun > > Could you please provide some steps to reproduce the hotplug issue > you're having? It would be great to have a test case for this patchset > to put it in context. > > -- > Thanks, > Anatoly >