[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9d2a7149-445c-4084-b88c-4c7833afa894@nvidia.com>
Date: Wed, 15 Jan 2025 12:20:39 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl
<aliceryhl@...gle.com>
CC: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Miguel Ojeda
<ojeda@...nel.org>, Matthew Wilcox <willy@...radead.org>, Vlastimil Babka
<vbabka@...e.cz>, "Liam R. Howlett" <Liam.Howlett@...cle.com>, Andrew Morton
<akpm@...ux-foundation.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>, Christian Brauner <brauner@...nel.org>, "Jann
Horn" <jannh@...gle.com>, Suren Baghdasaryan <surenb@...gle.com>, Alex Gaynor
<alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>, "Trevor
Gross" <tmgross@...ch.edu>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>, <rust-for-linux@...r.kernel.org>
Subject: Re: [PATCH v11 1/8] mm: rust: add abstraction for struct mm_struct
On 1/15/25 2:36 AM, Andreas Hindborg wrote:
> "Alice Ryhl" <aliceryhl@...gle.com> writes:
>> On Mon, Dec 16, 2024 at 3:50 PM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>>> "Alice Ryhl" <aliceryhl@...gle.com> writes:
...
>>>> +/// [`mmget_not_zero`]: Mm::mmget_not_zero
>>>> +#[repr(transparent)]
>>>> +pub struct Mm {
>>>
>>> Could we come up with a better name? `MemoryMap` or `MemoryMapping`?. You
>>> use `MMapReadGuard` later.
>>
>> Those names seem really confusing to me. The mmap syscall creates a
>> new VMA, but MemoryMap sounds like it's the thing that mmap creates.
>>
>> Lorenzo, what do you think? I'm inclined to just call it Mm since
>> that's what C calls it.
>
> Well I guess there is value in using same names as C. The additional
> docs you sent help a lot so I guess it is fine.
Hi Andreas!
>
> If we were writing from scratch I would have held hard on `AddressSpace`
> or `MemoryMap` over `Mm`. `Mm` has got to be one of the least
> descriptive names we can come up with.
>
...but, see the other thread: "Mm" is actually very effective in the context
of kernel development. And we are doing a perfect mix of kernel and Rust
development here. So it's not from scratch at all.
Kernel engineers will immediately know what "Mm" means! Really.
thanks,
--
John Hubbard
Powered by blists - more mailing lists