[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/3] x86/mm: More discriptive names for page de/validation functions



On 13.12.2019 18:37, George Dunlap wrote:
> The functions alloc_page_type(), alloc_lN_table(), free_page_type()
> and free_lN_table() are confusingly named: nothing is being allocated
> or freed.  Rather, the page being passed in is being either validated
> or devalidated for use as the specific type; in the specific case of
> pagetables, these may be promoted or demoted (i.e., grab appropriate
> references for PTEs).
> 
> Rename alloc_page_type() and free_page_type() to validate_page() and
> devalidate_page().  Also rename alloc_segdesc_page() to
> validate_segdesc_page(), since this is what it's doing.
> 
> Rename alloc_lN_table() and free_lN_table() to promote_lN_table() and
> demote_lN_table(), respectively.
> 
> After this change:
> - get / put type consistenly refer to increasing or decreasing the count
> - validate / devalidate consistently refers to actions done when a
> type count goes 0 -> 1 or 1 -> 0
> - promote / demote consistenly refers to acquiring or freeing
> resources (in the form of type refs and general references) in order
> to allow a page to be used as a pagetable.
> 
> No functional change.
> 
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.