Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3104455imj; Mon, 11 Feb 2019 14:03:22 -0800 (PST) X-Google-Smtp-Source: AHgI3IYjP1eatIEhaK/PLHm8t8NFycWttVlZThmq67OAtjpJQXZN82sQC6febT4l5o+Hb4dcvp2C X-Received: by 2002:a17:902:bf06:: with SMTP id bi6mr443927plb.167.1549922602249; Mon, 11 Feb 2019 14:03:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549922602; cv=none; d=google.com; s=arc-20160816; b=IGmz+ho63nDvQQ5UeLPh+XV+fOD41VMRG56OnxkbRfRpnBeE47Q/u4Md5l8AKTmDFT 7VvrfAQCqezMnWW7YJOaXMxzGVHK8r3P4JMYi1HcKOTSw/3ueueFlzA/vCm2cYw6WAC2 MpRC1ms5n1x8VuRtav4yOW759FJscyxe/Ts+WgcjrMVZYjWEj8iagg7kloYOVnVFQw4n tIKArP7H/N1BYJU7DBMfnjvtp4JhbeYdr5TdBBN0ou9tPa/L9xRaYANQlS2Slak+KX2G 12Nf9XmmgDkGHUocwDViCE4ldZ0NDYaJNuldQq1rAimuQJoFm1LDtkeplQ/TXfV4AXPX Vusg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=vWs2aKXh4VkvG7WO8haiJ5PzQmL2tFLJDsIxpuuhupo=; b=LIyGSrfmo6AncRvtai9SBhectmVLg6N1iCiEaixWHacGtWc8yClsjRCKs/TcDj7iEA ap9wrg//cwQa6mKXXI6O7D06EvCoC9OeBFKzYdNFyrSTMvuSQDpdTJjWdAkD8nimTHID 8BTyhBdWebDRAqcbylEoQc6kY239uXnrra2rC9+bfvKXK5sdlwr9ji3WnWwbMbyE40rM LmTeVfBZYo5D03bD1DwHcrMYzPumePPlyCcl5yp2MO57HVbZkwcGJBk7robszy38ZMdg wD3gFEUWzvCKjTzRlSghQ251WaYpJbmB+rE2Y0PxLSqOuCalmoJ2FXJUN5oMIdeuaWns Amag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=EZQrmNGE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6si2112099pff.199.2019.02.11.14.03.06; Mon, 11 Feb 2019 14:03:22 -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=@nvidia.com header.s=n1 header.b=EZQrmNGE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727279AbfBKWBN (ORCPT + 99 others); Mon, 11 Feb 2019 17:01:13 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:11285 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726173AbfBKWBN (ORCPT ); Mon, 11 Feb 2019 17:01:13 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 11 Feb 2019 14:00:38 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 11 Feb 2019 14:01:12 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 11 Feb 2019 14:01:12 -0800 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 11 Feb 2019 22:01:11 +0000 Subject: Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm() To: Ira Weiny CC: Jason Gunthorpe , , , , Daniel Borkmann , Davidlohr Bueso , , Mike Marciniszyn , Dennis Dalessandro , Doug Ledford , Andrew Morton , "Kirill A. Shutemov" , Dan Williams References: <20190211201643.7599-1-ira.weiny@intel.com> <20190211201643.7599-3-ira.weiny@intel.com> <20190211203916.GA2771@ziepe.ca> <20190211212652.GA7790@iweiny-DESK2.sc.intel.com> <20190211215238.GA23825@iweiny-DESK2.sc.intel.com> From: John Hubbard X-Nvconfidentiality: public Message-ID: Date: Mon, 11 Feb 2019 14:01:11 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190211215238.GA23825@iweiny-DESK2.sc.intel.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL108.nvidia.com (172.18.146.13) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US-large Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1549922438; bh=vWs2aKXh4VkvG7WO8haiJ5PzQmL2tFLJDsIxpuuhupo=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=EZQrmNGEqpt0sljknlDD5qDlmVF+KBcIX1F9PjPhl1qC3uyH76fvnqkaxSFw8QeFl tNUm1VP4uk1PJDLX9jOZ49OA00wchP3s8+oAfLb+KGzX20/vXDU7FEpbLmMdwF0umt uXq1LTcC5dbPzJBXMHz7UN1qZrTsDZQhV6n6hq+Xtozit/Y+gfpqTlgGuqWmJxoape 2RbUjashm8TFMTMfSmdQZ/D5QzO3aaX9CB1SzVlUWoWsWOcysXLS/+8mwvJsrnKBLM sP9qgYuiorn9eS3zZkbff50xGSijAGyoiPxkSROf9nIPMLSb5T1O/uL854sjh/f9p+ oD9g8x5lI235Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/11/19 1:52 PM, Ira Weiny wrote: > On Mon, Feb 11, 2019 at 01:39:12PM -0800, John Hubbard wrote: >> On 2/11/19 1:26 PM, Ira Weiny wrote: >>> On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: >>>> On 2/11/19 12:39 PM, Jason Gunthorpe wrote: >>>>> On Mon, Feb 11, 2019 at 12:16:42PM -0800, ira.weiny@intel.com wrote: >>>>>> From: Ira Weiny >>>> [...] > Fair enough. But to do that correctly I think we will need to convert > get_user_pages_fast() to use flags as well. I have a version of this series > which includes a patch does this, but the patch touched a lot of subsystems and > a couple of different architectures...[1] > > I can't test them all. If we want to go that way I'm up for submitting the I have a similar problem, and a similar list of call sites, for the put_user_pages() conversion, so that file list looks familiar. And the arch-specific gup implementations are about to complicate my life too. :) > patch... But if we remove longterm in the future we may be left with a > get_user_pages_fast() which really only needs 1 flag. But perhaps overall we > would be better off? > > Ira I certainly think so, yes. thanks, -- John Hubbard NVIDIA > > > [1] mm/gup.c: Change GUP fast to use flags rather than write bool > > To facilitate additional options to get_user_pages_fast change the > singular write parameter to be the more generic gup_flags. > > This patch currently does not change any functionality. New > functionality will follow in subsequent patches. > > Many of the get_user_pages_fast call sites were unchanged because they > already used FOLL_WRITE or 0 as appropriate. > > Signed-off-by: Ira Weiny > --- > arch/mips/mm/gup.c | 11 ++++++----- > arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 ++-- > arch/powerpc/kvm/e500_mmu.c | 2 +- > arch/powerpc/mm/mmu_context_iommu.c | 4 ++-- > arch/s390/kvm/interrupt.c | 2 +- > arch/s390/mm/gup.c | 12 ++++++------ > arch/sh/mm/gup.c | 11 ++++++----- > arch/sparc/mm/gup.c | 9 +++++---- > arch/x86/kvm/paging_tmpl.h | 2 +- > arch/x86/kvm/svm.c | 2 +- > drivers/fpga/dfl-afu-dma-region.c | 2 +- > drivers/gpu/drm/via/via_dmablit.c | 3 ++- > drivers/infiniband/hw/hfi1/user_pages.c | 3 ++- > drivers/misc/genwqe/card_utils.c | 2 +- > drivers/misc/vmw_vmci/vmci_host.c | 2 +- > drivers/misc/vmw_vmci/vmci_queue_pair.c | 6 ++++-- > drivers/platform/goldfish/goldfish_pipe.c | 3 ++- > drivers/rapidio/devices/rio_mport_cdev.c | 4 +++- > drivers/sbus/char/oradax.c | 2 +- > drivers/scsi/st.c | 3 ++- > drivers/staging/gasket/gasket_page_table.c | 4 ++-- > drivers/tee/tee_shm.c | 2 +- > drivers/vfio/vfio_iommu_spapr_tce.c | 3 ++- > drivers/vhost/vhost.c | 2 +- > drivers/video/fbdev/pvr2fb.c | 2 +- > drivers/virt/fsl_hypervisor.c | 2 +- > drivers/xen/gntdev.c | 2 +- > fs/orangefs/orangefs-bufmap.c | 2 +- > include/linux/mm.h | 4 ++-- > kernel/futex.c | 2 +- > lib/iov_iter.c | 7 +++++-- > mm/gup.c | 10 +++++----- > mm/util.c | 8 ++++---- > net/ceph/pagevec.c | 2 +- > net/rds/info.c | 2 +- > net/rds/rdma.c | 3 ++- > 36 files changed, 81 insertions(+), 65 deletions(-) > >