|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 00/13] [PATCH RFC] Paravirtualized ticketlocks
To: |
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH 00/13] [PATCH RFC] Paravirtualized ticketlocks |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Date: |
Fri, 02 Sep 2011 14:42:21 -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>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx> |
Delivery-date: |
Fri, 02 Sep 2011 14:43:24 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<CA+55aFy8p5-q9cNfyWz1bFT4RKxZosyHM2t5g2miiWm2DvP1Gg@xxxxxxxxxxxxxx> |
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.1314922370.git.jeremy.fitzhardinge@xxxxxxxxxx> <CA+55aFxpz+1bXVsg7kMeozePa=j_2-OaOuidQ4Y9Bg063=HMfg@xxxxxxxxxxxxxx> <4E61377B.4020600@xxxxxxxx> <CA+55aFy8p5-q9cNfyWz1bFT4RKxZosyHM2t5g2miiWm2DvP1Gg@xxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
On 09/02/2011 01:27 PM, Linus Torvalds wrote:
> On Fri, Sep 2, 2011 at 1:07 PM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
>> I don't know whether that fastpath code is small enough to consider
>> inlining everywhere?
> No.
>
> There's no point in inlining something that ends up containing a
> conditional function call: gcc will have to effectively save/restore
> registers around that thing anyway, so you lose a lot of the
> advantages of inlining. So I think it's better done as an out-of-line
> function, which I thought we did for spinlocks anyway.
Yes, lock currently out-of-line.
I should also make sure that unlock is also out of line when
paravirtualized.
> Also, do you run with CONFIG_OPTIMIZE_SIZE? Without that, gcc should
> be smart enough to make a "likely()" case be a fall-through.
Ah, I was wondering why I'd never seen likely/unlikely do anything
useful. With OPTIMIZE_SIZE=n, there's no point in explicitly moving the
slowpath out to a separate function.
So the only downside with this variant is that it breaks my design
criteria of making the generated code look identical to the the original
code when CONFIG_PARAVIRT_SPINLOCKS=n. But I don't know if that's an
actual downside in practice.
J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH 13/13] x86/pvticketlock: use __ticket_t for pvop args, (continued)
|
|
|
|
|