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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 F1A95C433E0 for ; Sat, 23 May 2020 21:33:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB70B207FB for ; Sat, 23 May 2020 21:33:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="ehwpCzIY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388100AbgEWVdO (ORCPT ); Sat, 23 May 2020 17:33:14 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:18215 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387847AbgEWVdN (ORCPT ); Sat, 23 May 2020 17:33:13 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sat, 23 May 2020 14:30:46 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sat, 23 May 2020 14:33:13 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sat, 23 May 2020 14:33:13 -0700 Received: from [10.2.58.199] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 23 May 2020 21:33:12 +0000 Subject: Re: [PATCH v2] fpga: dfl: afu: convert get_user_pages() --> pin_user_pages() To: Moritz Fischer CC: LKML , Xu Yilun , Wu Hao , References: <20200519201449.3136033-1-jhubbard@nvidia.com> <64aa1494-7570-5319-b096-ea354ff20431@nvidia.com> <20200523205717.GA443638@epycbox.lan> X-Nvconfidentiality: public From: John Hubbard Message-ID: Date: Sat, 23 May 2020 14:33:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200523205717.GA443638@epycbox.lan> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1590269446; bh=eRMBYMwT7HglaGDS/HEjHC3APgFjhB0IGthjLynCTmg=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=ehwpCzIY1PHJCvVslMEZpX9i9geALAhsYB0Ai9tSzWSshHQesNcmokU1NBC8Frg0s ZtF2HW3Gw1A3OMK8nFsWXTRNfXWuHlTa3L5atA0fNOmYrApWyNw7jTlozlSQdtURNQ jZNLBbCQA6uyLw5ZnnWP++axkxAdyC5CANl5+7GNztlv6U1UaYpWHZKnfkyfbj9HUy auMjf0YjOuvSPeGhSDw3U6EyZHmbHK3ix0JLsX70YvRqjxOU9O7EzjYbsxey5TGMpF byqhy153HPPvYVZPy1a+XMlQTzyS+y9+K2ieNfRTBIVcdFIJr8tAVrXcP0GuXgQkpM cx71DUtaXT3ug== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-05-23 13:57, Moritz Fischer wrote: > On Fri, May 22, 2020 at 06:52:34PM -0700, John Hubbard wrote: >> On 2020-05-19 13:14, John Hubbard wrote: >>> This code was using get_user_pages_fast(), in a "Case 2" scenario >>> (DMA/RDMA), using the categorization from [1]. That means that it's >>> time to convert the get_user_pages_fast() + put_page() calls to >>> pin_user_pages_fast() + unpin_user_pages() calls. >>> >>> There is some helpful background in [2]: basically, this is a small >>> part of fixing a long-standing disconnect between pinning pages, and >>> file systems' use of those pages. >>> >>> [1] Documentation/core-api/pin_user_pages.rst >>> >>> [2] "Explicit pinning of user-space pages": >>> https://lwn.net/Articles/807108/ >>> >>> Cc: Xu Yilun >>> Cc: Wu Hao >>> Cc: Moritz Fischer >>> Cc: linux-fpga@vger.kernel.org >>> Signed-off-by: John Hubbard >> >> >> Hi Moritz and FPGA developers, >> >> Is this OK? And if so, is it going into your git tree? Or should I >> send it up through a different tree? (I'm new to the FPGA development >> model). > > I can take it, sorry for sluggish response. > That's great news, thanks Moritz! Sorry to be pushy, just didn't want it to get lost. :) thanks, -- John Hubbard NVIDIA From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:18215 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387847AbgEWVdN (ORCPT ); Sat, 23 May 2020 17:33:13 -0400 Subject: Re: [PATCH v2] fpga: dfl: afu: convert get_user_pages() --> pin_user_pages() References: <20200519201449.3136033-1-jhubbard@nvidia.com> <64aa1494-7570-5319-b096-ea354ff20431@nvidia.com> <20200523205717.GA443638@epycbox.lan> From: John Hubbard Message-ID: Date: Sat, 23 May 2020 14:33:12 -0700 MIME-Version: 1.0 In-Reply-To: <20200523205717.GA443638@epycbox.lan> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fpga-owner@vger.kernel.org List-Id: linux-fpga@vger.kernel.org To: Moritz Fischer Cc: LKML , Xu Yilun , Wu Hao , linux-fpga@vger.kernel.org On 2020-05-23 13:57, Moritz Fischer wrote: > On Fri, May 22, 2020 at 06:52:34PM -0700, John Hubbard wrote: >> On 2020-05-19 13:14, John Hubbard wrote: >>> This code was using get_user_pages_fast(), in a "Case 2" scenario >>> (DMA/RDMA), using the categorization from [1]. That means that it's >>> time to convert the get_user_pages_fast() + put_page() calls to >>> pin_user_pages_fast() + unpin_user_pages() calls. >>> >>> There is some helpful background in [2]: basically, this is a small >>> part of fixing a long-standing disconnect between pinning pages, and >>> file systems' use of those pages. >>> >>> [1] Documentation/core-api/pin_user_pages.rst >>> >>> [2] "Explicit pinning of user-space pages": >>> https://lwn.net/Articles/807108/ >>> >>> Cc: Xu Yilun >>> Cc: Wu Hao >>> Cc: Moritz Fischer >>> Cc: linux-fpga@vger.kernel.org >>> Signed-off-by: John Hubbard >> >> >> Hi Moritz and FPGA developers, >> >> Is this OK? And if so, is it going into your git tree? Or should I >> send it up through a different tree? (I'm new to the FPGA development >> model). > > I can take it, sorry for sluggish response. > That's great news, thanks Moritz! Sorry to be pushy, just didn't want it to get lost. :) thanks, -- John Hubbard NVIDIA