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.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 E3C86C2D0C9 for ; Fri, 13 Dec 2019 10:19:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 92C532073D for ; Fri, 13 Dec 2019 10:19:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="Ap0FGuiB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92C532073D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 462318E0007; Fri, 13 Dec 2019 05:19:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EBA48E0001; Fri, 13 Dec 2019 05:19:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B29C8E0007; Fri, 13 Dec 2019 05:19:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id 106F88E0001 for ; Fri, 13 Dec 2019 05:19:22 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id C0214181AEF15 for ; Fri, 13 Dec 2019 10:19:21 +0000 (UTC) X-FDA: 76259720922.13.smell88_34911b98dfd08 X-HE-Tag: smell88_34911b98dfd08 X-Filterd-Recvd-Size: 7101 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Fri, 13 Dec 2019 10:19:21 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id c14so6022189wrn.7 for ; Fri, 13 Dec 2019 02:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rl6ZcpYNx9OU5/nEbfBo5yylHG5ar169zdHs7M50F4Q=; b=Ap0FGuiBLoc7CtJsj51ddw+Fe6G5hC9uLNn75596J5Cu1boRP8Hx4/X+SsUFptCl/Q 4QdXTyu9jjysyr2JBOZZkONFripkTFG1nJ6Je9FXEKJyJV3CS23bW7QqwatOtTVrW34S /3MuLnSkpFz69g6E4iETKNuOb9eg/WRwlc/rI= 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=rl6ZcpYNx9OU5/nEbfBo5yylHG5ar169zdHs7M50F4Q=; b=Cm26iHf6H20kFotsoKawSMDUCuHCQDNiNuGhC4TN55XCmQI1f9I0XWZskLyYpuzJtG eWMCNyqu3x3sXV4x3T9ZqvuXDS8IAVdp7QVngRj2DO15fUcnhs/WeBcZNF/sjnvRlVhP 9Lk5m3ZU8pxVKnpkZW1PIxy08whFACwy7hTx30Wiv2jHLMjbWKSsde7JIENWN2emnbfQ QrPLQc2QcXRPLAmgQeEJElMx+mr2zZenEOl8EdpIm4B+Oy9WVPTPhsk8Tp1h6afxsCHc GyBWKDqh49CBkAJ9DwXtavpt/sM4PMCe9vDJCVElTGjfGMK/bzQ0t9PIUGgdQ5WfFQM3 72IA== X-Gm-Message-State: APjAAAUVxZblNZHZ2N0NXWPGs3va+a8QDgi4eKTkIeo1XeM1vQSKOTu3 pkQVUdJWyaDcAsuvtH2nxg2Pyg== X-Google-Smtp-Source: APXvYqyhmTb9L+Ty2qqWHWby6TsBUoPJB8m/X3BYq7Z4RTM7jDbTx/v8gsKAoFlcC2n53nTyeYCmrQ== X-Received: by 2002:adf:fe12:: with SMTP id n18mr11521520wrr.158.1576232359891; Fri, 13 Dec 2019 02:19:19 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:564b:0:7567:bb67:3d7f:f863]) by smtp.gmail.com with ESMTPSA id x1sm9393930wru.50.2019.12.13.02.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 02:19:18 -0800 (PST) Date: Fri, 13 Dec 2019 11:19:16 +0100 From: Daniel Vetter To: Jason Gunthorpe Cc: Jerome Glisse , Ralph Campbell , David Airlie , "Kuehling, Felix" , Dan Williams , "dri-devel@lists.freedesktop.org" , "linux-mm@kvack.org" , "amd-gfx@lists.freedesktop.org" , "Deucher, Alexander" , Andrew Morton , Linus Torvalds , Christoph Hellwig , "linux-rdma@vger.kernel.org" Subject: Re: [GIT PULL] Please pull hmm changes Message-ID: <20191213101916.GD624164@phenom.ffwll.local> Mail-Followup-To: Jason Gunthorpe , Jerome Glisse , Ralph Campbell , David Airlie , "Kuehling, Felix" , Dan Williams , "dri-devel@lists.freedesktop.org" , "linux-mm@kvack.org" , "amd-gfx@lists.freedesktop.org" , "Deucher, Alexander" , Andrew Morton , Linus Torvalds , Christoph Hellwig , "linux-rdma@vger.kernel.org" References: <20191125204248.GA2485@ziepe.ca> <20191203024206.GC5795@mellanox.com> <20191205160324.GB5819@redhat.com> <20191211225703.GE3434@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211225703.GE3434@mellanox.com> X-Operating-System: Linux phenom 5.3.0-2-amd64 User-Agent: Mutt/1.12.2 (2019-09-21) 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 Wed, Dec 11, 2019 at 10:57:13PM +0000, Jason Gunthorpe wrote: > On Thu, Dec 05, 2019 at 11:03:24AM -0500, Jerome Glisse wrote: > > > > struct mmu_notifier_mm (ie the mm->mmu_notifier_mm) > > > -> mmn_mm > > > struct mm_struct > > > -> mm > > > struct mmu_notifier (ie the user subscription to the mm_struct) > > > -> mn > > > struct mmu_interval_notifier (the other kind of user subscription) > > > -> mni > > > > What about "interval" the context should already tell people > > it is related to mmu notifier and thus a notifier. I would > > just remove the notifier suffix, this would match the below > > range. > > Interval could be a good replacement for mni in the mm/mmu_notififer > file if we don't do the wholesale rename > > > > I think it would be overall nicer with better names for the original > > > structs. Perhaps: > > > > > > mmn_* - MMU notifier prefix > > > mmn_state <- struct mmu_notifier_mm > > > mmn_subscription (mmn_sub) <- struct mmu_notifier > > > mmn_range_subscription (mmn_range_sub) <- struct mmu_interval_notifier > > > mmn_invalidate_desc <- struct mmu_notifier_range > > > > This looks good. > > Well, lets just bite the bullet then and switch it. Do you like > 'state'? I thought that was the weakest one Since you're asking, here's my bikeshed. I kinda agree _state looks a bit strange for this, what about a _link suffix in the spirit of struct list_head link; The other common name is "node", but I think that's confusing in the context of mm code. The purpose of this struct is to link everything together (and yes it carries also some state, but the main job is to link a mm_struct to a mmu_notifier). At least for me a _state is configuration state for a specific object, not something that links a bunch of things together. But I'm biased on this, since we use that pattern in drm for all the display state tracking. Also feel free to ignore my bikeshed :-) Aside from this I think the proposed names are a solid improvement. -Daniel > > We could use mmnotif as the prefix, this makes the longest: > > struct mmnotif_range_subscription > > Which is reasonable enough > > > Maybe we can do a semantic patch to do convertion and then Linus > > can easily apply the patch by just re-running the coccinelle. > > I tried this last time I renamed everything, it was OK, but it missed > updating the comments. So it still needs some by-hand helping. > > I'll make some patches next week when I get back. > > Jason > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch