Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1657427ybx; Sat, 2 Nov 2019 04:05:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzUxMZowY2t1COv/4qg5Ez7CpyR3EMccZgr+vqSKiF5KSZRV+IzmrXueMNMYTL4WGmGc3V X-Received: by 2002:a50:f70d:: with SMTP id g13mr18398231edn.172.1572692715319; Sat, 02 Nov 2019 04:05:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572692715; cv=none; d=google.com; s=arc-20160816; b=psUBjkXY+rw9zNo4uHy/VN29mde5W7u3sNN65lvgBimAxq/c3UCtPLyi8QHSy++bDV PjoWrKjYja+AQ4We5PAKLZyQF91QEJf7yizjOsrvX+yB60/tdH9NRdy8sWatXCylEyb7 v/WNz84UQ8jolYJaxgNA9FzPuuu0ThTKB0ct+L97yIqWDDBMCVMY+G/yTEsD4Oei2UN0 wfJpNBnH1bMGL94j8jrCNmXT+dokMFJOI0YDVafFcRExloHQltUyz6O6MEAHk0TrNAmb S7Q/rZBzbIBllb7ameJ4y3z6xfir5HfjJi/81Vr621Sfgy51E8DGFnw/qvlmNM0d9ug8 9raQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=CERQU7VfCjLEr/rJwvt+hlrbR3H2o5EphPXYFNILk+0=; b=u3xgLXsv6xFYoIcdVfWTs3Quy/y/dITigV2yoIt6Gp6++ikReu9OFWMYKWg9qk1pXW XIiddvStKkwrbe7LNxTxYnM6iofWcUJMZwGqSuW7UiUIq8gdvCK21PxhxUYL+yqBc1/9 HBPgKpSSiu+ln4yLqFVV75JBa9GDaGRNOK6yvOnNAnuUqXFAv+fYYN2S+I1+DlREwHsM i8KrgLnxdic8llJDT+5cANCaWnc+zPMr+vonYftNCEQYeftp+QneXRbfgG8wQoUj23QP n346tuHq6oTBe439aFlKd07BV3YEFD36r8FggR22tUY/u1OTNhMatesOOC32x92rr+rH VOYA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si3382926eda.131.2019.11.02.04.04.49; Sat, 02 Nov 2019 04:05:15 -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; 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 S1726749AbfKBLB4 (ORCPT + 99 others); Sat, 2 Nov 2019 07:01:56 -0400 Received: from mga18.intel.com ([134.134.136.126]:24973 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbfKBLBz (ORCPT ); Sat, 2 Nov 2019 07:01:55 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2019 04:01:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,259,1569308400"; d="scan'208";a="206632673" Received: from mohseni-mobl2.ger.corp.intel.com (HELO btopel-mobl.ger.intel.com) ([10.252.42.93]) by FMSMGA003.fm.intel.com with ESMTP; 02 Nov 2019 04:01:44 -0700 Subject: Re: [PATCH 11/19] net/xdp: set FOLL_PIN via pin_user_pages() To: John Hubbard , Andrew Morton Cc: Al Viro , Alex Williamson , Benjamin Herrenschmidt , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-mm@kvack.org, LKML References: <20191030224930.3990755-1-jhubbard@nvidia.com> <20191030224930.3990755-12-jhubbard@nvidia.com> From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Message-ID: <67cd4960-bc17-9603-8d4d-b7b2f68bb373@intel.com> Date: Sat, 2 Nov 2019 12:01:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20191030224930.3990755-12-jhubbard@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-10-30 23:49, John Hubbard wrote: > Convert net/xdp to use the new pin_longterm_pages() call, which sets > FOLL_PIN. Setting FOLL_PIN is now required for code that requires > tracking of pinned pages. > > Signed-off-by: John Hubbard Acked-by: Björn Töpel > --- > net/xdp/xdp_umem.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c > index 16d5f353163a..4d56dfb1139a 100644 > --- a/net/xdp/xdp_umem.c > +++ b/net/xdp/xdp_umem.c > @@ -285,8 +285,8 @@ static int xdp_umem_pin_pages(struct xdp_umem *umem) > return -ENOMEM; > > down_read(¤t->mm->mmap_sem); > - npgs = get_user_pages(umem->address, umem->npgs, > - gup_flags | FOLL_LONGTERM, &umem->pgs[0], NULL); > + npgs = pin_longterm_pages(umem->address, umem->npgs, gup_flags, > + &umem->pgs[0], NULL); > up_read(¤t->mm->mmap_sem); > > if (npgs != umem->npgs) { >