[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

  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Fri, 13 Dec 2019 12:00:09 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=George.Dunlap@xxxxxxxxxx; spf=Pass smtp.mailfrom=George.Dunlap@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 13 Dec 2019 12:00:25 +0000
  • Ironport-sdr: RAr4q/ZNqxVldtC3Gs0QKlgD++2Aj5ltiYMTKyOKp3HZAH3v7xmwLqd//VPXRTouT2ypNI1OWz UUIHzHdFE2F0GaT6ykFXD7J7qaEfaalWvUgZEiR5aKBl8i59joJRb3BzxdLkObi/WVf5z8e6fO SQ1GtUyFK2xhJiuqMSset5m3d96xw70PnRGhXwd3ZxkObAjuWvkSOXxe3X8XESwFO4RVdrY3Eb rU0eb2/PWx5KK+HktC0C4Mbq4sLRZVlKvcy8TfdNpPw+385FkyC26mAM+Z0i/jIWBM8jBgztAC Q+g=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVsRId5okcLq6La0qtvXym5gYGV6e23IkAgAD2WACAABPygA==
  • Thread-topic: [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”?

Xen-devel mailing list



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