Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp167521imu; Wed, 12 Dec 2018 14:17:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/WbpmKfHWXwGLfVma+2hw0rgP7AwOcuZCiBRkv5wE4PSJFYZ7d24sfGE7+abIBihvMTgulo X-Received: by 2002:a62:6204:: with SMTP id w4mr22071453pfb.5.1544653043273; Wed, 12 Dec 2018 14:17:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544653043; cv=none; d=google.com; s=arc-20160816; b=f0JebBKIkb2vmpGYg5Une8HSHK3PDkLqN+M10bnqtLiajwUvSSLPoDvYMK1+zk8xtl oA+E0Q6IWpizh2Y7FCw842YWl5nnv+3ZnMMZbPN2+m4NqY5yGO0sThe0mdWZMEGHr4ey 25J0KqPOFNZeiUealpcOg5QSpNLTxFnuAfY1M4vI+ki9Zjlji8CPb1SnvUKASCENQ971 Pk4IPH3A9VcOqwrp6vomqDbZVMXQEkQhM/zX/17qEn1cX1SD7ZDKfWms+Js22NDSk6Gf JdM+yOM8VnC/gVDusCUoYCT37mlqJStvi7TWmx5qsuKd/NzE9ku7BsdVODdswXZlBTNC medQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=KGA3bm6xxyORqpFnzIhzzMY9AnnlL90zz9fGgnHhKDQ=; b=C/oX+h3A80DMOUOMPjkpzzfENtMffIkukp8aDDeNrO42tEuq89YoH3KOu9Fp4vF4ip q85B6BNGQVSHtFzRyYBJ+sfxOjSRJsm2l7TTgkIou7L6/D6Cxsvys0LyoTYQSzXEFp+M TbN3fTDBxZWtDvBJBuoPvhBETN44uwp+9kMv6Nlh1YaUf+uY5hIMSdaHfEsDRhx05Tui cegQu5YyH+1hTgnWbGfjcUiMdWyMxsBb6l9TaPVSc4JLd8/Mmwmg1Q4w0+6ZjQEtPJZv I+WQhkWrGVBxFcNWWHiCOz7dlLlqcnBOqNnDwrMj5HNG45lgNCgLtuBenprw+kJoe205 zOvw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si5990pgk.265.2018.12.12.14.17.07; Wed, 12 Dec 2018 14:17:23 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728501AbeLLWQP (ORCPT + 99 others); Wed, 12 Dec 2018 17:16:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53178 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbeLLWQN (ORCPT ); Wed, 12 Dec 2018 17:16:13 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A3A8331256B0; Wed, 12 Dec 2018 22:16:12 +0000 (UTC) Received: from redhat.com (ovpn-124-14.rdu2.redhat.com [10.10.124.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F28FD5D9C7; Wed, 12 Dec 2018 22:16:09 +0000 (UTC) Date: Wed, 12 Dec 2018 17:16:07 -0500 From: Jerome Glisse To: Matthew Wilcox Cc: Dan Williams , Jan Kara , John Hubbard , John Hubbard , Andrew Morton , Linux MM , tom@talpey.com, Al Viro , benve@cisco.com, Christoph Hellwig , Christopher Lameter , "Dalessandro, Dennis" , Doug Ledford , Jason Gunthorpe , Michal Hocko , Mike Marciniszyn , rcampbell@nvidia.com, Linux Kernel Mailing List , linux-fsdevel , "Weiny, Ira" Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions Message-ID: <20181212221607.GJ5037@redhat.com> References: <20181207191620.GD3293@redhat.com> <3c4d46c0-aced-f96f-1bf3-725d02f11b60@nvidia.com> <20181208022445.GA7024@redhat.com> <20181210102846.GC29289@quack2.suse.cz> <20181212150319.GA3432@redhat.com> <20181212213005.GE5037@redhat.com> <20181212215348.GF5037@redhat.com> <20181212221157.GL6830@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181212221157.GL6830@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 12 Dec 2018 22:16:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 12, 2018 at 02:11:57PM -0800, Matthew Wilcox wrote: > On Wed, Dec 12, 2018 at 04:53:49PM -0500, Jerome Glisse wrote: > > The mmu notifier i put forward is the emergency revoke ie last > > resort after driver have done everything it could to inform user- > > space and release the pages. So doing thing brutaly in it like > > reprogramming driver page table (which AFAIK is something you > > can do on any hardware wether the hardware will like it or not > > is a different question). > > You can't do it to an NVMe device. You submit the DMA addresses in > the command, and the device reads the command at submission time. > There's no way to change the DMA addresses for an in-flight command. But like for GPU you can wait for in flight commands right ? ie you can wait for the queue to be done. This is how GPU do GUP ie GUP submit commands to queue and wait in mmu notifier for queue to be done. CHeers, J?r?me