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

Re: [Xen-devel] [PATCH] x86/pv: Minor improvements to guest_get_eff_{, kern}_l1e()



On 24/08/17 13:35, Jan Beulich wrote:
>>>> On 24.08.17 at 13:13, <andrew.cooper3@xxxxxxxxxx> wrote:
>> On 24/08/17 09:44, Jan Beulich wrote:
>>>  >>> On 23.08.17 at 21:09, <andrew.cooper3@xxxxxxxxxx> wrote:
>>>> * These functions work in terms of linear addresses, not virtual addresses.
>>>>    Update the comments and parameter names.
>>>>  * Drop unnecessary inlines.
>>>>  * Drop vcpu parameter from guest_get_eff_kern_l1e().  Its sole caller 
>>>> passes
>>>>    current, and its callee strictly operates on current.
>>> I'm not entirely convinced of this part, as I think the intention was
>>> to save the re-latching of "current", but anyway:
>> It'll be inlined anyway, given a sole caller.
> But the inlining won't help with the re-fetching; the compiler can't
> know it can re-use the earlier fetched value.

On that side of things, in the past I tried experimenting with attribute
pure and const for things behind current.

Such annotations should allow subexpression elimination and reordering,
even across inlining boundaries, but I failed to get any change in
generated code.

I don't know if it was because I was annotating incorrectly, or GCC
decided that elimination wasn't worth doing, but it might be something
worth re-investigating.

~Andrew

_______________________________________________
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®.