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

Re: [Xen-devel] [PATCH RFC 1/2] xen/pvh: take the p2m lock when doing logdirty ops from HVM domains



On 15/10/14 12:52, Roger Pau Monnà wrote:
> El 15/10/14 a les 13.31, Andrew Cooper ha escrit:
>> On 15/10/14 11:53, Roger Pau Monne wrote:
>>> ---
>>>  xen/arch/x86/mm/paging.c | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>
>>> diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
>>> index 6b788f7..5af6309 100644
>>> --- a/xen/arch/x86/mm/paging.c
>>> +++ b/xen/arch/x86/mm/paging.c
>>> @@ -412,6 +412,8 @@ static int paging_log_dirty_op(struct domain *d,
>>>  
>>>      if ( !resuming )
>>>          domain_pause(d);
>>> +     if (has_hvm_container_vcpu(current))
>>> +         p2m_lock(p2m_get_hostp2m(current->domain));
>> It appears as if there is some indentation issue here.
> Yes, an extra space.
>
>> Also, can you pull current into a struct vcpu *curr on the stack?
> We only use ->domain from current, would you prefer me to pull
> current->domain instead?
>
> Roger.

You use current, and current->domain.

current degrades eventually into a macro which bitmasks the stack
pointer. Looking at the generated asm, GCC is not fantastic at eliding
recalculations of it.  Therefore, it is better to manually optimise it.

~Andrew

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

 


Rackspace

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