From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 465EAC43334 for ; Wed, 6 Jul 2022 06:51:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0DEC8E0002; Wed, 6 Jul 2022 02:51:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBE078E0001; Wed, 6 Jul 2022 02:51:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAC788E0002; Wed, 6 Jul 2022 02:51:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 983668E0001 for ; Wed, 6 Jul 2022 02:51:33 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6506F607E8 for ; Wed, 6 Jul 2022 06:51:33 +0000 (UTC) X-FDA: 79655754066.19.14A9441 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf12.hostedemail.com (Postfix) with ESMTP id B90934000E for ; Wed, 6 Jul 2022 06:51:32 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 79E0F67373; Wed, 6 Jul 2022 08:51:27 +0200 (CEST) Date: Wed, 6 Jul 2022 08:51:27 +0200 From: Christoph Hellwig To: Logan Gunthorpe Cc: Greg Kroah-Hartman , Christoph Hellwig , Jason Gunthorpe , 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 , Dan Williams , Christian =?iso-8859-1?Q?K=F6nig?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni , Ralph Campbell , Bjorn Helgaas Subject: Re: [PATCH v7 20/21] PCI/P2PDMA: Introduce pci_mmap_p2pmem() Message-ID: <20220706065127.GA27132@lst.de> References: <20220705135102.GE23621@ziepe.ca> <20220705161240.GB13721@lst.de> <20220705164315.GB14484@lst.de> <20220705165039.GB14566@lst.de> <1bd43ef7-0403-bd25-087c-d54d5af677e4@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657090293; a=rsa-sha256; cv=none; b=hyJLsUq0bYmjLH6jzwbL8jtNOf+VXGDFQTjVTw66qU1QYg6fI/h8t4Lp7JNGBiBUKbit7i eWXXHHpCmpQyTVnICVGpsKEsQg5QLGAu9sQJlVAgunhWx/QWiTg7PEe1jGG+ye5peKuqg7 9KJfxlNg2qd6affoBLvrY42Ek98jdyo= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; dmarc=none; spf=none (imf12.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657090293; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U7HTFOsPYHoY2+jtInKvQNIromPx7OWzOgUegE3v3Nk=; b=fjH8HWS0vmV6uxD51mLJgjjlVSBNuRl21trCa6okfcbl4i+ZTvx5gl9hBPg8Q7Nv6wkaj6 auet15wPjBjmMmeBeoLUGrG4sRGkIh8+aZ/iImdoYLXNkkYe2cpZxh9JKTlPga1UG/qnTp nqjpMr0f4Xz+RnAGAvpoXWf0de1l9oY= X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: B90934000E Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=none; spf=none (imf12.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-Stat-Signature: f45ncsd6btio7b5djiybcnbrxkaoad15 X-HE-Tag: 1657090292-168053 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jul 05, 2022 at 12:16:45PM -0600, Logan Gunthorpe wrote: > The current version does it through a char device, but that requires > creating a simple_fs and anon_inode for teardown on driver removal, plus > a bunch of hooks through the driver that exposes it (NVMe, in this case) > to set this all up. > > Christoph is suggesting a sysfs interface which could potentially avoid > the anon_inode and all of the extra hooks. It has some significant > benefits and maybe some small downsides, but I wouldn't describe it as > horrid. Yeah, I don't think is is horrible, it fits in with the resource files for the BARs, and solves a lot of problems. Greg, can you explain what would be so bad about it?