|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks
To: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks |
From: |
"H. Peter Anvin" <hpa@xxxxxxxxx> |
Date: |
Mon, 17 Oct 2011 09:33:26 -0700 |
Cc: |
Marcelo Tosatti <mtosatti@xxxxxxxxxx>, Nick Piggin <npiggin@xxxxxxxxx>, KVM <kvm@xxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Andi Kleen <andi@xxxxxxxxxxxxxx>, Avi Kivity <avi@xxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx> |
Delivery-date: |
Mon, 17 Oct 2011 09:47:39 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<4E971580.6030300@xxxxxxxx> |
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: |
<cover.1318466916.git.jeremy.fitzhardinge@xxxxxxxxxx> <1318503245.24856.12.camel@twins> <4E971580.6030300@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
On 10/13/2011 09:44 AM, Jeremy Fitzhardinge wrote:
>
> Yeah, that's a good question. There are three mechanisms with somewhat
> overlapping concerns:
>
> * alternative()
> * pvops patching
> * jump_labels
>
> Alternative() is for low-level instruction substitution, and really only
> makes sense at the assembler level with one or two instructions.
>
> pvops is basically a collection of ordinary _ops structures full of
> function pointers, but it has a layer of patching to help optimise it.
> In the common case, this just replaces an indirect call with a direct
> one, but in some special cases it can inline code. This is used for
> small, extremely performance-critical things like cli/sti, but it
> awkward to use in general because you have to specify the inlined code
> as a parameterless asm.
>
> Jump_labels is basically an efficient way of doing conditionals
> predicated on rarely-changed booleans - so it's similar to pvops in that
> it is effectively a very ordinary C construct optimised by dynamic code
> patching.
Then there is static_cpu_has(), which is basically jump labels
implemented using the alternatives mechanism.
If nothing else it would be good to:
1. Make more general use of ops patching;
2. Merge mechanisms where practical.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|