From: George Dunlap <george.dunlap@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Wei Liu <wei.liu2@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 3/3] x86/mm: Introduce and use l?e_{get, from}_mfn()
Date: Fri, 25 Aug 2017 16:03:49 +0100 [thread overview]
Message-ID: <cde7c143-4e68-d3b4-c2d9-f7650bd030c7@citrix.com> (raw)
In-Reply-To: <07d779b8-bd1c-999c-2d16-e44ab9795b40@citrix.com>
On 08/25/2017 04:00 PM, George Dunlap wrote:
> On 08/24/2017 02:14 PM, Andrew Cooper wrote:
>> This avoids the explicit boxing/unboxing of mfn_t in relevant codepaths.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> [snip]
>
>> diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h
>> index 242903f..8463d71 100644
>> --- a/xen/include/asm-x86/page.h
>> +++ b/xen/include/asm-x86/page.h
>> @@ -71,6 +71,12 @@
>> #define l4e_get_pfn(x) \
>> ((unsigned long)(((x).l4 & (PADDR_MASK&PAGE_MASK)) >> PAGE_SHIFT))
>>
>> +/* Get mfn mapped by pte (mfn_t). */
>> +#define l1e_get_mfn(x) _mfn(l1e_get_pfn(x))
>> +#define l2e_get_mfn(x) _mfn(l2e_get_pfn(x))
>> +#define l3e_get_mfn(x) _mfn(l3e_get_pfn(x))
>> +#define l4e_get_mfn(x) _mfn(l4e_get_pfn(x))
>
> Hmm, "get" and "put" have specific meanings elsewhere in the code that
> don't apply here, but the context of which is confusing enough that
> people might think they apply.
>
> What if we did "mfn_from_l1e" instead, to be symmetric with l1e_from_mfn()?
/me notices all the other #defines of the "lNe_get_FOO" variety
Nevermind - I'm not a fan but it looks like the ship has already sailed;
not worth the effort of getting it back into port.
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-25 15:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 13:14 [PATCH 0/3] x86/mm: Nonfunctional code hygene improvements Andrew Cooper
2017-08-24 13:14 ` [PATCH 1/3] x86/mm: Replace opencoded forms of l?e_{get, from}_page() Andrew Cooper
2017-08-24 13:26 ` Jan Beulich
2017-08-24 14:19 ` Wei Liu
2017-08-25 14:56 ` George Dunlap
2017-08-24 13:14 ` [PATCH 2/3] x86/mm: Replace opencoded forms of map_l?t_from_l?e() Andrew Cooper
2017-08-24 13:28 ` Jan Beulich
2017-08-24 14:19 ` Wei Liu
2017-08-25 14:57 ` George Dunlap
2017-08-24 13:14 ` [PATCH 3/3] x86/mm: Introduce and use l?e_{get, from}_mfn() Andrew Cooper
2017-08-24 13:32 ` Jan Beulich
2017-08-24 13:34 ` Andrew Cooper
2017-08-24 14:17 ` Tim Deegan
2017-08-24 14:19 ` Wei Liu
2017-08-25 15:00 ` George Dunlap
2017-08-25 15:03 ` George Dunlap [this message]
2017-08-25 15:11 ` Andrew Cooper
2017-08-25 15:07 ` George Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cde7c143-4e68-d3b4-c2d9-f7650bd030c7@citrix.com \
--to=george.dunlap@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).