Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp295017ybi; Fri, 7 Jun 2019 08:11:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhCSM855ZyhE2YPVZCW0xGhEb/1IbQpFeiVha9gSyjIGER9jqO6dMfEsCZ//A3N+gvQcnH X-Received: by 2002:a63:ef56:: with SMTP id c22mr3155127pgk.13.1559920271744; Fri, 07 Jun 2019 08:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559920271; cv=none; d=google.com; s=arc-20160816; b=a3B1D/qlzro6ThnXlR8kpugTZnOIMbfKWkm7V/hEcwg8VqZGTQyWlDnpKWaZZDRvGV /wRLErnUVd0N65do3G6rrKhn9lgTEp8fd8+M0T7ZSdOGnK1YvNIv7Tyh671yRgRXwDwm F08H5a4v0wF6mB8W+9FRNWOx/BEjXQaDppph3zmVSEznHjGanzSzApWlSF64wD6tIDf4 CsAKRXAZLSKZSomLINYj7MgxGKNkvupcYEHgig8P/M8h1aGXeXPoy0gWQIO31CyH77D1 DCYuGIQbpztwKSwlqQd5tHk+NXu3fryzBRByJTMSvIR9kugHTWRo6uLIA/7Jc6NKPXY/ 75nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mtF5cAWsrYgtNZcy7Xm0z7hOgyvsIAMepLY84jhBIIY=; b=cyBAJvRhkv5Fy6Nrym9qm5Kww9vzylxSerrVK4IyGAcyVXcsdwoR6hFj7KL7mrewNF gARRsmOz+w402Qzdh9yutzqP1NcvTTE986wqJ+WLa7hQ8nW1ks4a0+sE7tQFhXZYcSIC ofhs9+c4+TVcforKe4b8UnpQmkrdLuy9m5NpaTi/GKcZYsJQsGGpc+Qk2XlXXbkZj5PH oUTxqXGJXvLARFYCfwfhqWXbNPOMthQnvFgnsxh3WZLK1Em5+6J0+xDmJrGXaN6Zt7c0 hkVu3hQdEJrNOCfpqYRzzdtARZ2jzTj/54xqeQrl/B+/1cOPKdIHkrues6buOGpy+e2z /ZWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=WYsyLuJw; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a90si1995968plc.284.2019.06.07.08.10.51; Fri, 07 Jun 2019 08:11:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=WYsyLuJw; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728486AbfFGPKR (ORCPT + 99 others); Fri, 7 Jun 2019 11:10:17 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:39922 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729851AbfFGPKQ (ORCPT ); Fri, 7 Jun 2019 11:10:16 -0400 Received: by mail-qt1-f193.google.com with SMTP id i34so2636309qta.6 for ; Fri, 07 Jun 2019 08:10:16 -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:user-agent; bh=mtF5cAWsrYgtNZcy7Xm0z7hOgyvsIAMepLY84jhBIIY=; b=WYsyLuJwZJIQkQf8wUWCq+MKSRiYgAlB3cZg5uiR6sfXzmT5qRPbG9DhevssrlPWqT btVD4AS17pELyqwsgZDkQw2P7FuITtTVQMrN8ttsGMNW1xgfpIRPBVOa0vjh1b2Q1GR1 KuOwYeQwWnuz6D+1FRguaiqcVs7bzdSKLArmkC9S3JiLqJpGoQtRUAt5WZRIgTPnLny4 IKSY1gSwXGY6RvgI08IKQsXM6qG3PGhAf3b+OAJpaapDK96fRJ2kOM5Yvdls9VHMdofH LPFgCkV+imozC4VVLOAwHIKBZyqQ6Svl+UIUCGPXrQKi5OfcTa6MmnRnnxQ4x38JcA+k g4gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mtF5cAWsrYgtNZcy7Xm0z7hOgyvsIAMepLY84jhBIIY=; b=bxBa4AMcidUOHqkpskaEReXDf44nyFpOG3CIRNgIjM2MOdjwIZAn6yo9IhtIJrLrkg xcIiTfUlUg/DWjtF22FXve/Guy0L6RRecWSQSjb0sb5ZZ8SiG55zuK5YzJfEtXWJdWSJ maHjZfpzSQI6ReREn+J37JVEHA3aYyLArsLgTqZVZIhIdyfuJ+4+u5BDp7YkhXHrBNFt CY2oJ2VcELFRO0MUZnhE5LwRS+bNsoYalBLEq+Li+3oqEWRdfECrCLWaPC1hq+4dY3FE 66yqpYjs6Q905RhmclA0ALJmZQNaiFr5OWouIhEbyBnxvmpPzmgD/1FbYIsfEN83oylN Kevw== X-Gm-Message-State: APjAAAU6HB9wNPFagjyBPahukEBi8oGf2PwlZ31iBp0MQikZjC4rRDZL evwVzzFX2tE0i7ngcenPiPL5BQ== X-Received: by 2002:ac8:4619:: with SMTP id p25mr14877922qtn.73.1559920216042; Fri, 07 Jun 2019 08:10:16 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id a11sm1103592qkn.26.2019.06.07.08.10.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jun 2019 08:10:15 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hZGVT-0006TX-4L; Fri, 07 Jun 2019 12:10:15 -0300 Date: Fri, 7 Jun 2019 12:10:15 -0300 From: Jason Gunthorpe To: Ira Weiny Cc: Jan Kara , Dan Williams , Theodore Ts'o , Jeff Layton , Dave Chinner , Matthew Wilcox , linux-xfs@vger.kernel.org, Andrew Morton , John Hubbard , =?utf-8?B?SsOpcsO0bWU=?= Glisse , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal Message-ID: <20190607151015.GJ14802@ziepe.ca> References: <20190606014544.8339-1-ira.weiny@intel.com> <20190606104203.GF7433@quack2.suse.cz> <20190606195114.GA30714@ziepe.ca> <20190606222228.GB11698@iweiny-DESK2.sc.intel.com> <20190607103636.GA12765@quack2.suse.cz> <20190607121729.GA14802@ziepe.ca> <20190607145213.GB14559@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190607145213.GB14559@iweiny-DESK2.sc.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Jun 07, 2019 at 07:52:13AM -0700, Ira Weiny wrote: > On Fri, Jun 07, 2019 at 09:17:29AM -0300, Jason Gunthorpe wrote: > > On Fri, Jun 07, 2019 at 12:36:36PM +0200, Jan Kara wrote: > > > > > Because the pins would be invisible to sysadmin from that point on. > > > > It is not invisible, it just shows up in a rdma specific kernel > > interface. You have to use rdma netlink to see the kernel object > > holding this pin. > > > > If this visibility is the main sticking point I suggest just enhancing > > the existing MR reporting to include the file info for current GUP > > pins and teaching lsof to collect information from there as well so it > > is easy to use. > > > > If the ownership of the lease transfers to the MR, and we report that > > ownership to userspace in a way lsof can find, then I think all the > > concerns that have been raised are met, right? > > I was contemplating some new lsof feature yesterday. But what I don't think we > want is sysadmins to have multiple tools for multiple subsystems. Or even have > to teach lsof something new for every potential new subsystem user of GUP pins. Well.. it is a bit tricky, but you'd have to arrange for the lease object to have a list of 'struct files' that are holding the lease open. The first would be the file that did the fcntl, the next would be all the files that did longterm GUP - which means longterm GUP has to have a chardev file/etc as well (seems OK) Then lsof could query the list of lease objects for each file it encounters and print them out too. Jason