Received: by 2002:a05:7208:d0c6:b0:81:def:69cd with SMTP id w6csp4623rba; Sun, 24 Mar 2024 21:05:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWj+Ubn1ZKx2PrBWGiXWXW0QMDEVgdd5cFhFulBl+AU3F2wLzjyXoDmDU3vZPZwpuQV25ZjazBj53fPrCbKd4pbj4n74IcMfOnZf2fn7w== X-Google-Smtp-Source: AGHT+IG52V85Do8y1MIx/K3GLUrjmQ0BpKC4HaheBjiXYg5xaLtlpcYbyIbt7/61wZiO5jvaJLLQ X-Received: by 2002:a05:6808:1406:b0:3c3:b607:4f35 with SMTP id w6-20020a056808140600b003c3b6074f35mr8604789oiv.3.1711339552508; Sun, 24 Mar 2024 21:05:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711339552; cv=pass; d=google.com; s=arc-20160816; b=tEYD0jCYMDxvgIvoSB23b5Ox5pR7HbEHkS6pMU9sdZVSe1GxWVgkhEJcPCzJ4zVVII RfQ2GIVt7CMQ5Vdzp6ABvjJE/tqJ4HmZqNWB4iVa+CEQ6any/CHfblkHzICJpItMMP9I IQMxL6P04qKAR8ujZuLQHK3Rhn3ZZWCuSe5NlQ9hZSshe4HrYOesFzFMqycHZYazamiC 2yJAk+cJy1HTTg3trs+TAIx94kPquFCeYl0Zvg/D4xGAe2MHl3NKFynraG3ypD0trpF/ Sdnyory8mA94XgyRD9s1cKbDaV8v2eisJroxoQ8+LhuekCyIeyr/0F7U+eGYxgA1bpFo UkRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=xXL8mTjTP5S9vZ7aNebXqUEU0f1h4hEFoj78rP+4Kx4=; fh=7C+cvSss+lRCRRqbCZWJFXK+bNoxMDONRJLVjQFkDlI=; b=mu/2afAoCuQFcIeV/PMhNYkE3BOlg60Cpf9Cke8T1vizl+FPynbmaYYZIO83ew9RdV N7VbCKvmcrQINK/sMlRmuFJbp6BEwFjQzc0SxtELJTPQaVKekh+83+j97uSjil2wGGwb N5UvhdjqIaM9bNtQruQW3lHvJUxfb1fLZ53b3eapsX61Kf2Vmele+gfLPL8zi30Tuofg R2wPRHQYjn67IyLmWdeu3mxJIYfm7oi31VlokdFtltpnPjPP0jrJv8Xb/8qANkADeBKH PVhK1LPa3gTw8VoYcivgVSvXvhtkeAQyuqw98kBx/LGNB2RKRSoFkYAjSmiy3+uWtFo5 dVkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-114538-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114538-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c8-20020aa78c08000000b006e6854d45b0si4370897pfd.25.2024.03.24.21.05.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 21:05:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-114538-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-114538-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114538-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0297AB3032D for ; Mon, 25 Mar 2024 03:34:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E2BA291B64; Sun, 24 Mar 2024 23:50:36 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 6F8B322C67A; Sun, 24 Mar 2024 23:16:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322183; cv=none; b=X4pk5lmunbzPoVLepS9OineUMiLnm3zpXuUC8JN3gWIJNW+v5+hn/3nSmZxb2jwWO0Wf5EWIxP2ZToRAbgxuYTRxjGHWUsaa9iKP0CQhoEzsIK21m55lJh7Jz1sr/mXYIFgOXt1pvWcTADLPyo1M01LVG4DeRjSd/aOWkY1zCfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322183; c=relaxed/simple; bh=Y+++sfCOOqMd/jN8jYmvU8/LoJkxzD+F97Ejdpsn/YE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WwxPxILKIWVA2R1Af8w4R6k3ZMRwx3nHwKdX5oSl6h81dA6Fbg6Ops6MmakhhCwpIMH2zvWRZGM2DFebVlvKm6sPR+PJEat/CCS1jkuq8saX8RvgAPdC80ZZ6KiImXBomssTKTVAHc1rB3PoiRCsnrgzcrlE5UREMC/6MiGMJTs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 38CAF68D13; Mon, 25 Mar 2024 00:16:12 +0100 (CET) Date: Mon, 25 Mar 2024 00:16:11 +0100 From: Christoph Hellwig To: Leon Romanovsky Cc: Christoph Hellwig , 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: <20240324231611.GB20765@lst.de> References: <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> <20240322174617.GD14887@unreal> 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: <20240322174617.GD14887@unreal> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Mar 22, 2024 at 07:46:17PM +0200, Leon Romanovsky wrote: > > 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. FOLL_PCI_P2PDMA is an indicator that the caller can cope with P2P pages. Most callers simply can't.