From: John Hubbard <jhubbard@nvidia.com>
To: Jason Gunthorpe <jgg@ziepe.ca>, Jann Horn <jannh@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux-MM <linux-mm@kvack.org>,
Eric Biederman <ebiederm@xmission.com>,
Oleg Nesterov <oleg@redhat.com>,
kernel list <linux-kernel@vger.kernel.org>,
Will Deacon <will@kernel.org>, Kees Cook <keescook@chromium.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [RFC PATCH resend 3/6] mm: Add refcount for preserving mm_struct without pgd
Date: Tue, 3 Nov 2020 11:18:49 -0800 [thread overview]
Message-ID: <4f428d8e-b660-9e31-6968-b28f6d7088f5@nvidia.com> (raw)
In-Reply-To: <20201103132127.GK36674@ziepe.ca>
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 <jannh@google.com> wrote:
>>> On Sat, Oct 17, 2020 at 2:30 AM Jann Horn <jannh@google.com> wrote:
>>>> On Sat, Oct 17, 2020 at 1:21 AM Jason Gunthorpe <jgg@ziepe.ca> 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
next prev parent reply other threads:[~2020-11-03 19:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 23:09 [RFC PATCH resend 0/6] mm and ptrace: Track dumpability until task is freed Jann Horn
2020-10-16 23:09 ` [RFC PATCH resend 1/6] ptrace: Keep mm around after exit_mm() for __ptrace_may_access() Jann Horn
2020-10-16 23:09 ` [RFC PATCH resend 2/6] refcount: Move refcount_t definition into linux/types.h Jann Horn
2020-10-16 23:09 ` [RFC PATCH resend 3/6] mm: Add refcount for preserving mm_struct without pgd Jann Horn
2020-10-16 23:21 ` Jason Gunthorpe
2020-10-17 0:30 ` Jann Horn
2020-11-03 2:11 ` Jann Horn
2020-11-03 3:19 ` Jann Horn
2020-11-03 13:21 ` Jason Gunthorpe
2020-11-03 19:18 ` John Hubbard [this message]
2020-10-16 23:09 ` [RFC PATCH resend 4/6] mm, oom: Use mm_ref()/mm_unref() and avoid mmdrop_async() Jann Horn
2020-10-16 23:09 ` [RFC PATCH resend 5/6] ptrace: Use mm_ref() for ->exit_mm Jann Horn
2020-10-16 23:09 ` [RFC PATCH resend 6/6] mm: remove now-unused mmdrop_async() Jann Horn
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=4f428d8e-b660-9e31-6968-b28f6d7088f5@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=jannh@google.com \
--cc=jgg@ziepe.ca \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox