Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp238681imu; Sun, 4 Nov 2018 23:26:13 -0800 (PST) X-Google-Smtp-Source: AJdET5eMuG5NIe0H8jRxvHtA2PBVKljMyxOIbkeZP7dv28ajL2Guo3E0s/zaQDkDnBPQ9LmcNeSB X-Received: by 2002:a17:902:503:: with SMTP id 3-v6mr20221313plf.252.1541402773593; Sun, 04 Nov 2018 23:26:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541402773; cv=none; d=google.com; s=arc-20160816; b=Y3Bbtq4M1zckPXjzfpl+GbucSJ5dvLhhZ7725r/S84UeMCquQCQ9EuYcsmgAKbb0zX mlvdDlPO8N4/e4a04hg/kfZKdox4NvOzTAhC/Ta+Jjw4q0lWNo9H9M1kiFBh0h+zNduc JQ70iAqYYPqAh9ilvGVdhsttMEbZhMfu63BD0ld5VU2veowjJglmY9ErgzTyVKZFNv4a MN6XZJ1UxeiC+Zza5Q8Lir6oMadqw7CPgzcre7NbtgW+rEL+RGTG8Pm6TV0SeXNF3MhP ThIlr4lmLI4mo+ZcmdPDzlqHpdgagooUOiJDqLOFXf2luoAj7TWIdepWSyzwwgx7cjMB b1mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ReYcnE3LiIYKJSvJ8lc9RYRagqIEWXrM25ZXw9DLIFI=; b=k8jk235gsL3hfg5MRaDLRy2HVfa8TKNBkaCbrB/KmkQdnSFdosyh22JRNd2Z6aWJvf hMRJPldBNxNF7fG6m+myjLNV4m9uACWS8c701niw5EmnuMZCOibuw0Or55JC3uduJynX itrecY7HwOHPpHs4wh8PekI7/dF3RVvvGBdYUo6s7WNQOIOikTlLzBZHov1tcJI8hrEL cg4nK/ihhezGY2aGaemT9ImNjhCbkYqvuBVCFxExufvVX/uVVMgs/mCmSAcY2UgwpTMN 5uZNzqXdocZNq4v8uc34KPn9dkNxKU+rBjqwj3g4IUs/Vl2lufsbahl38myjVvzoBVVA w/ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=KG7BWaSJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e92-v6si42720624pld.45.2018.11.04.23.25.57; Sun, 04 Nov 2018 23:26:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=KG7BWaSJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729394AbeKEQnw (ORCPT + 99 others); Mon, 5 Nov 2018 11:43:52 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:19848 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729121AbeKEQnw (ORCPT ); Mon, 5 Nov 2018 11:43:52 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 04 Nov 2018 23:25:21 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 04 Nov 2018 23:25:35 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 04 Nov 2018 23:25:35 -0800 Received: from HQMAIL102.nvidia.com (172.18.146.10) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 5 Nov 2018 07:25:32 +0000 Received: from [10.110.48.28] (172.20.13.39) by HQMAIL102.nvidia.com (172.18.146.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 5 Nov 2018 07:25:32 +0000 Subject: Re: [PATCH v4 2/3] mm: introduce put_user_page*(), placeholder versions To: Jan Kara CC: Jason Gunthorpe , Andrew Morton , , Matthew Wilcox , Michal Hocko , Christopher Lameter , Dan Williams , , LKML , linux-rdma , , Al Viro , "Jerome Glisse" , Christoph Hellwig , "Ralph Campbell" References: <20181008211623.30796-1-jhubbard@nvidia.com> <20181008211623.30796-3-jhubbard@nvidia.com> <20181008171442.d3b3a1ea07d56c26d813a11e@linux-foundation.org> <5198a797-fa34-c859-ff9d-568834a85a83@nvidia.com> <20181010164541.ec4bf53f5a9e4ba6e5b52a21@linux-foundation.org> <20181011084929.GB8418@quack2.suse.cz> <20181011132013.GA5968@ziepe.ca> <97e89e08-5b94-240a-56e9-ece2b91f6dbc@nvidia.com> <20181018101951.GO23493@quack2.suse.cz> From: John Hubbard X-Nvconfidentiality: public Message-ID: <4f47f3d4-1b00-e534-309c-7fb044337040@nvidia.com> Date: Sun, 4 Nov 2018 23:25:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181018101951.GO23493@quack2.suse.cz> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL102.nvidia.com (172.18.146.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US-large Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1541402721; bh=ReYcnE3LiIYKJSvJ8lc9RYRagqIEWXrM25ZXw9DLIFI=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=KG7BWaSJO8jNFEu/qSw+p2BrGGH8eMI47YwOJrucbCskrETafvtWXRhRln1+sLmPw MbMnKYqARY8wXUJLmV+rkL2N+1FGfTLLoYtBzHhFqaDtgaAfRtc9s0wM+C4HmwjXrw bckMJ+QVR4ef+QHKYA+uhThuWpynF6yu7esAjalAyGNYWcbL4Xq5+5ALbXiYrBWE0G RMEzHARdydC44BNhVz3FtMsk+oFw6oHX10NA1aA1JUmoCG+ai1lbxvb5EisYqfJ1oT p0h8AtOjOFG5j14R9HpP+ZQc7fLqxZeZpyacS7j97iGEJ5jBhstVOwg1T8sKfvVq42 DGBcx3Krxfk4g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/18 3:19 AM, Jan Kara wrote: > On Thu 11-10-18 20:53:34, John Hubbard wrote: >> On 10/11/18 6:23 PM, John Hubbard wrote: >>> On 10/11/18 6:20 AM, Jason Gunthorpe wrote: >>>> On Thu, Oct 11, 2018 at 10:49:29AM +0200, Jan Kara wrote: [...] > Well, put_page() cannot assert page is not dma-pinned as someone can still > to get_page(), put_page() on dma-pinned page and that must not barf. But > put_page() could assert that if the page is pinned, refcount is >= > pincount. That will detect leaked pin references relatively quickly. > That assertion is definitely a life saver. I've been attempting a combination of finishing up more call site conversions, and runtime testing, and this lights up the missing conversions pretty nicely. As I mentioned in another thread just now, I'll send out an updated RFC this week, so that people can look through it well before the LPC (next week). thanks, -- John Hubbard NVIDIA