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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 9A33AC2D0A3 for ; Tue, 3 Nov 2020 19:18:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ED08320870 for ; Tue, 3 Nov 2020 19:18:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="Z035LvsY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED08320870 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 411586B0036; Tue, 3 Nov 2020 14:18:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C14E6B005D; Tue, 3 Nov 2020 14:18:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 289726B0068; Tue, 3 Nov 2020 14:18:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id E81726B0036 for ; Tue, 3 Nov 2020 14:18:52 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 8B8AB8249980 for ; Tue, 3 Nov 2020 19:18:52 +0000 (UTC) X-FDA: 77444069304.02.rail68_0804c96272bb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 6E48110097AA1 for ; Tue, 3 Nov 2020 19:18:52 +0000 (UTC) X-HE-Tag: rail68_0804c96272bb X-Filterd-Recvd-Size: 3890 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Nov 2020 19:18:51 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 03 Nov 2020 11:18:52 -0800 Received: from [10.2.49.167] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 3 Nov 2020 19:18:49 +0000 Subject: Re: [RFC PATCH resend 3/6] mm: Add refcount for preserving mm_struct without pgd To: Jason Gunthorpe , Jann Horn CC: Andrew Morton , Linux-MM , Eric Biederman , Oleg Nesterov , kernel list , Will Deacon , Kees Cook , Ingo Molnar References: <20201016230915.1972840-1-jannh@google.com> <20201016230915.1972840-4-jannh@google.com> <20201016232153.GD37159@ziepe.ca> <20201103132127.GK36674@ziepe.ca> From: John Hubbard Message-ID: <4f428d8e-b660-9e31-6968-b28f6d7088f5@nvidia.com> Date: Tue, 3 Nov 2020 11:18:49 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201103132127.GK36674@ziepe.ca> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1604431132; bh=+CPAgnnyqw7VL/JoIR0Kx+j9vZxF1jTOALVKJZvaioQ=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=Z035LvsYyiQh+Qrrs6mbfgKqZHCU4WAXlib5do+P2G30AYSolgzcwkc19NpY61nAc Y/ZmcmVUOabb4GLDzhrHM7bSHSIHdCFs6341uFVB5AMF/rzOj1t9S76lrSYV9M/NQe 22APW7CcQTQzEQ//2jwsYkfs49RuZZmGU5F02CKhaWp6fcgcNrLgjwZLMj+Bs0MIvR p5cZOutussLxBCurITL0hshae9TYDEqmRj43Egpry0X5IWWDM4APrbBjHCKiTH7cJx RRhfQYWsOsNzmJrnUan7JSjrgNjlr3r0+kDzmaMB86s3jLVmlEhnx3hm4Ll8cX+yxS ISc4zlZswZGOQ== 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 11/3/20 5:21 AM, Jason Gunthorpe wrote: > On Tue, Nov 03, 2020 at 04:19:11AM +0100, Jann Horn wrote: >> On Tue, Nov 3, 2020 at 3:11 AM Jann Horn wrote: >>> On Sat, Oct 17, 2020 at 2:30 AM Jann Horn wrote: >>>> On Sat, Oct 17, 2020 at 1:21 AM Jason Gunthorpe wrote: >>>>> On Sat, Oct 17, 2020 at 01:09:12AM +0200, Jann Horn wrote: >>>>>> Currently, mm_struct has two refcounts: ... > Either way can work, I liked the suggestion because it suggests an > good name for the ref: 'mmget_pgd' or somesuch > > What I don't like is how nonsensical the names here are becoming: > mmget/mmgrab/mm_ref > > Gives no impression at the callsite what is right/wrong > > Names like this: > mmget_struct > mmget_pgd > mmget_tables > What?! I had just resigned myself to a bimonthly exercise, re-memorizing the mm_struct naming correlation between grab, drop, get, put, count, and users. And now you want to make it directly understandable? :) > Make alot more sense to me.. > > I think this patch needs to do something about the naming.. > A third counter also seems like the tipping point, to me. thanks, -- John Hubbard NVIDIA