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

Re: [Xen-devel] [PATCH RFC 01/13] x86/mm: export {get, put}_pg_owner



>>> On 28.03.17 at 23:11, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 27/03/2017 10:10, Wei Liu wrote:
>> Prefix them with "mm_" and add declarations to asm-x86/mm.h.
>>
>> They will be needed when we split PV specific code out of x86/mm.c.

Is that actually the case? They're about PV (target) domains, so
I'd kind of expect them to move together with the PV-only code,
even if the caller may not be PV.

>> No functional change.
>>
>> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> 
> I have to admit that I don't understand why they are called
> {get,put}_pg_owner.  Perhaps very historical from Linux?

I don't think any of this code has Linux origin.

> They are nothing to do with pages, and get a reference on the domain.

Depends on the perspective you take: For all of their callers,
they have precisely that meaning.

> I'd recommend s/pg_owner/domain/ so the function calls actually indicate
> what object is having the reference taken on it.

Well, to make clear what uses are legitimate, perhaps
s/pg_owner/foreign_domain/ (if you really continue to think
these should be renamed in the first place)? Using just "domain"
pretty clearly results in too generic names. Perhaps additionally
they should be prefixed mm_?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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