Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1302775lqp; Fri, 22 Mar 2024 10:46:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQmociFbu0joePVM78OLJnaxg89g8n9++pKIgYe6LOgiMEIHj4xVBK12BuwWj7B0M/PLaCCl5R44movNTOd66JIT4YvweGZ0efnwmoJQ== X-Google-Smtp-Source: AGHT+IFIhJn4O0G5p4mABMCghXO3FAz/VY9uYnLcCAXv0ARyv8jpyNM2RywvycsQ57QDNciPVp9u X-Received: by 2002:a05:6871:d214:b0:229:fc81:4594 with SMTP id pk20-20020a056871d21400b00229fc814594mr546659oac.25.1711129593536; Fri, 22 Mar 2024 10:46:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711129593; cv=pass; d=google.com; s=arc-20160816; b=k3iMrVU9NkRS4myGwhmWNsn4bLX1l3Ywrh8WptL/LSusXWYkIqQ4t2XUGi1vENVg/3 3x6qGQHjdJjo7Cnel2V8rHlyygP1Uk6bn6WykUjzZ6Vas/98l+M6vZwadYBctOe1YyOz 8tFv5j4creqGym2a2cukE+RYCH7D1t4fdQKYYUR60GuKfItNwxhXlfTy6iHAQi1b8Jze xfUbehA89qKOTs9RGn87ubRLOhPfP/qsswz/SDUCw1IRKdhL/qd5AYPjxF4lqci/oxce SxzJQYr7LQwMczoQJxpRljSt/BnU021NIZkMrYqtU+SQhnhO/CQuYZ3D+PoJVuZG+T6I hweA== 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:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Oy/Nq6PcY2bcQc0QCruyagdbdVr8kaFsWqEhNH327PI=; fh=mmnNvQFOHfrcFNkckn4nYsZKC3OV9HVJBN8A5eqeywY=; b=xBMDrHku3pEf/ppRnS94svpfUU9tS0+lJP3WL4dRB1VjxGw29OUkt4BYoo0tiwfT3Q 9Znmct3YMCRxw7UsYIDWbtZuGoIaX8L6QmiC/HHuJgGEa/TaizrkeYjzOB4POIHk2COs UiMMM/WLu19UJwqp/BUmIwNPV31ONLjbKisfrxZqyofNZCjCCFduUYuKBzigIK4GJ4Zt IaVRR1hlgLWYZUMxk/67LrXnqwpcoEPqHCvsBq+t67RUCM/egq/FMXwsCCXPaRhO9NEo iC9K5tU7j5DWdSkb6stvBB1sfOtB0ohIq0mDWVsL9vlBNwFQSUATSrAzNkAEjTWwp/3G wB6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZHS5yTT4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111881-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p20-20020a637f54000000b005d8b6a84416si2354783pgn.534.2024.03.22.10.46.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 10:46:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZHS5yTT4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111881-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2F7E228353D for ; Fri, 22 Mar 2024 17:46:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E7E26026D; Fri, 22 Mar 2024 17:46:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZHS5yTT4" 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 A0B2E5FDDD; Fri, 22 Mar 2024 17:46:21 +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=1711129581; cv=none; b=oHQQzj2pe6g0c89w0nZB+6tgP87sT3/zpcVGkG/2Du8ys3O16yuYdAwjeb4gxPo3fJK06eLFTHIsKiDIIeSZxQwmnsD4uaKIVNq84tLpgzIRoRa9KoRJZJYkDsTn9UJTPH6xYqT+pWtUrQhB77AYYUanjex9kc+JNp8Y1nYWzHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711129581; c=relaxed/simple; bh=tPnSfU7iDXbv5Aanu3qQZ/bdHhZW5HEkKrMaj/r/t3E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t1fFWZ00mlSUzvKAV2Tn9hcnz8Hhk9dbnHULQI5Hs4Z3yauEUBxYICPy43tNMnRh7j0PLSM8RCDZI4N4DIvdTAzciqqvPetms2v/8nzV4IjiNj+ki2T+ou3zyNZHNryywghdwYmcNkLL5VHz8FzEK4vJzXD9/rdjt6Rb2NKYB3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZHS5yTT4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B06FDC43390; Fri, 22 Mar 2024 17:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711129581; bh=tPnSfU7iDXbv5Aanu3qQZ/bdHhZW5HEkKrMaj/r/t3E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZHS5yTT4bbaMRlgftNPH4s3/BHy6Y/pMfuNyl8v8f5cbM9wT0nJywOThE9XO9o+Yo sQrbBVvHpfJ/GkmHADMgsyejjED5TS3WA9xA7CAd8LGMMBj72qkOP6L4xJgAnibISZ qNFyWWuGRtKqmNbYceSiJMbEfqG1Js9LGbaa9G2SXsAMGNlvbn99etRqhzGPHQquR2 /pbuuEEFXd6WzmZyO515+46vj9pZRkjqcnsndSlqoffLvES8FRzNSO3QY42zxkNADr DC5hb9KvKEkeYTKUZ64FdwpBihsRuGbAw0oCeOVQ5Q/D7ca6clZI9B8s4YtiHLB9rj nO/n9c2+vHn/w== Date: Fri, 22 Mar 2024 19:46:17 +0200 From: Leon Romanovsky To: Christoph Hellwig Cc: Jason Gunthorpe , Robin Murphy , Marek Szyprowski , Joerg Roedel , Will Deacon , Chaitanya Kulkarni , Jonathan Corbet , Jens Axboe , Keith Busch , Sagi Grimberg , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-nvme@lists.infradead.org, kvm@vger.kernel.org, linux-mm@kvack.org, Bart Van Assche , Damien Le Moal , Amir Goldstein , "josef@toxicpanda.com" , "Martin K. Petersen" , "daniel@iogearbox.net" , Dan Williams , "jack@suse.com" , Zhu Yanjun Subject: Re: [RFC RESEND 00/16] Split IOMMU DMA mapping operation to two steps Message-ID: <20240322174617.GD14887@unreal> References: <20240306221400.GA8663@lst.de> <20240307000036.GP9225@ziepe.ca> <20240307150505.GA28978@lst.de> <20240307210116.GQ9225@ziepe.ca> <20240308164920.GA17991@lst.de> <20240308202342.GZ9225@ziepe.ca> <20240309161418.GA27113@lst.de> <20240319153620.GB66976@ziepe.ca> <20240320085536.GA14887@unreal> <20240321224013.GB22663@lst.de> 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: <20240321224013.GB22663@lst.de> On Thu, Mar 21, 2024 at 11:40:13PM +0100, Christoph Hellwig wrote: > On Wed, Mar 20, 2024 at 10:55:36AM +0200, Leon Romanovsky wrote: > > Something like this will do the trick. > > As far as I can tell it totally misses the point. Which is not to never > return non-P2P if the flag is set, but to return either all P2P or non-P2 > P and not create a boundary in the single call. You are treating FOLL_PCI_P2PDMA as a hint, but in iov_iter_extract_user_pages() you set it only for p2p queues. I was under impression that you want only p2p pages in these queues. Anyway, I can prepare other patch that will return or p2p or non-p2p pages in one shot. Thanks