Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1128091pxb; Wed, 29 Sep 2021 18:05:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTkwIKsJjTgwQU6gMExZjGyyg80ZFF7XdQu78WCn8NA/Wc8KJZD8uUZ0EADB0TaraBt62R X-Received: by 2002:a50:9d0e:: with SMTP id v14mr3905128ede.230.1632963926325; Wed, 29 Sep 2021 18:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632963926; cv=none; d=google.com; s=arc-20160816; b=j087JcMhH61r6Gm6YPAymBiI75qOPNM5vMzOpBvr+pf4D7rY3nwsc1MzmqnG3OyLkO beCTvwBDZ9Y123SnS9xkBXEs2MeLO1ivrhD1ywlUSrSy7Hj6h+vDTXXAAdLuwH7FKlIr Uo2oR7JzcfLFdHnKGMKsgDHuGsxpE6dX6jL4hke7Lsgo7SvdsYX9wP3X2TmtAbf9QbvP q2MKUP8iL1czYicZF1SPci3YNz1NBaJ838vmtq5n+HKpRf/jp073lM2Jp0d99+/r86pq 25bvE4aSVxiJ1aONS+68E4+z4oS73m1rzZYi4dxbvE92r0wydXbVVYjZ8NUyAr52+u8/ n5OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BwrEOqITMVHTWeCijhMHSDgtGtdliHDBULe1zYCMads=; b=AjCpgHRRSWRxoBn4lKxhLTtE+A7VuDz4orbiIDGDB/c7rUsqTfKO7zVwgxiRTzWf2m OkO7CwpTzdvl0G5mXxihat4+lCu+HEhGwuTc/S7HXBsp8FsBlGWnxkRUm06zyXLbdk+s HO1L0QgIw38vslhnaSp0KtTTiNEpcYPQrAdWtLJZFFHsk+fEUa7OYqLoPDSG40EzJ2nN zj3c0S35LR+/gojCxA/zO1XtjNzSuzXPE1TMM0sRC8Tpcelox9ievyecGpslKSRiHsHF HungiPpiK7r7+nIzWOmJ9o2Oev5DJrJ6dKRyzLRyd2ECy3S3WXtbWbZYqmW4qaL9x5vf sdZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=cnipXcpq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si2188469edu.126.2021.09.29.18.04.54; Wed, 29 Sep 2021 18:05:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=cnipXcpq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347396AbhI3Aig (ORCPT + 99 others); Wed, 29 Sep 2021 20:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347083AbhI3Aig (ORCPT ); Wed, 29 Sep 2021 20:38:36 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39454C06161C for ; Wed, 29 Sep 2021 17:36:54 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id d8so4125230qtd.5 for ; Wed, 29 Sep 2021 17:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BwrEOqITMVHTWeCijhMHSDgtGtdliHDBULe1zYCMads=; b=cnipXcpqu4R5bM9dgEXfQv8BOGJdXA84Z/vct47TAZsrhe6w/r9oUXvVRUGjrFVc9o 1pqzLcPWuKWB7IKDJ67GQ2rJ0XJHZa9rDepLeYkUUjlUxrxSVALpK00Eq0gEhv5XCimW sHs4w+N9g0alec3otIgld2+AWdRLOeWRpLw+d3vtzb9Y7LM/WjCoP1OCGXbI5oFH2wcA Od4IxfZeZh+ym8BbKDSyGmZFnDZ/c6eOX1Sg9JX8M/BMCZdpEJadR2DfQiZA22RjHFQD 9rTLu0GC5IGCqxQldXIJQ2vZ9a0iJRa0h0Mj+ZaME/saY1/RCbRN+q8xTUUHVWNi7uTT 2+YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BwrEOqITMVHTWeCijhMHSDgtGtdliHDBULe1zYCMads=; b=WD3vh4TP9EJN0aaN84r2h7Ari9bISNTHJmgSt48neUS7YeosfAnit6e5xX4hMs40FV de2MPQxeOxVIQNebhuDQkkZ/TlWP48GNJ9fskd5P/M7KaMfPlrygIbORGb+HzvLWrnDQ OCvI+JL/aWTcRvODNWCN1xashqV4/Z3+hOUX3bq8+fdDDuEM26Q6m4/PVGCJ4eMjh35p c9EMV4FBSD2Uzkkc/sGM+Vdup0DZnbRFHVw3ELrKNW4E3yT25x/gwv3wU96NEh6KkWxO rlK2QQRXPcSGK6adxfONc9Fd8ax2P2PCBmuadOXONMl3GwFgim97fZSZ5SuSlIKvrlzJ BWtQ== X-Gm-Message-State: AOAM533Qr30iy+hLTtl9XVPdenxAARdY9oaXWJcDPEXg4s9ahLziXAQS bxScNJeM048/qsas2DQSS5UWcw== X-Received: by 2002:ac8:5ad5:: with SMTP id d21mr3421614qtd.345.1632962213405; Wed, 29 Sep 2021 17:36:53 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id h4sm815147qtb.67.2021.09.29.17.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 17:36:52 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mVk4C-007upE-BZ; Wed, 29 Sep 2021 21:36:52 -0300 Date: Wed, 29 Sep 2021 21:36:52 -0300 From: Jason Gunthorpe To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Stephen Bates , Christoph Hellwig , Dan Williams , Christian =?utf-8?B?S8O2bmln?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Jakowski Andrzej , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni Subject: Re: [PATCH v3 19/20] PCI/P2PDMA: introduce pci_mmap_p2pmem() Message-ID: <20210930003652.GH3544071@ziepe.ca> References: <20210916234100.122368-1-logang@deltatee.com> <20210916234100.122368-20-logang@deltatee.com> <20210928195518.GV3544071@ziepe.ca> <8d386273-c721-c919-9749-fc0a7dc1ed8b@deltatee.com> <20210929230543.GB3544071@ziepe.ca> <32ce26d7-86e9-f8d5-f0cf-40497946efe9@deltatee.com> <20210929233540.GF3544071@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29, 2021 at 05:49:36PM -0600, Logan Gunthorpe wrote: > Some of this seems out of date. Pretty sure the pages are not refcounted > with vmf_insert_mixed() and vmf_insert_mixed() is currently the only way > to use VM_MIXEDMAP mappings. Hum. vmf_insert_mixed() boils down to insert_pfn() which always sets the special bit, so vm_normal_page() returns NULL and thus the pages are not freed during zap. So, if the pages are always special and not refcounted all the docs seem really out of date - or rather they describe the situation without the special bit, I think. Why would DAX want to do this in the first place?? This means the address space zap is much more important that just speeding up destruction, it is essential for correctness since the PTEs are not holding refcounts naturally... Sigh. Jason