|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] Re: Performance overhead of paravirt_ops on native	identifie
 
| 
To:  | 
Chuck Ebbert <cebbert@xxxxxxxxxx> | 
 
| 
Subject:  | 
[Xen-devel] Re: Performance overhead of paravirt_ops on native	identified | 
 
| 
From:  | 
Jeremy Fitzhardinge <jeremy@xxxxxxxx> | 
 
| 
Date:  | 
Thu, 21 May 2009 15:48:46 -0700 | 
 
| 
Cc:  | 
Nick Piggin <npiggin@xxxxxxx>, "Xin, Xiaohui" <xiaohui.xin@xxxxxxxxx>,	Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>,	Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, "Li,	Xin" <xin.li@xxxxxxxxx>, "Nakajima,	Jun" <jun.nakajima@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>,	Ingo Molnar <mingo@xxxxxxx> | 
 
| 
Delivery-date:  | 
Thu, 21 May 2009 15:49:12 -0700 | 
 
| 
Envelope-to:  | 
www-data@xxxxxxxxxxxxxxxxxxx | 
 
| 
In-reply-to:  | 
<20090521184233.3c3e97ad@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> | 
 
| 
List-help:  | 
<mailto:xen-devel-request@lists.xensource.com?subject=help> | 
 
| 
List-id:  | 
Xen developer discussion <xen-devel.lists.xensource.com> | 
 
| 
List-post:  | 
<mailto:xen-devel@lists.xensource.com> | 
 
| 
List-subscribe:  | 
<http://lists.xensource.com/mailman/listinfo/xen-devel>,	<mailto:xen-devel-request@lists.xensource.com?subject=subscribe> | 
 
| 
List-unsubscribe:  | 
<http://lists.xensource.com/mailman/listinfo/xen-devel>,	<mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> | 
 
| 
References:  | 
<4A0B62F7.5030802@xxxxxxxx>	<20090521184233.3c3e97ad@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> | 
 
| 
Sender:  | 
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx | 
 
| 
User-agent:  | 
Thunderbird 2.0.0.21 (X11/20090320) | 
 
 
 
Chuck Ebbert wrote:
 
On Wed, 13 May 2009 17:16:55 -0700
Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
   
Paravirt patching turns all the pvops calls into direct calls, so
_spin_lock etc do end up having direct calls.  For example, the compiler
generated code for paravirtualized _spin_lock is:
<_spin_lock+0>:           mov    %gs:0xb4c8,%rax
<_spin_lock+9>:           incl   0xffffffffffffe044(%rax)
<_spin_lock+15>:  callq  *0xffffffff805a5b30
<_spin_lock+22>:  retq
The indirect call will get patched to:
<_spin_lock+0>:           mov    %gs:0xb4c8,%rax
<_spin_lock+9>:           incl   0xffffffffffffe044(%rax)
<_spin_lock+15>:  callq <__ticket_spin_lock>
<_spin_lock+20>:  nop; nop                /* or whatever 2-byte nop */
<_spin_lock+22>:  retq
     
 
Can't those calls be changed to jumps?
   
 
 In this specific instance of this example, yes.  But if you start 
enabling various spinlock debug options then there'll be code following 
the call.  It would be hard for the runtime patching machinery to know 
when it would be safe to do the substitution.
   J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread>
 |  
- [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, (continued)
 
 
Re: [Xen-devel] Performance overhead of paravirt_ops on	nativeidentified, Peter Zijlstra
[Xen-devel] [tip:x86/urgent] x86: Fix performance regression caused	by paravirt_ops on native kernels, tip-bot for Jeremy Fitzhardinge
[Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, Chuck Ebbert
- [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified,
Jeremy Fitzhardinge <=
- [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, H. Peter Anvin
 
- [Xen-devel] RE: Performance overhead of paravirt_ops on native	identified, Xin, Xiaohui
 - [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, H. Peter Anvin
 
- [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, Jeremy Fitzhardinge
 - [Xen-devel] RE: Performance overhead of paravirt_ops on native	identified, Xin, Xiaohui
 - [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, H. Peter Anvin
 - [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, Jeremy Fitzhardinge
 - [Xen-devel] Re: Performance overhead of paravirt_ops on native	identified, H. Peter Anvin
 
  
 
 |  
  
 | 
    | 
  
  
    |   | 
    |