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=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 62831C43141 for ; Fri, 15 Nov 2019 14:09:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1C59120729 for ; Fri, 15 Nov 2019 14:09:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="BFBIgmkk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C59120729 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BD04A6B000C; Fri, 15 Nov 2019 09:09:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BA6166B000E; Fri, 15 Nov 2019 09:09:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A95856B0010; Fri, 15 Nov 2019 09:09:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id 9482D6B000C for ; Fri, 15 Nov 2019 09:09:30 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 3EEA282499B9 for ; Fri, 15 Nov 2019 14:09:30 +0000 (UTC) X-FDA: 76158694500.24.shirt85_8d1999cdb204d X-HE-Tag: shirt85_8d1999cdb204d X-Filterd-Recvd-Size: 5780 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Nov 2019 14:09:29 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id z23so8136432qkj.10 for ; Fri, 15 Nov 2019 06:09:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=01834Iuy8wrTkyETdgSEfcddUW82cA+Rc6Zt+MvTCwg=; b=BFBIgmkk8QkntrHNjJLsvCL1a0ZURlA5X/gmLb4n3VPRP5m3aB6scRcD2DMxTLAV9P UaMtjJH/lJaxRT3MaYZLNwy8cw9D1M5/6iAxnqhClJH46gGawBEotmmVwz9bc8u3IFV9 a3v4lMSNKHekmvWmxSCO3xS9GuPfrTZZ9gfrHLPlSSz+de3k9e1mbvTuAMlgMSg1inD0 htevxD4Ti62AfDMDE+osEpAwbIBY+1VPeWYkc7W/CwzYOFcM3WvoA9tt0pcZZGXm+LdO O8XKMS5WarP50UJ1uTIL/tvlJnyEoGG2Ukx7eqBCtFPfW9ti43J0cbZRwFC28FPxF58w Wt7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=01834Iuy8wrTkyETdgSEfcddUW82cA+Rc6Zt+MvTCwg=; b=N3P+PdShtvkfa4FvDPNvJyDMOCauxwgkJ7MwWO4Y37wFauF0KJlifPmSIuTAyhyDk6 NilIX5YcDqPfQpJvIssXwDUYYlJoc6WVAYV+GUKBX16bFtIKNFyNC2W4LXToJ6OHBMHJ dIm0E/BYowDFfzdxU6MpJ4osfLGIgirLI1a/PkcX0tzRauHX28KAaUTUk4iCzOwtb7EB 9zlja3UcYXISlC+DcmZ3eIvKAKQa1iwatZLEN4WAI05UiDzM+0VwqArz6AEsZGn7c22u pa2THYrau5cL2Z8ubiJBK4AwP28Dq9jn8vG+a0VotxI+/bEI/Xs1UXroTo9NRCb5jZEG aouQ== X-Gm-Message-State: APjAAAV4xekQ6WzJumw5arb742XH5cNoTMfNFpHNmnxGvcU2HYP0Nma1 m3HXB/hw3jGJAc8MsGd50Kqjvg== X-Google-Smtp-Source: APXvYqySuuQ0WzAKMm3kXEkiDMguUlgyvE6K/2D67jOtzEpRUEwGr7GFZW94ehFUiDC6Dq2Nm3hHug== X-Received: by 2002:a37:76c6:: with SMTP id r189mr11712734qkc.303.1573826968699; Fri, 15 Nov 2019 06:09:28 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-180.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.180]) by smtp.gmail.com with ESMTPSA id m65sm4836053qte.54.2019.11.15.06.09.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Nov 2019 06:09:28 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iVcHv-0002xw-Lj; Fri, 15 Nov 2019 10:09:27 -0400 Date: Fri, 15 Nov 2019 10:09:27 -0400 From: Jason Gunthorpe To: John Hubbard Cc: Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jan Kara , Jens Axboe , Jonathan Corbet , =?utf-8?B?SsOpcsO0bWU=?= 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 v5 12/24] IB/{core,hw,umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP Message-ID: <20191115140927.GB4055@ziepe.ca> References: <20191115055340.1825745-1-jhubbard@nvidia.com> <20191115055340.1825745-13-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191115055340.1825745-13-jhubbard@nvidia.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Nov 14, 2019 at 09:53:28PM -0800, John Hubbard wrote: > Convert infiniband to use the new pin_user_pages*() calls. > > Also, revert earlier changes to Infiniband ODP that had it using > put_user_page(). ODP is "Case 3" in > Documentation/core-api/pin_user_pages.rst, which is to say, normal > get_user_pages() and put_page() is the API to use there. > > The new pin_user_pages*() calls replace corresponding get_user_pages*() > calls, and set the FOLL_PIN flag. The FOLL_PIN flag requires that the > caller must return the pages via put_user_page*() calls, but infiniband > was already doing that as part of an earlier commit. > > Signed-off-by: John Hubbard > --- > drivers/infiniband/core/umem.c | 2 +- > drivers/infiniband/core/umem_odp.c | 13 ++++++------- > drivers/infiniband/hw/hfi1/user_pages.c | 2 +- > drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +- > drivers/infiniband/hw/qib/qib_user_pages.c | 2 +- > drivers/infiniband/hw/qib/qib_user_sdma.c | 2 +- > drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +- > drivers/infiniband/sw/siw/siw_mem.c | 2 +- > 8 files changed, 13 insertions(+), 14 deletions(-) Ok Reviewed-by: Jason Gunthorpe Jason