|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 04/20] x86/ticketlock: make large and small ticke
To: |
vatsa@xxxxxxxxxxxxxxxxxx |
Subject: |
[Xen-devel] Re: [PATCH 04/20] x86/ticketlock: make large and small ticket versions of spin_lock the same |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Date: |
Fri, 12 Nov 2010 08:27:04 -0800 |
Cc: |
Nick Piggin <npiggin@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>, Linux Virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Avi Kivity <avi@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx> |
Delivery-date: |
Fri, 12 Nov 2010 08:27:43 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20101112121932.GA30016@xxxxxxxxxxxxxxxxxx> |
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.1288794124.git.jeremy.fitzhardinge@xxxxxxxxxx> <5b3cbff3a6e96a085651f140a0525be80a4df8ba.1288794124.git.jeremy.fitzhardinge@xxxxxxxxxx> <20101112121932.GA30016@xxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.6 |
On 11/12/2010 04:19 AM, Srivatsa Vaddagiri wrote:
> On Wed, Nov 03, 2010 at 10:59:45AM -0400, Jeremy Fitzhardinge wrote:
>> Make the bulk of __ticket_spin_lock look identical for large and small
>> number of cpus.
> [snip]
>
>> #if (NR_CPUS < 256)
>> static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock)
>> {
>> - register union {
>> - struct __raw_tickets tickets;
>> - unsigned short slock;
>> - } inc = { .slock = 1 << TICKET_SHIFT };
>> + register struct __raw_tickets inc = { .tail = 1 };
> [snip]
>
>> #else
>> static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock)
>> {
>> - unsigned inc = 1 << TICKET_SHIFT;
>> - __ticket_t tmp;
>> + register struct __raw_tickets inc = { .tickets.tail = 1 };
> s/.tickets//?
>
> Otherwise I get a compile error for NR_CPUS > 256, with just 4 patches
> applied.
Yeah, likely. That's precisely why I wanted to make them the same ;).
J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|