mbox series

[0/3] Rename variables in mmu_notifier.c

Message ID 20200116163945.26956-1-jgg@ziepe.ca (mailing list archive)
Headers show
Series Rename variables in mmu_notifier.c | expand

Message

Jason Gunthorpe Jan. 16, 2020, 4:39 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

Linus has observed that the variable names here do not make a lot of sense,
revise them as discussed so the file has better readability.

The new names are:

  struct mmu_notifier_mm -> struct mmu_notifier_subscriptions
  mmu_notifier_mm or mmn_mm -> subscriptions
   The per mm_struct memory that holds all the notifier subscription list
   heads and interval tree

  mn -> subscription (of type struct mmu_notifier)
   A list based subscription to notifications

  mni -> interval_sub (of type struct mmu_interval_notifier)
   A VA interval based subscription to notifications

I had originaly thought to also change the struct names, and while they are
not ideal, it seems that the resulting tree wide churn is probably not
worthwhile considering the size.

This is intended to have no functional change.

Jason Gunthorpe (3):
  mm/mmu_notifier: Rename struct mmu_notifier_mm to
    mmu_notifier_subscriptions
  mm/mmu_notifiers: Use 'subscription' as the variable name for
    mmu_notifier
  mm/mmu_notifiers: Use 'interval_sub' as the variable for
    mmu_interval_notifier

 Documentation/vm/hmm.rst     |  20 +-
 include/linux/mm_types.h     |   2 +-
 include/linux/mmu_notifier.h |  86 ++---
 kernel/fork.c                |   4 +-
 mm/debug.c                   |   4 +-
 mm/mmu_notifier.c            | 585 +++++++++++++++++++----------------
 6 files changed, 375 insertions(+), 326 deletions(-)

Comments

Jason Gunthorpe Jan. 27, 2020, 8:52 p.m. UTC | #1
On Thu, Jan 16, 2020 at 12:39:42PM -0400, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg@mellanox.com>
> 
> Linus has observed that the variable names here do not make a lot of sense,
> revise them as discussed so the file has better readability.
> 
> The new names are:
> 
>   struct mmu_notifier_mm -> struct mmu_notifier_subscriptions
>   mmu_notifier_mm or mmn_mm -> subscriptions
>    The per mm_struct memory that holds all the notifier subscription list
>    heads and interval tree
> 
>   mn -> subscription (of type struct mmu_notifier)
>    A list based subscription to notifications
> 
>   mni -> interval_sub (of type struct mmu_interval_notifier)
>    A VA interval based subscription to notifications
> 
> I had originaly thought to also change the struct names, and while they are
> not ideal, it seems that the resulting tree wide churn is probably not
> worthwhile considering the size.
> 
> This is intended to have no functional change.
> 
> Jason Gunthorpe (3):
>   mm/mmu_notifier: Rename struct mmu_notifier_mm to
>     mmu_notifier_subscriptions
>   mm/mmu_notifiers: Use 'subscription' as the variable name for
>     mmu_notifier
>   mm/mmu_notifiers: Use 'interval_sub' as the variable for
>     mmu_interval_notifier

As there has been no comments, and Linus was favorable to the first
patch, I will go ahead with this during the merge window on the hmm.git
Thanks

Jason