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 8A393429DD; Mon, 24 Apr 2023 18:10:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E2C941148; Mon, 24 Apr 2023 18:10:41 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 868C041138 for ; Mon, 24 Apr 2023 18:10:40 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-63d4595d60fso29059541b3a.0 for ; Mon, 24 Apr 2023 09:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1682352640; x=1684944640; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=WCl1dvZM7tugSohXxuWyAFrmcV+lhWFkBFaYE+8CXCw=; b=pOTfWBE1PoWdGGW1XONguoCGiT/9k64UCOl5vovpUuLqOFr/lnJBeCk8M6O8IvxCfD 2ugfrDU/GVktwrXoLWmeKopFaPn8fSClUpXjJ4PPYqAMQ2IsmlP3VBqAydWwae23F3a3 SW2iKZp5YfVtUbSAnPHfqzhitb4ySmiurYcJ2ZT2YbeP0A9pw6Islg7hD0pvJtK22aNh bCnDG4qzd8xcDGBzDwuISQfetYP365osdLCaMlHL+P5f/xJM1Ga+rQvaqQD8djZ4067G JMzHS3d5lpQlGoAqywJnMJTbyaeLZGlaa2u/Jj2JrE6jaWP/uDIz28z9rLiEfLw4l6yG mopQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682352640; x=1684944640; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WCl1dvZM7tugSohXxuWyAFrmcV+lhWFkBFaYE+8CXCw=; b=Bm1qXfc/ymElh9Oim/HE1dkAYpLGo9iafjigWJT+RSi22vEXaInkp6YcpJRHCvQdhO yLnT3k1bpoWfVSP4xrWJpHNztbNg72jHDAkwe6Vx9/TwrJD2aBimAiq3y5ukUXVlXndc J9Lw7cNCr4vzSRfBVF0LNPiuDNuc5NHNoOfiH/PXCJuQxKJP4/Zv2EhJvi81WGP9ZOhg AFd7dZa888JFkFKkivAFE9mmKr0xQCP79o/HTDTbdPPZIhOXAC0SK6yl9GvJsf1/pgYM cWzwexStOOOKaJa7SntyQL7NBodjk6SS0huQYfZLvrSRrCFtOOTTY5TElZNDRtuLfh8o hmcw== X-Gm-Message-State: AAQBX9e9ISN1oK8Ag7/WFG93UAN39zVnOPdMQuCxYBKMlvNSCVtzGYd/ tufDbiUyh4o2CxpTO0wU0Mql1Q== X-Google-Smtp-Source: AKy350amPSVEJjnXukYq3SQRtmBrCE1porgKhbglDy13kvY33u9fR14Wcjz0eCjvulTWNO70Du8chg== X-Received: by 2002:a05:6a00:1948:b0:634:4f6:86df with SMTP id s8-20020a056a00194800b0063404f686dfmr14581195pfk.1.1682352639626; Mon, 24 Apr 2023 09:10:39 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j16-20020aa783d0000000b0063efe2f3ecdsm7567509pfn.204.2023.04.24.09.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 09:10:39 -0700 (PDT) Date: Mon, 24 Apr 2023 09:10:37 -0700 From: Stephen Hemminger To: David Marchand Cc: "Burakov, Anatoly" , Nipun Gupta , "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" , "Agarwal, Nikhil" Subject: Re: [PATCH v2] vfio: do not coalesce DMA mappings Message-ID: <20230424091037.6ef9fabd@hermes.local> In-Reply-To: References: <20221230095853.1323616-1-nipun.gupta@amd.com> <20230104051936.2456411-1-nipun.gupta@amd.com> <0d356823-b198-ebd1-7a28-b678ae9edaf9@intel.com> <4e912b50-c17f-cfb4-c8e3-f3db4f96178c@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Mon, 24 Apr 2023 17:22:46 +0200 David Marchand wrote: > > > > > > > Thanks, I can reproduce this issue with regular devices too (run testpmd > > with no devices, bind a NIC to VFIO, attach it, then quit). You're > > correct in that since the initial mapping was done with mapping large > > contiguous zones (such as when mempools are created before attach), any > > subsequent freeing of memory will cause these errors to happen. > > > > I don't think this can be fixed by anything other than not doing the > > contiguous mapping thing, so provisionally, I think this patch should be > > accepted. I'll play around with it some more and get back to you :) > > Can we conclude on this topic? > It is best we merge this kind of change the sooner possible for a release. > > Thanks. Shouldn't the coalesced mappings be able to have correct datastructure (accounting) so that on shutdown the unmap's are done for the right size?