Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp102876ybx; Thu, 31 Oct 2019 16:43:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOupKq7gfvYVvNrr/Jxn/Y4Sc1/6fwIbgObUSNsPXHnjt7U+eOq0TWt8Oz0ZRxYTzMmT6v X-Received: by 2002:a50:bb48:: with SMTP id y66mr9453622ede.66.1572565432033; Thu, 31 Oct 2019 16:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572565432; cv=none; d=google.com; s=arc-20160816; b=o7cxE3b3YvlJhPi4Hp9UdTnGwSx75hUXa4i8K4fLcgY+qbXPjYsrZcKY8ea4upLJ8d LIJCDbdlxEeLcjFLc/swqcfM/e5u1iTpNn6rcLkIsDZlMU5w6W+M33/nUkh+uVgNuFpY amE9iaBD3lrJ5CJ/mZIs931WRXx2bH+PGCf38j+Y+0WswkqZfmyLbb8i8wc4QAlQho3c nxcc++KyWks2LUERQK8wp6Yyf3PK0iZoHGR9KPDHijRnv+EGddhtF2N9N+m5Et7IHxly 1+AiQhgBX0uT7ndnAFLM7Wr7rfz4qRP2R2iAoiQytYG6db5odFxtENnp+crD6EaiYyxD uJsw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8Ahk6zZSC9MuKlTOelB5KtoT/ulM3uIa2gGmZ6/JWfQ=; b=0g75djwVuHJp7OA4A2tHE9tuuSVaBquz2d9UtsVwnCjyFGxPPelCQmVIxBYoXwBBNM DwCSoxFXkMmtVKUfTWdZpbo36E+eIWFykJrViQajBNQcdQdmMW4jK5r4ZWWJHDGqm+Co /PBVTb3vYU6o7faR73ETkx4bflpJJrGk50vLpqDdGgD4DCen5GDhdtm1OB3VxlYpSr38 0dn3JmhkG28Vkr94zLgsjukUeAbOVlzeFITK9sm6+lndG0gdEc97IedT3B7X/FNsguhp CzcF2dG2OpOsxwlTpWEGJiiN4gOrlb1PXn/Fkqhroty0JfJjmrXB0YDekw6BEmEhHsBB s9Cw== 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 n16si4453188ejy.278.2019.10.31.16.43.28; Thu, 31 Oct 2019 16:43:52 -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 S1728634AbfJaXhp (ORCPT + 99 others); Thu, 31 Oct 2019 19:37:45 -0400 Received: from mga02.intel.com ([134.134.136.20]:45455 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727922AbfJaXho (ORCPT ); Thu, 31 Oct 2019 19:37:44 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2019 16:37:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,253,1569308400"; d="scan'208";a="375412814" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by orsmga005.jf.intel.com with ESMTP; 31 Oct 2019 16:37:41 -0700 Date: Thu, 31 Oct 2019 16:37:41 -0700 From: Ira Weiny To: John Hubbard Cc: Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?iso-8859-1?B?Suly9G1l?= Glisse , 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 Subject: Re: [PATCH 11/19] net/xdp: set FOLL_PIN via pin_user_pages() Message-ID: <20191031233740.GK14771@iweiny-DESK2.sc.intel.com> References: <20191030224930.3990755-1-jhubbard@nvidia.com> <20191030224930.3990755-12-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191030224930.3990755-12-jhubbard@nvidia.com> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 30, 2019 at 03:49:22PM -0700, 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. > Reviewed-by: Ira Weiny > Signed-off-by: John Hubbard > --- > 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) { > -- > 2.23.0 >