From patchwork Mon Feb 11 20:16:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 10806767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81E9D6C2 for ; Mon, 11 Feb 2019 20:17:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 721F428C9A for ; Mon, 11 Feb 2019 20:17:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 631382AF8D; Mon, 11 Feb 2019 20:17:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B00628C9A for ; Mon, 11 Feb 2019 20:17:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388524AbfBKURF (ORCPT ); Mon, 11 Feb 2019 15:17:05 -0500 Received: from mga14.intel.com ([192.55.52.115]:16955 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727302AbfBKURE (ORCPT ); Mon, 11 Feb 2019 15:17:04 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2019 12:17:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,360,1544515200"; d="scan'208";a="319498277" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga005.fm.intel.com with ESMTP; 11 Feb 2019 12:17:03 -0800 From: ira.weiny@intel.com To: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Daniel Borkmann , Davidlohr Bueso , netdev@vger.kernel.org Cc: Mike Marciniszyn , Dennis Dalessandro , Doug Ledford , Jason Gunthorpe , Andrew Morton , "Kirill A. Shutemov" , Dan Williams , Ira Weiny Subject: [PATCH 0/3] Add gup fast + longterm and use it in HFI1 Date: Mon, 11 Feb 2019 12:16:40 -0800 Message-Id: <20190211201643.7599-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ira Weiny NOTE: This series depends on my clean up patch to remove the write parameter from gup_fast_permitted()[1] HFI1 uses get_user_pages_fast() due to it performance advantages. Like RDMA, HFI1 pages can be held for a significant time. But get_user_pages_fast() does not protect against mapping of FS DAX pages. Introduce a get_user_pages_fast_longterm() which retains the performance while also adding the FS DAX checks. XDP has also shown interest in using this functionality.[2] [1] https://lkml.org/lkml/2019/2/11/237 [2] https://lkml.org/lkml/2019/2/11/1789 Ira Weiny (3): mm/gup: Change "write" parameter to flags mm/gup: Introduce get_user_pages_fast_longterm() IB/HFI1: Use new get_user_pages_fast_longterm() drivers/infiniband/hw/hfi1/user_pages.c | 2 +- include/linux/mm.h | 8 ++ mm/gup.c | 152 ++++++++++++++++-------- 3 files changed, 114 insertions(+), 48 deletions(-)