All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Jason Gunthorpe <jgg@mellanox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Christoph Hellwig <hch@lst.de>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	Ralph Campbell <rcampbell@nvidia.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [GIT PULL] Please pull hmm changes
Date: Thu, 5 Dec 2019 15:03:56 -0800	[thread overview]
Message-ID: <2f915b2d-ad97-a314-40f0-d0e571f896ba@nvidia.com> (raw)
In-Reply-To: <20191203024206.GC5795@mellanox.com>

On 12/2/19 6:42 PM, Jason Gunthorpe wrote:
...
> Regarding the ugly names.. Naming has been really hard here because
> currently everything is a 'mmu notifier' and the natural abberviations
> from there are crummy. Here is the basic summary:
> 
> 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
> struct mmu_notifier_range (ie the args to invalidate_range)
>    -> range
> 
> I can send a patch to switch mmn_mm to mmu_notifier_mm, which is the
> only pre-existing name for this value. But IIRC, it is a somewhat ugly
> with long line wrapping. 'mni' is a pain, I have to reflect on that.
> (honesly, I dislike mmu_notififer_mm quite a lot too)
> 
> 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
> 
> At least this is how I describe them in my mind..  This is a lot of
> churn, and spreads through many drivers. This is why I kept the names
> as-is and we ended up with the also quite bad 'mmu_interval_notifier'
> 
> Maybe just switch mmu_notifier_mm for mmn_state and leave the drivers
> alone?
> 
> Anyone on the CC list have advice?
> 
> Jason

No advice, just a naming idea similar in spirit to Jerome's suggestion
(use a longer descriptive word, and don't try to capture the entire phrase):
use "notif" in place of the unloved "mmn". So partially, approximately like 
this:

notif_*                                    <- MMU notifier prefix
notif_state                                <- struct mmu_notifier_mm
notif_subscription (notif_sub)             <- struct mmu_notifier
notif_invalidate_desc                      <- struct mmu_notifier_range*
notif_range_subscription (notif_range_sub) <- struct mmu_interval_notifier



thanks,
-- 
John Hubbard
NVIDIA

WARNING: multiple messages have this Message-ID (diff)
From: John Hubbard <jhubbard@nvidia.com>
To: Jason Gunthorpe <jgg@mellanox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>,
	David Airlie <airlied@linux.ie>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>, Christoph Hellwig <hch@lst.de>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dan Williams <dan.j.williams@intel.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [GIT PULL] Please pull hmm changes
Date: Thu, 5 Dec 2019 15:03:56 -0800	[thread overview]
Message-ID: <2f915b2d-ad97-a314-40f0-d0e571f896ba@nvidia.com> (raw)
In-Reply-To: <20191203024206.GC5795@mellanox.com>

On 12/2/19 6:42 PM, Jason Gunthorpe wrote:
...
> Regarding the ugly names.. Naming has been really hard here because
> currently everything is a 'mmu notifier' and the natural abberviations
> from there are crummy. Here is the basic summary:
> 
> 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
> struct mmu_notifier_range (ie the args to invalidate_range)
>    -> range
> 
> I can send a patch to switch mmn_mm to mmu_notifier_mm, which is the
> only pre-existing name for this value. But IIRC, it is a somewhat ugly
> with long line wrapping. 'mni' is a pain, I have to reflect on that.
> (honesly, I dislike mmu_notififer_mm quite a lot too)
> 
> 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
> 
> At least this is how I describe them in my mind..  This is a lot of
> churn, and spreads through many drivers. This is why I kept the names
> as-is and we ended up with the also quite bad 'mmu_interval_notifier'
> 
> Maybe just switch mmu_notifier_mm for mmn_state and leave the drivers
> alone?
> 
> Anyone on the CC list have advice?
> 
> Jason

No advice, just a naming idea similar in spirit to Jerome's suggestion
(use a longer descriptive word, and don't try to capture the entire phrase):
use "notif" in place of the unloved "mmn". So partially, approximately like 
this:

notif_*                                    <- MMU notifier prefix
notif_state                                <- struct mmu_notifier_mm
notif_subscription (notif_sub)             <- struct mmu_notifier
notif_invalidate_desc                      <- struct mmu_notifier_range*
notif_range_subscription (notif_range_sub) <- struct mmu_interval_notifier



thanks,
-- 
John Hubbard
NVIDIA
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: John Hubbard <jhubbard@nvidia.com>
To: Jason Gunthorpe <jgg@mellanox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>,
	David Airlie <airlied@linux.ie>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>, Christoph Hellwig <hch@lst.de>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dan Williams <dan.j.williams@intel.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [GIT PULL] Please pull hmm changes
Date: Thu, 5 Dec 2019 15:03:56 -0800	[thread overview]
Message-ID: <2f915b2d-ad97-a314-40f0-d0e571f896ba@nvidia.com> (raw)
In-Reply-To: <20191203024206.GC5795@mellanox.com>

On 12/2/19 6:42 PM, Jason Gunthorpe wrote:
...
> Regarding the ugly names.. Naming has been really hard here because
> currently everything is a 'mmu notifier' and the natural abberviations
> from there are crummy. Here is the basic summary:
> 
> 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
> struct mmu_notifier_range (ie the args to invalidate_range)
>    -> range
> 
> I can send a patch to switch mmn_mm to mmu_notifier_mm, which is the
> only pre-existing name for this value. But IIRC, it is a somewhat ugly
> with long line wrapping. 'mni' is a pain, I have to reflect on that.
> (honesly, I dislike mmu_notififer_mm quite a lot too)
> 
> 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
> 
> At least this is how I describe them in my mind..  This is a lot of
> churn, and spreads through many drivers. This is why I kept the names
> as-is and we ended up with the also quite bad 'mmu_interval_notifier'
> 
> Maybe just switch mmu_notifier_mm for mmn_state and leave the drivers
> alone?
> 
> Anyone on the CC list have advice?
> 
> Jason

No advice, just a naming idea similar in spirit to Jerome's suggestion
(use a longer descriptive word, and don't try to capture the entire phrase):
use "notif" in place of the unloved "mmn". So partially, approximately like 
this:

notif_*                                    <- MMU notifier prefix
notif_state                                <- struct mmu_notifier_mm
notif_subscription (notif_sub)             <- struct mmu_notifier
notif_invalidate_desc                      <- struct mmu_notifier_range*
notif_range_subscription (notif_range_sub) <- struct mmu_interval_notifier



thanks,
-- 
John Hubbard
NVIDIA
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-12-05 23:04 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 20:42 [GIT PULL] Please pull hmm changes Jason Gunthorpe
2019-11-25 20:42 ` Jason Gunthorpe
2019-11-25 20:42 ` Jason Gunthorpe
2019-11-25 20:42 ` Jason Gunthorpe
2019-11-30 18:03 ` Linus Torvalds
2019-11-30 18:03   ` Linus Torvalds
2019-11-30 18:03   ` Linus Torvalds
2019-11-30 18:03   ` Linus Torvalds
2019-11-30 18:23   ` Linus Torvalds
2019-11-30 18:23     ` Linus Torvalds
2019-11-30 18:23     ` Linus Torvalds
2019-11-30 18:23     ` Linus Torvalds
2019-12-03  2:42     ` Jason Gunthorpe
2019-12-03  2:42       ` Jason Gunthorpe
2019-12-03  2:42       ` Jason Gunthorpe
2019-12-03  2:42       ` Jason Gunthorpe
2019-12-05 16:03       ` Jerome Glisse
2019-12-05 16:03         ` Jerome Glisse
2019-12-05 16:03         ` Jerome Glisse
2019-12-11 22:57         ` Jason Gunthorpe
2019-12-11 22:57           ` Jason Gunthorpe
2019-12-11 22:57           ` Jason Gunthorpe
2019-12-13 10:19           ` Daniel Vetter
2019-12-13 10:19             ` Daniel Vetter
2019-12-13 10:19             ` Daniel Vetter
2019-12-18 14:59             ` Jason Gunthorpe
2019-12-18 14:59               ` Jason Gunthorpe
2019-12-18 14:59               ` Jason Gunthorpe
2019-12-18 16:53               ` Linus Torvalds
2019-12-18 16:53                 ` Linus Torvalds
2019-12-18 16:53                 ` Linus Torvalds
2019-12-18 16:53                 ` Linus Torvalds
2019-12-18 18:37                 ` Jason Gunthorpe
2019-12-18 18:37                   ` Jason Gunthorpe
2019-12-18 18:37                   ` Jason Gunthorpe
2019-12-18 19:33                   ` Linus Torvalds
2019-12-18 19:33                     ` Linus Torvalds
2019-12-18 19:33                     ` Linus Torvalds
2019-12-18 19:33                     ` Linus Torvalds
2019-12-05 23:03       ` John Hubbard [this message]
2019-12-05 23:03         ` John Hubbard
2019-12-05 23:03         ` John Hubbard
2019-12-11 22:47         ` Jason Gunthorpe
2019-12-11 22:47           ` Jason Gunthorpe
2019-12-11 22:47           ` Jason Gunthorpe
2019-11-30 18:35 ` Linus Torvalds
2019-11-30 18:35   ` Linus Torvalds
2019-11-30 18:35   ` Linus Torvalds
2019-11-30 18:35   ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2020-08-04 15:06 Jason Gunthorpe
2020-08-05 20:33 ` pr-tracker-bot
2020-06-01 18:25 Jason Gunthorpe
2020-06-02 22:20 ` pr-tracker-bot
2020-03-30 17:57 [GIT PULL] Please pull HMM changes Jason Gunthorpe
2020-03-30 19:54 ` Nathan Chancellor
2020-03-30 20:08   ` Jason Gunthorpe
2019-07-30 11:58 [GIT PULL] Please pull hmm changes Jason Gunthorpe
2019-07-30 20:40 ` pr-tracker-bot
2019-07-30 20:40   ` pr-tracker-bot
2019-07-09 19:24 Jason Gunthorpe
2019-07-15  2:48 ` Linus Torvalds
2019-07-15  2:48   ` Linus Torvalds
2019-07-15  3:00 ` pr-tracker-bot
2019-07-15  3:00   ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f915b2d-ad97-a314-40f0-d0e571f896ba@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@lst.de \
    --cc=jgg@mellanox.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rcampbell@nvidia.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.