Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4210752imm; Mon, 18 Jun 2018 10:58:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJPfPAOe/RSbVib4EIUty/VXqPD6AmJ6nrzD5udEPHG6SJE/db+AObPBr9V0fRaD27piESd X-Received: by 2002:a17:902:1007:: with SMTP id b7-v6mr15111841pla.88.1529344680383; Mon, 18 Jun 2018 10:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529344680; cv=none; d=google.com; s=arc-20160816; b=tXInfKhdMfTupU5nQJlYRzqak+9GxXTl6Hx7JY6TQahitp0wVm+aL5TeULQcKoS1/G Bph495z6To1mavkdtyV8NNW0zz50ZCyxonurCSuf3TQmzfQ2+n2vzdhcAM6DoHocgDXs uZSRtepD3k+0ACrS35giLEu/z8/Fv0X0y0nTcdAL9g5DaTORoYiUNPBJcfwlAR/1DbgS nkuKKs1XKcwD6qY7Q2IlHw2lUjRbDmmJzAx6Il8cC3d4V/Avb/R3OEsXeg11yumAyhHH 7Neg7tyGgEzCq+MxMwLNvHZ2vCEhoJHQaTla3/9WqEV8ya+6+nAkCwmzBHWpkKJfvyeK ESlw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Rph5+Y+F6PdZUwPl1lor6KUCFbf01GvttqiPpMA/WZ8=; b=WBcZRfzTnY2ZN6uh5fGurSkK61n7La2W/olpx6nAv3AwOktpLNCqsRs4AORi/RwWzs pEnV6Ii+kM6iC68Sfy6W9+H5Jl3mU2FNkkNYIdvASOfyTK24OS9EeyaHCdluzi6wE/YP DosBQytDH+q88xgNwsBCfstmlr9HmvlITEjEPkTaGknwqGXKIjN+lvMIuNXMR6F0S1EH 4YrJ9mFVzie+YCEiI04/3w9U6Monl9jAD07bkE8Zu4OLDYFd1H6ytjrUSAGueiVNkB++ XoTjDXsst7TKWyO7g47zV2c1uK97JoZRu+/kQXU6JV3O8MocGINbjkoP0NYdn+9hYZW1 OO2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=IFBx3tTR; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11-v6si5711591pfg.46.2018.06.18.10.57.46; Mon, 18 Jun 2018 10:58:00 -0700 (PDT) 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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=IFBx3tTR; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935610AbeFRR47 (ORCPT + 99 others); Mon, 18 Jun 2018 13:56:59 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:43117 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935544AbeFRR46 (ORCPT ); Mon, 18 Jun 2018 13:56:58 -0400 Received: by mail-ot0-f195.google.com with SMTP id i19-v6so19477518otk.10 for ; Mon, 18 Jun 2018 10:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Rph5+Y+F6PdZUwPl1lor6KUCFbf01GvttqiPpMA/WZ8=; b=IFBx3tTR05nB1YuWfM6iDxmNRxKMum3ra/5uv4NmTLRTnFPoxbbNdaZ77/mxD9iZPj CoLZiOCBOxiidEOKzyjo1TIXbE3FO2yNI2Gl1QgKITEkr+zU3i0Yki0OC6Ro0iAW0upe vGHwCDgPsn3R6fwXlw8qxAzGCJj82tLTzO6/ouHgL3PG2uwVzPGMCpSCQWNrMSzdxl7r C/huTBcr2T2KjdiJpsbOf91jIhbqvctclsnHwbA3kFnZULYtOXsyVSsYOBqd9NgrNyk1 o+0mR79I17KAq6wIYp1QBw+4UUOMyYdn7FvZHd4PrTWt3cn8qbkDqQBT0oV05eQ4Uel/ 9QbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Rph5+Y+F6PdZUwPl1lor6KUCFbf01GvttqiPpMA/WZ8=; b=aowx8XIgTHtewdzJR4F92BhCepSGxkoERwKXaKfCOivUCb1eu11qrA/nBd8d33wfIu 0tQgblK4msMgq9YXrKSEOCatKSISZ+IUGOgu+iA6WgQMYcFHJeYXa5Aqy+5EbcNlcVSe B9wtxcuduAt8lUQqj+kVkPlODlyb/dwjyRW+MoMGT59+FkfYM86R7q4Rqmnjv6DRZOlT BJ7mmgZVGlHGC+GmgpTNX5k9ehoJnPOE3qp0ZdpdwD94CunfBGmEAq643goTkdRjALNm Nr//7v5QbuF1lCfixzUNqS14HZntK6g9hgGcp7BYLaiiKwxFPsdN85d75UkRyZy5Gr5Z Ue5g== X-Gm-Message-State: APt69E2GcPRTdVK/Ww+jd/tgTL071pyLe9mx8Uub6E/F1+ZVh4sX7mn0 ZI8yNCi/2J8jP+XGXyRwaddyCGFGgH8ky56ApFjz9g== X-Received: by 2002:a9d:1076:: with SMTP id o51-v6mr7940584oto.292.1529344617722; Mon, 18 Jun 2018 10:56:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2ea9:0:0:0:0:0 with HTTP; Mon, 18 Jun 2018 10:56:57 -0700 (PDT) In-Reply-To: References: <20180617012510.20139-1-jhubbard@nvidia.com> <20180617012510.20139-3-jhubbard@nvidia.com> <20180617200432.krw36wrcwidb25cj@ziepe.ca> <311eba48-60f1-b6cc-d001-5cc3ed4d76a9@nvidia.com> <20180618081258.GB16991@lst.de> From: Dan Williams Date: Mon, 18 Jun 2018 10:56:57 -0700 Message-ID: Subject: Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*() To: John Hubbard Cc: Christoph Hellwig , Jason Gunthorpe , john.hubbard@gmail.com, Matthew Wilcox , Michal Hocko , Christopher Lameter , Jan Kara , Linux MM , LKML , linux-rdma Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: > On 06/18/2018 01:12 AM, Christoph Hellwig wrote: >> On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: >>> Yes. However, my thinking was: get_user_pages() can become a way to indicate that >>> these pages are going to be treated specially. In particular, the caller >>> does not really want or need to support certain file operations, while the >>> page is flagged this way. >>> >>> If necessary, we could add a new API call. >> >> That API call is called get_user_pages_longterm. > > OK...I had the impression that this was just semi-temporary API for dax, but > given that it's an exported symbol, I guess it really is here to stay. The plan is to go back and provide api changes that bypass get_user_page_longterm() for RDMA. However, for VFIO and others, it's not clear what we could do. In the VFIO case the guest would need to be prepared handle the revocation.