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.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 A36E0C17449 for ; Tue, 12 Nov 2019 20:44:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 754A2214E0 for ; Tue, 12 Nov 2019 20:44:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="AsvHvDs3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727238AbfKLUow (ORCPT ); Tue, 12 Nov 2019 15:44:52 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:36060 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727186AbfKLUov (ORCPT ); Tue, 12 Nov 2019 15:44:51 -0500 Received: by mail-qt1-f193.google.com with SMTP id y10so21319879qto.3 for ; Tue, 12 Nov 2019 12:44:51 -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=XIC1APSxWrFcW1GblyShF0CTBN3WBCz4HlbvzX3i8nA=; b=AsvHvDs3axCMUqe+N7mXppqZcG4z4QzjW7DgwuxQQSvowjzw09zSM8n30iqPxyhiVG Xh8VyKwma0MzyaZ4I7in3iXleDEuEusIaoOY6nDlenNeAk67Wg5jNcvcitJtB14ouZSU jEwtlMvkVKE/9wAQOETCpzIOvdkPz6MUeIKWQaYMSrFJbWX7VcVwtA5CNXlEKm0VsyqY ifzvXwANYm60xkTRX8oLmVVhv+FGDqeTm28/AUUM6Qiw102m5SB7HZ3RG7baH2DiI3v+ pcZdlJkq9BzOBgC+D5ynKGUuwhq6rk47T2j6RjHfuuaJ84S/d0bRcfAl5P4tkZR1pUiM WWGA== 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=XIC1APSxWrFcW1GblyShF0CTBN3WBCz4HlbvzX3i8nA=; b=URvsTxRGMqi+dSePiwkbbqSTlIDnxAuQbakjJTdYG3Up3L/dbcACivpvaDqNebQNyF e5IirtlMokMxmAffDBwnL3a0g2+vP7aJlaj/UNAL/ljLhqvhD7wzKs0L2rnMQ0VrY04W hZNhUuctm1tK/Du4RWGRpbbWeqBCB3mitLFG0eAkNrxV0NIxRodMH3tlUetqstZ/KzF8 f2DWfxxXNC6J9r8Lk7TJJaAyABmiUDjjOvHmNN9Bu/UYdINOj71257xi3gjefG1b6hLi iRn7B4xjYmql+JzPCl7RERDY4InPt1rydbBzxs8e59h5bUAyokTmB5A7itWb2w+631hg A4Tw== X-Gm-Message-State: APjAAAX7Rp5j6mCjQtGxGGBhoDNoilSM+fmdnooi3qTDRP/QbdmQdwSz gnwavDieN5FSE9elBjVPhkedAA== X-Google-Smtp-Source: APXvYqxT1AevYU83mBSAAzVL5cKCr9RO3QTTsZEZsQx1j+Xe2+nGL/UnUh0Po7qNt16fHJ031L5RZg== X-Received: by 2002:ac8:6641:: with SMTP id j1mr34362241qtp.48.1573591490500; Tue, 12 Nov 2019 12:44:50 -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 u67sm4906223qkf.115.2019.11.12.12.44.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Nov 2019 12:44:49 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iUd1t-00047P-Dy; Tue, 12 Nov 2019 16:44:49 -0400 Date: Tue, 12 Nov 2019 16:44:49 -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 v3 11/23] IB/{core,hw,umem}: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*() Message-ID: <20191112204449.GF5584@ziepe.ca> References: <20191112000700.3455038-1-jhubbard@nvidia.com> <20191112000700.3455038-12-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191112000700.3455038-12-jhubbard@nvidia.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 11, 2019 at 04:06:48PM -0800, John Hubbard wrote: > @@ -542,7 +541,7 @@ static int ib_umem_odp_map_dma_single_page( > } > > out: > - put_user_page(page); > + put_page(page); > > if (remove_existing_mapping) { > ib_umem_notifier_start_account(umem_odp); > @@ -639,13 +638,14 @@ int ib_umem_odp_map_dma_pages(struct ib_umem_odp *umem_odp, u64 user_virt, > /* > * Note: this might result in redundent page getting. We can > * avoid this by checking dma_list to be 0 before calling > - * get_user_pages. However, this make the code much more > - * complex (and doesn't gain us much performance in most use > - * cases). > + * get_user_pages. However, this makes the code much > + * more complex (and doesn't gain us much performance in most > + * use cases). > */ > npages = get_user_pages_remote(owning_process, owning_mm, > - user_virt, gup_num_pages, > - flags, local_page_list, NULL, NULL); > + user_virt, gup_num_pages, > + flags, local_page_list, NULL, > + NULL); > up_read(&owning_mm->mmap_sem); This is just whitespace churn? Drop it.. Jason