lkml.org 
[lkml]   [2023]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Rename restrictedmem => guardedmem? (was: Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM)
From
On Mon Apr 17, 2023 at 6:40 PM EEST, Sean Christopherson wrote:
> What do y'all think about renaming "restrictedmem" to "guardedmem"?
>
> I want to start referring to the code/patches by its syscall/implementation name
> instead of "UPM", as "UPM" is (a) very KVM centric, (b) refers to the broader effort
> and not just the non-KVM code, and (c) will likely be confusing for future reviewers
> since there's nothing in the code that mentions "UPM" in any way.
>
> But typing out restrictedmem is quite tedious, and git grep shows that "rmem" is
> already used to refer to "reserved memory".
>
> Renaming the syscall to "guardedmem"...
>
> 1. Allows for a shorthand and namespace, "gmem", that isn't already in use by
> the kernel (see "reserved memory above").
>
> 2. Provides a stronger hint as to its purpose. "Restricted" conveys that the
> allocated memory is limited in some way, but doesn't capture how the memory
> is restricted, e.g. "restricted" could just as easily mean that the allocation
> can be restricted to certain types of backing stores or something. "Guarded"
> on the other hand captures that the memory has extra defenses of some form.
>
> 3. Is shorter to type and speak. Work smart, not hard :-)
>
> 4. Isn't totally wrong for the KVM use case if someone assumes the "g" means
> "guest" when reading mail and whatnot.
>
>
> P.S. I trimmed the Cc/To substantially for this particular discussion to avoid
> spamming folks that don't (yet) care about this stuff with another potentially
> lengthy thread. Feel free to add (back) any people/lists.

I guess 'guarded' could be a good noun in the sense that it does not
get easily mixed up to anything pre-existing, and it does give the idea
of the purpose.

BR, Jarkko

\
 
 \ /
  Last update: 2023-04-23 15:14    [W:0.898 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site