Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1258966imj; Thu, 7 Feb 2019 21:22:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IbhEpyPni12RftOyI2Wb2sUJ5vxMXoxwIg41WpmnEcIPi/dATP66pn28LLoimU0swkFVENc X-Received: by 2002:a62:109b:: with SMTP id 27mr19991067pfq.227.1549603331436; Thu, 07 Feb 2019 21:22:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549603331; cv=none; d=google.com; s=arc-20160816; b=TxCLOD9nW81JSZGLWguAxxYq1etubCacTyo7sGN0n/ibEUa5njrymaID6ah8ZiOHXM eFuVfchzq5rGYEhnRfeuS+ZoeZkB9bHxySox2vQiib1szzE8HYBHIVjyIqsnkzVnNmv5 l9BW9pPcvPRIdTl9+dOxEq3j5KC+QN1nK8Gb2pLQjXAQHY58xWqwPqOCWpakQCy0iC4d pddtoE4sSF+QeJOFV484YN/RXmo4GJAsdbCDn4I8lFLSnOQLyo+kAmb8JXMbf2msMnmp WFbEOGEccs+1I44GLlkMXEiyqthSfhSN5zVN8NgpxRT68dMuf1E5wJ4Z4JvOemYUZMxn PKlQ== 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=BYbBSsXD8XXPJr8WmxtwPC6HBpOHhpTEB9wAZo2Q1Iw=; b=Bu9jtqonmQdLYf0GHtmY9PPnHMrVMt9Oe3Jf2fi5CEow07CoyTLYWsWSwdsn52djWV 9sJG0SyDKGN0BpdYj6EBeioAH1Ry+iFqIbqabNS0ECwRYraMqCqjebiskWPr7rblZCU3 V5pBRQAbO3xldepSFPZPDQ1ky8GYxzBkdi/W9bBInHATLEkelWe+t/uwpV8xobUWzjXl IejJ+YZXcvtPaHDobGOfcW1EyGuq1SUepf/tOQwZXm9RChDzKUuAojTq4IfsYqRqwDoH 1MwaydpeqG30Zs0sUYTez8boZUmAknu8Ow2Y56YIWzQ4miPZ1xFeDmQ4fzPABhy0yubV 34kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=ZY9qesP9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j11si1331790plb.253.2019.02.07.21.21.55; Thu, 07 Feb 2019 21:22:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=ZY9qesP9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726911AbfBHFTy (ORCPT + 99 others); Fri, 8 Feb 2019 00:19:54 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43915 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbfBHFTx (ORCPT ); Fri, 8 Feb 2019 00:19:53 -0500 Received: by mail-pl1-f194.google.com with SMTP id f90so894688plb.10 for ; Thu, 07 Feb 2019 21:19:53 -0800 (PST) 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=BYbBSsXD8XXPJr8WmxtwPC6HBpOHhpTEB9wAZo2Q1Iw=; b=ZY9qesP9VVn0x9e71+u4lkQ//uBh7kJgGvlvQKRWeoCf4hvZtlJxqBWlgNIsBozfuw PdiI4WYxwxhuhA+2Sgprj5UL9o5hea0yoh9+Ctc3FowkhG51kFr8aedwRShg+QKcaDCW tIY0lbhw0VWFe5rVm0M2wXVtSouGOAhLUfZ50+m3NGMVTTrnEeKRxLxi0BdKLdR7nIiA XEYfw1JdCfICZ/gylNCtg2bIU+Rm1+9QUR+dnNgdoU5lcQEY8JXoxLEdbOeFNsjs58Ms yjBkj2TK4LWgLjeiJEPhzVoyPpQRQIMnqvxzPKyKJF6lFGUzbvvWjTcEHrDFrmsmTVdQ Iftw== 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=BYbBSsXD8XXPJr8WmxtwPC6HBpOHhpTEB9wAZo2Q1Iw=; b=skKM9Zm/Ns5hP0G3+OGyX0ibu7shvOfIbjbPM2WSsmKiO/SSiE7DVQuuF5q3di0sLR OjEpkfiAYvO9GeK/bj2OESJ+AVKD/KEIrMJvfz52Q5CP7j5zxTMh3X+IDU+dN91+KAfN RMZHQBqvQJRr6doEZ0BsRlj9SQviKD/CIGo0XPfaNEHrTrnPiIyMaEjlmGE67LqZWrZq fTSPRCQKHImLZi046fDRWRdsQyTd0WN8EkZxP2SOzvFeF1xwueILvhZUYU3tbrxkkJtJ Zjz9m2Pfkjj7WGtef9D5AlqjrwrfaAY2fNny7w42tLI0kzV2Yh6Lj/vYhoddoNcDh6BY 4TQw== X-Gm-Message-State: AHQUAuYm9NIQP3yUi2GPtS8RujCHfUUxYhd9eMgVjF6shhVBsCSdsN3p 8dLlwDE17XxltjOK8Osk7nSEH/PswDo= X-Received: by 2002:a17:902:298a:: with SMTP id h10mr20875446plb.312.1549603192845; Thu, 07 Feb 2019 21:19:52 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id d16sm901999pgj.21.2019.02.07.21.19.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 21:19:51 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gryZq-0002AV-R9; Thu, 07 Feb 2019 22:19:50 -0700 Date: Thu, 7 Feb 2019 22:19:50 -0700 From: Jason Gunthorpe To: Dan Williams Cc: Dave Chinner , Doug Ledford , Christopher Lameter , Matthew Wilcox , Jan Kara , Ira Weiny , lsf-pc@lists.linux-foundation.org, linux-rdma , Linux MM , Linux Kernel Mailing List , John Hubbard , Jerome Glisse , Michal Hocko Subject: Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA Message-ID: <20190208051950.GA4283@ziepe.ca> References: <47820c4d696aee41225854071ec73373a273fd4a.camel@redhat.com> <01000168c43d594c-7979fcf8-b9c1-4bda-b29a-500efe001d66-000000@email.amazonses.com> <20190206210356.GZ6173@dastard> <20190206220828.GJ12227@ziepe.ca> <0c868bc615a60c44d618fb0183fcbe0c418c7c83.camel@redhat.com> <20190207035258.GD6173@dastard> <20190207052310.GA22726@ziepe.ca> <20190207171736.GD22726@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 07, 2019 at 03:54:58PM -0800, Dan Williams wrote: > > The only production worthy way is to have the FS be a partner in > > making this work without requiring revoke, so the critical RDMA > > traffic can operate safely. > > ...belies a path forward. Just swap out "FS be a partner" with "system > administrator be a partner". In other words, If the RDMA stack can't > tolerate an MR being disabled then the administrator needs to actively > disable the paths that would trigger it. Turn off reflink, don't > truncate, avoid any future FS feature that might generate unwanted > lease breaks. This is what I suggested already, except with explicit kernel aid, not left as some gordian riddle for the administrator to unravel. You already said it is too hard for expert FS developers to maintain a mode switch, it seems like a really big stretch to think application and systems architects will have any hope to do better. It makes much more sense for the admin to flip some kind of bit and the FS guarentees the safety that you are asking the admin to create. > We would need to make sure that lease notifications include the > information to identify the lease breaker to debug escapes that > might happen, but it is a solution that can be qualified to not > lease break. I think building a complicated lease framework and then telling everyone in user space to design around it so it never gets used would be very hard to explain and justify. Never mind the security implications if some seemingly harmless future filesystem change causes unexpected lease revokes across something like a tenant boundary. > In any event, this lets end users pick their filesystem > (modulo RDMA incompatible features), provides an enumeration of > lease break sources in the kernel, and opens up FS-DAX to a wider > array of RDMA adapters. In general this is what Linux has > historically done, give end users technology freedom. I think this is not the Linux model. The kernel should not allow unpriv user space to do an operation that could be unsafe. I continue to think this is is the best idea that has come up - but only if the filesystem is involved and expressly tells the kernel layers that this combination of DAX & filesystem is safe. Jason