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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 B52C8C282CE for ; Mon, 11 Feb 2019 21:43:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90F2B2081B for ; Mon, 11 Feb 2019 21:43:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727766AbfBKVnJ (ORCPT ); Mon, 11 Feb 2019 16:43:09 -0500 Received: from mga12.intel.com ([192.55.52.136]:7266 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbfBKVnJ (ORCPT ); Mon, 11 Feb 2019 16:43:09 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2019 13:43:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,360,1544515200"; d="scan'208";a="123692351" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga008.fm.intel.com with ESMTP; 11 Feb 2019 13:43:08 -0800 Date: Mon, 11 Feb 2019 13:42:57 -0800 From: Ira Weiny To: Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Daniel Borkmann , netdev@vger.kernel.org, Mike Marciniszyn , Dennis Dalessandro , Doug Ledford , Andrew Morton , "Kirill A. Shutemov" , Dan Williams Subject: Re: [PATCH 0/3] Add gup fast + longterm and use it in HFI1 Message-ID: <20190211214257.GA7891@iweiny-DESK2.sc.intel.com> References: <20190211201643.7599-1-ira.weiny@intel.com> <20190211203417.a2c2kbmjai43flyz@linux-r8p5> <20190211204710.GE24692@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190211204710.GE24692@ziepe.ca> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Feb 11, 2019 at 01:47:10PM -0700, Jason Gunthorpe wrote: > On Mon, Feb 11, 2019 at 12:34:17PM -0800, Davidlohr Bueso wrote: > > On Mon, 11 Feb 2019, ira.weiny@intel.com wrote: > > > 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() > > > > Out of curiosity, are you planning on having all rdma drivers > > use get_user_pages_fast_longterm()? Ie: > > > > hw/mthca/mthca_memfree.c: ret = get_user_pages_fast(uaddr & PAGE_MASK, 1, FOLL_WRITE, pages); > > This one is certainly a mistake - this should be done with a umem. It looks like this is mapping a page allocated by user space for a doorbell?!?! And that this is supporting the old memory free cards. I remember that these cards used system memory instead of memory on the cards but why it expects user space to allocate that memory and how it all works is way too old for me to even try to remember. This does not seem to be allocating memory regions. Jason, do you want a patch to just convert these calls and consider it legacy code? Ira > > Jason