|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/4] x86/mm: More discriptive names for page de/validation functions
> On Dec 13, 2019, at 10:48 AM, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 12.12.2019 21:07, Andrew Cooper wrote:
>> On 12/12/2019 17:32, George Dunlap wrote:
>>> The functions alloc_page_type(), alloc_lN_table(), free_page_type()
>>> and free_lN_table() are confusingly named:
>>
>> There is alloc_segdesc_page() which should be adjusted for consistency.
>>
>>> nothing is being allocated or freed.
>>
>> Well - strictly speaking the type reference is being obtained/dropped,
>> and this is a kind of alloc/free, although I agree that the names are
>> not great.
On the contrary — the type reference was obtained / will be dropped in
{get,put}_page_type(); but the page has not yet been validated to actually be
used as that type / still holds references to other pages as though it were
that type.
>>
>> However, I'm not entirely sure that {de,}validate are great either,
>> because it isn't obviously tied to obtaining/dropping a type reference.
>>
>> That said, I don't have a better suggestion right now.
>
> Following the wording of yours, how about {obtain,drop}_page_type()?
“Obtain” is literally a synonym for “get”; and there are many places in the
code where we say thing like, “drop the type count” just before calling “put”.
I agree “devalidate” looks a bit clunky, but all through the discussions on
XSA-299, the word “de-validate” was used for the work that the “free" functions
are doing — namely, dropping references to other pages such that the “validate”
bit is clear.
I mean, we could do something like “bless” and “unbless”, but I hardly think
that’s more clear. “promote” and “demote”?
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |