Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp577213lqr; Wed, 5 Jun 2024 14:45:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6DKv0i4Bn4RhXRxHzkBQvRq3/LAVE0k68xMfRZ4dnJwL81zupN50P9qEQwR64mkbK5iMVi5CAAJaes24NF+pdWJtO/7XnWEREdL/9jA== X-Google-Smtp-Source: AGHT+IGN+5D15+2OJe4lrB+jMHs+pS96nil9QDx9RQNvTCRZNvsQNEOcqSr/HUMCnZtNsgZGmQlg X-Received: by 2002:a2e:8802:0:b0:2ea:8f59:efc7 with SMTP id 38308e7fff4ca-2eac7a6c7eemr20086241fa.38.1717623924259; Wed, 05 Jun 2024 14:45:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717623924; cv=pass; d=google.com; s=arc-20160816; b=cWUOSM6Oj7IMn6IXWP5ENtz2rv6rWajKTEZv9tTD+6+KY/93gMTBVcXksYGmNxx4Oc ScWKJl3SwJNpF/mJxiobRIiJRTfjE7gRghff1Fu4uz3OM3ijT5VlDKbfKfX3YqY2e14p yHqs6oSWy8LHHZ8C2s4uxA/LPGKSqdeCrQilVKgipi+nNqLznPh5Z7kP1Ic7b0FfYTn3 lct5lypREkYpWGFrAaHWY5/ww5dVZPhQNhr4TurvoWno/75VMxFl36XXDtSBdj7kcZ+D jPguH9J0rxn2BW/BOWXLGpBJM2DA/W7Kwt/bEyUyqTITaWqNKRJidasH9IIT+YyhTYzV 6t8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=h6rg02rGlOpqzn27ESrDineaZ/HZFC69Mfmm/QIdUZo=; fh=V1tVKsNeNj17HkDU4xZWUcFFy8DX3lL+jHx06Li3s3k=; b=aW6jqRNRarZ99FUMy3gV476Rp9fT9i/fodbte6wWQkXxMnQLLciZEOwhqV5kdnKFAy YHO9P5WQk/ZI1Nvd6BUxSq3j4UFAOBO7h0v3zUYGnqCFCqvb+sPPJ3XGrkKB0uUfPNe/ TSn5NfXRi8wRrp1xvrtj0rLMH/iSyDEUNIZ9dINRnHF4YUnLKYi2dFPKkElv/b/a3tzp etYwzHcsEk+91Ql67b/nQSuSMvUWu3lp/naK+8hEhzgUBIXfKv0DqP0GFBNGupm4DNef 3FH6AmQ/J0eh+uWEGiKUO2TybaOhz/HseCOc8kBVzJJSXunlnzkjOLRNzlrrbZ7ONxd4 pGkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FT8g+35C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203321-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31cca63csi6390984a12.667.2024.06.05.14.45.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 14:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203321-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FT8g+35C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203321-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E326F1F248D9 for ; Wed, 5 Jun 2024 21:45:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8ED6E16078D; Wed, 5 Jun 2024 21:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FT8g+35C" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF0FF15FA6B; Wed, 5 Jun 2024 21:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717623902; cv=none; b=UXhw/42YTobchWnxjJYycDbXz+E/bDhRTV6SVGBybnqWjT8nLHpIcG5lka9GX+2btT4sSts1b2GUIqyF8czTNAQ7Oot3HMA9MStOp378FXrqDIsgZ4k7+twz0Nze3KqDoYt50bd+63zf8O+S/Pb08+Iagusrg/qGKC2TWn509Kk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717623902; c=relaxed/simple; bh=CVFMj08n3jx14fA4p4rVO8oNP2YJkFvLHwp+4lE/nJk=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=pfxxyhCIkrw+8BMIKo6M7h30BwHMZKABbaqg4UddbxSWxoKoPvLqdKup1kfo5n73u0I5Q9ARndY39Hu29fsZkUzgZRzNGkjmpmjAMYP3KenIVMGVdBPB24CP+eBuLKW6CFiTeWHrYDf6MbzIxU6/hNw8bvv9qYZ/26V+XbofXM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FT8g+35C; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD9E4C2BD11; Wed, 5 Jun 2024 21:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717623902; bh=CVFMj08n3jx14fA4p4rVO8oNP2YJkFvLHwp+4lE/nJk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FT8g+35CiFMlqdW45S1xvzcyh6rKx+CgS1WwjYzIADHjLKkvfngN74AXw7nrcOHNp W/jTuM7rBD2tO/ss+up8NPfPp1AZQpaG6whs2KMNyRsFLFZoMjqPTlGQ8t4hrwJeZS E3EtLD1WTLPWUouYrWzY9FwX38uX5LzwsPYcp/IX8m8T3Iq98c2VnukCiS/L/hYZu0 v2nuSygn69PZ4lUFigqffS3vhHrMngjxVJ2n5iSti6Z547E4IC7e5FBpyPYiW6XEFn 7jEBrGrhmjFYUkOwaoHkYJ1FLJD67eL3hatO1/UBa1dmULLixBRhE9em/5wFOtPZ4f ocIB2a3M5WPmw== Date: Wed, 5 Jun 2024 16:45:00 -0500 From: Bjorn Helgaas To: Martin Oliveira Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, Jason Gunthorpe , Leon Romanovsky , Bjorn Helgaas , Logan Gunthorpe , Greg Kroah-Hartman , Tejun Heo , "Rafael J. Wysocki" , Andrew Morton , Mike Marciniszyn , Michael Guralnik , Dan Williams , Ard Biesheuvel , Valentine Sinitsyn , Lukas Wunner Subject: Re: [PATCH 3/6] PCI/P2PDMA: create VMA without page_mkwrite() operator Message-ID: <20240605214500.GA781636@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240605192934.742369-4-martin.oliveira@eideticom.com> On Wed, Jun 05, 2024 at 01:29:31PM -0600, Martin Oliveira wrote: > The P2PDMA code does not need (or want) a page_mkwrite() operator on its > VMA. > > Furthermore, having the page_mkwrite() operator causes > writable_file_mapping_allowed() to fail due to > vma_needs_dirty_tracking() on the gup flow, which is a pre-requisite for > enabling P2PDMA with FOLL_LONGTERM use cases. > > Co-developed-by: Logan Gunthorpe > Signed-off-by: Logan Gunthorpe > Signed-off-by: Martin Oliveira Fine with me, but please s/create/Create/ in the subject to match history of the file. Acked-by: Bjorn Helgaas > --- > drivers/pci/p2pdma.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c > index 4f47a13cb500..ac07053abfea 100644 > --- a/drivers/pci/p2pdma.c > +++ b/drivers/pci/p2pdma.c > @@ -171,6 +171,7 @@ static struct bin_attribute p2pmem_alloc_attr = { > * to be very large. > */ > .size = SZ_1T, > + .mmap_allocates = true, > }; > > static struct attribute *p2pmem_attrs[] = { > -- > 2.34.1 >