Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7136201ybi; Thu, 13 Jun 2019 10:10:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzljLlkzdDjgcVmTVySG+o90Sfw8aEW9NzRvA9w38pnH+1bHxUEg+v2ep6k0a+KQ1TJCtKP X-Received: by 2002:a65:56c5:: with SMTP id w5mr31183609pgs.434.1560445834060; Thu, 13 Jun 2019 10:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560445834; cv=none; d=google.com; s=arc-20160816; b=yUEOzkdMiT5LsYY0PS8FP33hsi6g+EGGNZQNs8IJcK8s+76sKk+0ZJDsHebp5CrzBT LBADNtezBU9GK/baJ8bz7mkZYfZ9VLyB9kLssyFWhIl/0hSU3VwsHrGepuH4hzHuotNo lu/apHp5qNxdG8UFJ77zqZpJTiZci4rzWJTahdMUK50ZVU4a1VRYqi0+sePy5Zf8jMAf bX68CG+Oq5ty0e7wWsW/3V3AKHXWeIBcFlLGE+UPcEGvFqEC24E37EcAqnypxtxjegBF POrRgeXfpQE4qGNuLLNOQxP2ue/9Ebkx+3m1Kg93wqM66oWlIC371ZMB+Jn5DSJPO748 4PHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Bdl55fUd9OUfrgwift11oOf2CuCyNYJsaQ/2pJqMiX8=; b=szyDpRAx3VnYpmZRxn7nILqThMrrv6mwb0BDEWpQVDSBt40ijCr4KhcZIN74px1MKl wq/aM6V504og6LpMmRkJZnTd7UbShIpusL3qeJOO6SVLiuhmizKHsT77vEoNjp4bolbv KMhUwz+vsycs7Ovp8k0W+oDpeIx2fN2bipI9Hx9qQVt8hebPY84stuTW+PfUn/E4YhLr A9BR7v0veH95/B6gueHevYr5jD1IcxnQlNLZjPa9V9qe+Iwnra/Ff0HOlahwrOYW6kRn PPwDcfAS35rqCEjRvhpQtGPb8bX7sDg0WtD466xMnbo9/8eurSIDoMKMbAtZr/ZRKc4k 3xzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=TDdvtQWH; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si259597pgu.103.2019.06.13.10.10.19; Thu, 13 Jun 2019 10:10:34 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=TDdvtQWH; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393217AbfFMRD3 (ORCPT + 99 others); Thu, 13 Jun 2019 13:03:29 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:36497 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729443AbfFLWyc (ORCPT ); Wed, 12 Jun 2019 18:54:32 -0400 Received: by mail-oi1-f194.google.com with SMTP id w7so12972779oic.3 for ; Wed, 12 Jun 2019 15:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Bdl55fUd9OUfrgwift11oOf2CuCyNYJsaQ/2pJqMiX8=; b=TDdvtQWHOWeWDi3ya4dvSfYwmH6uUyvwLhp+t3pFlfqs6fcjGtEhlIbrtaKLrkMypK 3r/atyNnqdAwbVWCWb36k5W6rbANKEH05Zq/fvFhnbIMRVlG9MdVxZaKROsDcGxg5fsD xcJSZa1UHKrohPWZiLJYsIJPKe+yEk1iAWtIe7q0UI4HOt2ZVPruDMChcmE8v+JbGquZ zGgFJZ9TyYotfWPDbv2PbDOKp3zl5e1hmsd/9uCbz4MhdDtoN1em2rz6Z08xQRdK7PRW lz+4KI6GRAFXU1BeCj1XGUxgC4Zn//as5jdjihKbG8sNr4JMjs+LswufzA5pgK5q8yPQ G1VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Bdl55fUd9OUfrgwift11oOf2CuCyNYJsaQ/2pJqMiX8=; b=NDzJnOq39e+TDu7kvtOwHR9F2kO3vymyTer59drIdoRIuaDxSWr5o/GE12WEyQEr1k ofj9+GBInai+VgpRqi8BSq97uVNYjVtEUB78sAWlzpDpLKEp+DqbBdC4WcEHVLDO3LlI MtRDW8iErv6nJFqo2kav7fieJEw+Bn2bcoKszD0FAbdbbmUmJ27RZeAzbbxc1jSUovXZ pEW7nz6g9Ms/j/gxeH+QL0t/KyLaV7zPGHUFGnIVtRya4bmPUAIiCFFoL+LzrzsnLWs8 UOyyX0iUCennEUdxiQXS6666xMXmxHtVgjZ8zbqT/ImGO6i3yf/jig4ZpQiorPk3EpVo YoSQ== X-Gm-Message-State: APjAAAVWImOm03mhHIOXn6vk7Nx0Pnf46xefnvnee2mfl5qMjJNiJWiI Jaat72YKG/lEaabgOiJ6uI1kdKhVjd0b5S2Q6Jp0Lw== X-Received: by 2002:aca:ec82:: with SMTP id k124mr1023354oih.73.1560380070925; Wed, 12 Jun 2019 15:54:30 -0700 (PDT) MIME-Version: 1.0 References: <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> <20190612102917.GB14578@quack2.suse.cz> <20190612114721.GB3876@ziepe.ca> <20190612120907.GC14578@quack2.suse.cz> <20190612191421.GM3876@ziepe.ca> <20190612221336.GA27080@iweiny-DESK2.sc.intel.com> In-Reply-To: <20190612221336.GA27080@iweiny-DESK2.sc.intel.com> From: Dan Williams Date: Wed, 12 Jun 2019 15:54:19 -0700 Message-ID: Subject: Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal To: Ira Weiny Cc: Jason Gunthorpe , Jan Kara , "Theodore Ts'o" , Jeff Layton , Dave Chinner , Matthew Wilcox , linux-xfs , Andrew Morton , John Hubbard , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , linux-fsdevel , Linux Kernel Mailing List , linux-nvdimm , linux-ext4 , Linux MM Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jun 12, 2019 at 3:12 PM Ira Weiny wrote: > > On Wed, Jun 12, 2019 at 04:14:21PM -0300, Jason Gunthorpe wrote: > > On Wed, Jun 12, 2019 at 02:09:07PM +0200, Jan Kara wrote: > > > On Wed 12-06-19 08:47:21, Jason Gunthorpe wrote: > > > > On Wed, Jun 12, 2019 at 12:29:17PM +0200, Jan Kara wrote: > > > > > > > > > > > The main objection to the current ODP & DAX solution is that very > > > > > > > little HW can actually implement it, having the alternative still > > > > > > > require HW support doesn't seem like progress. > > > > > > > > > > > > > > I think we will eventually start seein some HW be able to do this > > > > > > > invalidation, but it won't be universal, and I'd rather leave it > > > > > > > optional, for recovery from truely catastrophic errors (ie my DAX is > > > > > > > on fire, I need to unplug it). > > > > > > > > > > > > Agreed. I think software wise there is not much some of the devices can do > > > > > > with such an "invalidate". > > > > > > > > > > So out of curiosity: What does RDMA driver do when userspace just closes > > > > > the file pointing to RDMA object? It has to handle that somehow by aborting > > > > > everything that's going on... And I wanted similar behavior here. > > > > > > > > It aborts *everything* connected to that file descriptor. Destroying > > > > everything avoids creating inconsistencies that destroying a subset > > > > would create. > > > > > > > > What has been talked about for lease break is not destroying anything > > > > but very selectively saying that one memory region linked to the GUP > > > > is no longer functional. > > > > > > OK, so what I had in mind was that if RDMA app doesn't play by the rules > > > and closes the file with existing pins (and thus layout lease) we would > > > force it to abort everything. Yes, it is disruptive but then the app didn't > > > obey the rule that it has to maintain file lease while holding pins. Thus > > > such situation should never happen unless the app is malicious / buggy. > > > > We do have the infrastructure to completely revoke the entire > > *content* of a FD (this is called device disassociate). It is > > basically close without the app doing close. But again it only works > > with some drivers. However, this is more likely something a driver > > could support without a HW change though. > > > > It is quite destructive as it forcibly kills everything RDMA related > > the process(es) are doing, but it is less violent than SIGKILL, and > > there is perhaps a way for the app to recover from this, if it is > > coded for it. > > I don't think many are... I think most would effectively be "killed" if this > happened to them. > > > > > My preference would be to avoid this scenario, but if it is really > > necessary, we could probably build it with some work. > > > > The only case we use it today is forced HW hot unplug, so it is rarely > > used and only for an 'emergency' like use case. > > I'd really like to avoid this as well. I think it will be very confusing for > RDMA apps to have their context suddenly be invalid. I think if we have a way > for admins to ID who is pinning a file the admin can take more appropriate > action on those processes. Up to and including killing the process. Can RDMA context invalidation, "device disassociate", be inflicted on a process from the outside? Identifying the pid of a pin holder only leaves SIGKILL of the entire process as the remediation for revoking a pin, and I assume admins would use the finer grained invalidation where it was available.