From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B515C433E0 for ; Fri, 22 May 2020 11:40:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 83C9D206C3 for ; Fri, 22 May 2020 11:40:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fctbeo2r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83C9D206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E3F6480008; Fri, 22 May 2020 07:40:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF04C80007; Fri, 22 May 2020 07:40:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D063880008; Fri, 22 May 2020 07:40:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id B626E80007 for ; Fri, 22 May 2020 07:40:45 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7DE58180AD822 for ; Fri, 22 May 2020 11:40:45 +0000 (UTC) X-FDA: 76844162850.09.wheel85_5de39fa8c801d X-HE-Tag: wheel85_5de39fa8c801d X-Filterd-Recvd-Size: 5355 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 May 2020 11:40:45 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id r125so6299767lff.13 for ; Fri, 22 May 2020 04:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hj2fTCjbxOKsyZP7M3oTIyRA9mJ2Bc+fUg1m8uH2yYk=; b=Fctbeo2rUCXQwGpTpFGVse8+WCb+g1DgkimSxd0aywjWQzd7bhxHHSHfy1FP+QqJ5E HQGcAIndvBPaVq+mvvXrYxa60iZ270cp/hL7v335T389bW5HYMkEi/Mut44zha6NDaG4 UCrNm9pJDDi2UNXl+PlD6bv/w4smxNEG9g8AyCyft6tAOApW/apnSn16+WYKI0WwO/LX QygL+8MKePZCy7xTU8Q+o6DXxVRskTBMwRQQsFJ+VR7QHRA9Pic1hmOdE0dfFierlTBM XmumN0HJD7IHx+R0ZAzFlmPROpUU2YmKdDsZd/Q7eTLT58JceLPdRakROdwY5S4uTJxp Cehw== 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=Hj2fTCjbxOKsyZP7M3oTIyRA9mJ2Bc+fUg1m8uH2yYk=; b=hDvV5SxVS88PaxLTubsC/exQLm7vWMJK0LCMJklTu/1Pw7/g1wcBbJt2ipX2SD6orU DnrEgzuc317qF/Z8TnWLnowS92T5ZPtjv9uCGmnb3AUjc4as4ejtNRzlRS8lYS2HjLfJ 8suXBJJE1mNDiY5IYzRXRl9JMu+zGTw+pwx779w0OFgYfuhpJO4HWx/LGFQ2SUYS5gxn QFlhnjGChIB+Mr6KY90g9wbev+IKzLZr+gVpXbpVpCStYp8POgtuU3gE/R7AYGOAipTD fx/cDFNjZARDmYvoSDUOJZRjQNmJkvXb2V68zzgmuFphZhFc0hkX6Mr/nNVn/Ae3HU4I HkMQ== X-Gm-Message-State: AOAM530hVEqLwRwEipy0NpjXaqc9qCTEQdGZxUUuvljGgiDJfo0JZTID I2vcm/n+J9q0hanj6MwdDSlu+zadWS948+14RS8= X-Google-Smtp-Source: ABdhPJyCH6J7CaJtTe9PzunF+afSux/PTZRtv8MDXaAqacG2ZKbC4Y+MdKt3boWpmeIuz1KBImEFTAKzX+qejKOKM8k= X-Received: by 2002:ac2:53a2:: with SMTP id j2mr7071822lfh.139.1590147643673; Fri, 22 May 2020 04:40:43 -0700 (PDT) MIME-Version: 1.0 References: <20200519002124.2025955-1-jhubbard@nvidia.com> In-Reply-To: <20200519002124.2025955-1-jhubbard@nvidia.com> From: Souptick Joarder Date: Fri, 22 May 2020 17:10:32 +0530 Message-ID: Subject: Re: [PATCH 0/4] mm/gup, drm/i915: refactor gup_fast, convert to pin_user_pages() To: John Hubbard Cc: Andrew Morton , Matthew Wilcox , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Chris Wilson , Tvrtko Ursulin , Matthew Auld , intel-gfx@lists.freedesktop.org, dri-devel , LKML , Linux-MM Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi John, On Tue, May 19, 2020 at 5:51 AM John Hubbard wrote: > > This needs to go through Andrew's -mm tree, due to adding a new gup.c > routine. However, I would really love to have some testing from the > drm/i915 folks, because I haven't been able to run-time test that part > of it. > > Otherwise, though, the series has passed my basic run time testing: > some LTP tests, some xfs and etx4 non-destructive xfstests, and an > assortment of other smaller ones: vm selftests, io_uring_register, a > few more. But that's only on one particular machine. Also, cross-compile > tests for half a dozen arches all pass. > > Details: > > In order to convert the drm/i915 driver from get_user_pages() to > pin_user_pages(), a FOLL_PIN equivalent of __get_user_pages_fast() was > required. That led to refactoring __get_user_pages_fast(), with the > following goals: > > 1) As above: provide a pin_user_pages*() routine for drm/i915 to call, > in place of __get_user_pages_fast(), > > 2) Get rid of the gup.c duplicate code for walking page tables with > interrupts disabled. This duplicate code is a minor maintenance > problem anyway. > > 3) Make it easy for an upcoming patch from Souptick, which aims to > convert __get_user_pages_fast() to use a gup_flags argument, instead > of a bool writeable arg. Also, if this series looks good, we can > ask Souptick to change the name as well, to whatever the consensus > is. My initial recommendation is: get_user_pages_fast_only(), to > match the new pin_user_pages_only(). Shall I hold my changes till 5.8-rc1 , when this series will appear upstream ? > > John Hubbard (4): > mm/gup: move __get_user_pages_fast() down a few lines in gup.c > mm/gup: refactor and de-duplicate gup_fast() code > mm/gup: introduce pin_user_pages_fast_only() > drm/i915: convert get_user_pages() --> pin_user_pages() > > drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 22 +-- > include/linux/mm.h | 3 + > mm/gup.c | 150 ++++++++++++-------- > 3 files changed, 107 insertions(+), 68 deletions(-) > > > base-commit: 642b151f45dd54809ea00ecd3976a56c1ec9b53d > -- > 2.26.2 >