linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@samsung.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: mm: add abstractions for mm_struct and vm_area_struct
Date: Tue, 23 Jul 2024 17:04:40 +0200	[thread overview]
Message-ID: <CAH5fLghzRWH3MSb2bwbk8EEA--iaaL8GXBU9UHZGq0th_CCA9w@mail.gmail.com> (raw)
In-Reply-To: <Zp_DIEOj0PtNywmA@casper.infradead.org>

On Tue, Jul 23, 2024 at 4:50 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Tue, Jul 23, 2024 at 02:32:03PM +0000, Alice Ryhl wrote:
> > +// SAFETY: It is safe to call `mmdrop` on another thread than where `mmgrab` was called.
>
> If I were reading the documentation, I might want to know if it's safe
> to call in interrupt context (either soft or hard).  ie can mmdrop
> sleep (if it turns out to be the last owner of the mm).

I'll add some information on that.

> > +/// A wrapper for the kernel's `struct vm_area_struct`.
> > +///
> > +/// It represents an area of virtual memory.
> > +#[repr(transparent)]
> > +pub struct Area {
> > +    vma: Opaque<bindings::vm_area_struct>,
> > +}
>
> That seems like a very generic name!  MMArea?  VMA?  Certainly when I'm
> talking to people, I say VMA.  struct vm_area_struct is a terrible name
> and I'd be happy to change it if we could stomach that churn.  If I were
> naming it today, I'd want to call it struct mm_area.

Yeah, you're right. I should change it. Renaming the C struct seems
like it would be a lot of work. For now, I'll rename it to VmArea to
match C.

Alice


  reply	other threads:[~2024-07-23 15:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 14:32 Alice Ryhl
2024-07-23 14:50 ` Matthew Wilcox
2024-07-23 15:04   ` Alice Ryhl [this message]
2024-07-26  8:10 ` Benno Lossin
     [not found]   ` <CAH5fLggDDXmD8Nj-r0_bbEfquuKfOeH7bJkcA4GA=kKk8=gi7w@mail.gmail.com>
2024-07-26  8:26     ` Benno Lossin
2024-07-26  8:33       ` Alice Ryhl
2024-07-26  8:32   ` Alice Ryhl
2024-07-26 13:36     ` Benno Lossin
2024-07-26 19:04       ` Alice Ryhl

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=CAH5fLghzRWH3MSb2bwbk8EEA--iaaL8GXBU9UHZGq0th_CCA9w@mail.gmail.com \
    --to=aliceryhl@google.com \
    --cc=a.hindborg@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.gaynor@gmail.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    --cc=willy@infradead.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